Blender V5.0
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_texture.hh"
12
13struct rcti;
14
17struct ImBuf;
18struct bContext;
19namespace blender::gpu {
20class Shader;
21} // namespace blender::gpu
22
29
30/* To be used before calling immDrawPixelsTex
31 * Default shader is GPU_SHADER_2D_IMAGE_COLOR
32 * Returns a shader to be able to set uniforms */
40
58 float x,
59 float y,
60 int img_w,
61 int img_h,
63 bool use_filter,
64 const void *rect,
65 float scaleX,
66 float scaleY,
67 float xzoom,
68 float yzoom,
69 const float color[4]);
70
86 float x,
87 float y,
88 int img_w,
89 int img_h,
91 bool use_filter,
92 const void *rect,
93 float xzoom,
94 float yzoom,
95 const float color[4]);
97 float x,
98 float y,
99 int img_w,
100 int img_h,
102 bool use_filter,
103 const void *rect,
104 float clip_min_x,
105 float clip_min_y,
106 float clip_max_x,
107 float clip_max_y,
108 float xzoom,
109 float yzoom,
110 const float color[4]);
112 float x,
113 float y,
114 int img_w,
115 int img_h,
117 bool use_filter,
118 const void *rect,
119 float scaleX,
120 float scaleY,
121 float xzoom,
122 float yzoom,
123 const float color[4]);
139 float x,
140 float y,
141 int img_w,
142 int img_h,
144 bool use_filter,
145 const void *rect,
146 float scaleX,
147 float scaleY,
148 float clip_min_x,
149 float clip_min_y,
150 float clip_max_x,
151 float clip_max_y,
152 float xzoom,
153 float yzoom,
154 const float color[4]);
155
156/* Image buffer drawing functions, with display transform
157 *
158 * The view and display settings can either be specified manually,
159 * or retrieved from the context with the '_ctx' variations.
160 *
161 * For better performance clipping coordinates can be specified so parts of the
162 * image outside the view are skipped. */
163
164void ED_draw_imbuf(ImBuf *ibuf,
165 float x,
166 float y,
167 bool use_filter,
168 const ColorManagedViewSettings *view_settings,
169 const ColorManagedDisplaySettings *display_settings,
170 float zoom_x,
171 float zoom_y);
176 float x,
177 float y,
178 bool use_filter,
179 const ColorManagedViewSettings *view_settings,
180 const ColorManagedDisplaySettings *display_settings,
181 float clip_min_x,
182 float clip_min_y,
183 float clip_max_x,
184 float clip_max_y,
185 float zoom_x,
186 float zoom_y);
187
189 const bContext *C, ImBuf *ibuf, float x, float y, bool use_filter, float zoom_x, float zoom_y);
191 ImBuf *ibuf,
192 float x,
193 float y,
194 bool use_filter,
195 float clip_min_x,
196 float clip_min_y,
197 float clip_max_x,
198 float clip_max_y,
199 float zoom_x,
200 float zoom_y);
201
202int ED_draw_imbuf_method(const ImBuf *ibuf);
203
208void immDrawBorderCorners(unsigned int pos, const rcti *border, float zoomx, float zoomy);
void ED_draw_imbuf_ctx(const bContext *C, ImBuf *ibuf, float x, float y, bool use_filter, float zoom_x, float zoom_y)
Definition glutil.cc:613
void ED_draw_imbuf_clipping(ImBuf *ibuf, float x, float y, bool use_filter, const ColorManagedViewSettings *view_settings, const ColorManagedDisplaySettings *display_settings, float clip_min_x, float clip_min_y, float clip_max_x, float clip_max_y, float zoom_x, float zoom_y)
Definition glutil.cc:410
void ED_draw_imbuf(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:559
void ED_draw_imbuf_ctx_clipping(const bContext *C, ImBuf *ibuf, float x, float y, bool use_filter, float clip_min_x, float clip_min_y, float clip_max_x, float clip_max_y, float zoom_x, float zoom_y)
Definition glutil.cc:582
void immDrawPixelsTexTiled_scaling(IMMDrawPixelsTexState *state, float x, float y, int img_w, int img_h, blender::gpu::TextureFormat gpu_format, bool use_filter, const void *rect, float scaleX, float scaleY, float xzoom, float yzoom, const float color[4])
Definition glutil.cc:309
void immDrawPixelsTexScaledFullSize(const IMMDrawPixelsTexState *state, float x, float y, int img_w, int img_h, blender::gpu::TextureFormat gpu_format, bool use_filter, const void *rect, float scaleX, float scaleY, float xzoom, float yzoom, const float color[4])
Definition glutil.cc:51
void immDrawPixelsTexTiled(IMMDrawPixelsTexState *state, float x, float y, int img_w, int img_h, blender::gpu::TextureFormat gpu_format, bool use_filter, const void *rect, float xzoom, float yzoom, const float color[4])
Definition glutil.cc:342
void immDrawBorderCorners(unsigned int pos, const rcti *border, float zoomx, float zoomy)
Definition glutil.cc:633
void immDrawPixelsTexTiled_clipping(IMMDrawPixelsTexState *state, float x, float y, int img_w, int img_h, blender::gpu::TextureFormat gpu_format, bool use_filter, const void *rect, float clip_min_x, float clip_min_y, float clip_max_x, float clip_max_y, float xzoom, float yzoom, const float color[4])
Definition glutil.cc:373
void immDrawPixelsTexTiled_scaling_clipping(IMMDrawPixelsTexState *state, float x, float y, int img_w, int img_h, blender::gpu::TextureFormat gpu_format, bool use_filter, const void *rect, float scaleX, float scaleY, float clip_min_x, float clip_min_y, float clip_max_x, float clip_max_y, float xzoom, float yzoom, const float color[4])
Definition glutil.cc:125
int ED_draw_imbuf_method(const ImBuf *ibuf)
Definition glutil.cc:619
IMMDrawPixelsTexState immDrawPixelsTexSetup(int builtin)
Definition glutil.cc:37
#define C
Definition RandGen.cpp:29
uint pos
static ulong state[N]
blender::gpu::Shader * shader
Definition BIF_glutil.hh:24