Blender V5.3
BIF_glutil.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2001-2002 NaN Holding BV. All rights reserved.
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
8
9#pragma once
10
11#include "GPU_shader_builtin.hh"
12#include "GPU_texture.hh"
13
14namespace blender {
15
16struct rcti;
17
20struct ImBuf;
21struct bContext;
22namespace gpu {
23class Shader;
24} // namespace gpu
25
31 gpu::Shader *shader;
32 unsigned int pos;
33 unsigned int texco;
34
35 public:
42 PixelBitmapDrawer(GPUBuiltinShader builtin_shader);
43
50
52 {
53 return shader;
54 }
55
63 void draw(float x,
64 float y,
65 int img_w,
66 int img_h,
67 gpu::TextureFormat gpu_format,
68 bool use_filter,
69 const void *rect,
70 float scale_x,
71 float scale_y,
72 const float color[4]);
73
74 private:
75 void init_vertex_attributes();
76};
77
81void ED_draw_imbuf(const ImBuf *ibuf,
82 float x,
83 float y,
84 bool use_filter,
85 const ColorManagedViewSettings *view_settings,
86 const ColorManagedDisplaySettings *display_settings,
87 float zoom_x,
88 float zoom_y);
92void ED_draw_imbuf_ctx(const bContext *C,
93 const ImBuf *ibuf,
94 float x,
95 float y,
96 bool use_filter,
97 float zoom_x,
98 float zoom_y);
99
104void immDrawBorderCorners(unsigned int pos, const rcti *border, float zoomx, float zoomy);
105
106} // namespace blender
#define C
Definition RandGen.cpp:29
gpu::Shader * shader_get()
Definition BIF_glutil.hh:51
PixelBitmapDrawer(GPUBuiltinShader builtin_shader)
Definition glutil.cc:36
BMesh Iterators.
void immDrawBorderCorners(unsigned int pos, const rcti *border, float zoomx, float zoomy)
Definition glutil.cc:191
void ED_draw_imbuf(const ImBuf *ibuf, float x, float y, bool use_filter, const ColorManagedViewSettings *view_settings, const ColorManagedDisplaySettings *display_settings, float zoom_x, float zoom_y)
Definition glutil.cc:121
void ED_draw_imbuf_ctx(const bContext *C, const ImBuf *ibuf, float x, float y, bool use_filter, float zoom_x, float zoom_y)
Definition glutil.cc:177