Blender V4.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_texture.hh"
12
13struct rcti;
14
17struct ImBuf;
18struct bContext;
19struct GPUShader;
20
23 unsigned int pos;
24 unsigned int texco;
26};
27
28/* To be used before calling immDrawPixelsTex
29 * Default shader is GPU_SHADER_2D_IMAGE_COLOR
30 * Returns a shader to be able to set uniforms */
38
56 float x,
57 float y,
58 int img_w,
59 int img_h,
60 eGPUTextureFormat gpu_format,
61 bool use_filter,
62 const void *rect,
63 float scaleX,
64 float scaleY,
65 float xzoom,
66 float yzoom,
67 const float color[4]);
68
84 float x,
85 float y,
86 int img_w,
87 int img_h,
88 eGPUTextureFormat gpu_format,
89 bool use_filter,
90 const void *rect,
91 float xzoom,
92 float yzoom,
93 const float color[4]);
95 float x,
96 float y,
97 int img_w,
98 int img_h,
99 eGPUTextureFormat gpu_format,
100 bool use_filter,
101 const void *rect,
102 float clip_min_x,
103 float clip_min_y,
104 float clip_max_x,
105 float clip_max_y,
106 float xzoom,
107 float yzoom,
108 const float color[4]);
110 float x,
111 float y,
112 int img_w,
113 int img_h,
114 eGPUTextureFormat gpu_format,
115 bool use_filter,
116 const void *rect,
117 float scaleX,
118 float scaleY,
119 float xzoom,
120 float yzoom,
121 const float color[4]);
137 float x,
138 float y,
139 int img_w,
140 int img_h,
141 eGPUTextureFormat gpu_format,
142 bool use_filter,
143 const void *rect,
144 float scaleX,
145 float scaleY,
146 float clip_min_x,
147 float clip_min_y,
148 float clip_max_x,
149 float clip_max_y,
150 float xzoom,
151 float yzoom,
152 const float color[4]);
153
154/* Image buffer drawing functions, with display transform
155 *
156 * The view and display settings can either be specified manually,
157 * or retrieved from the context with the '_ctx' variations.
158 *
159 * For better performance clipping coordinates can be specified so parts of the
160 * image outside the view are skipped. */
161
162void ED_draw_imbuf(ImBuf *ibuf,
163 float x,
164 float y,
165 bool use_filter,
166 const ColorManagedViewSettings *view_settings,
167 const ColorManagedDisplaySettings *display_settings,
168 float zoom_x,
169 float zoom_y);
174 float x,
175 float y,
176 bool use_filter,
177 const ColorManagedViewSettings *view_settings,
178 const ColorManagedDisplaySettings *display_settings,
179 float clip_min_x,
180 float clip_min_y,
181 float clip_max_x,
182 float clip_max_y,
183 float zoom_x,
184 float zoom_y);
185
187 const bContext *C, ImBuf *ibuf, float x, float y, bool use_filter, float zoom_x, float zoom_y);
189 ImBuf *ibuf,
190 float x,
191 float y,
192 bool use_filter,
193 float clip_min_x,
194 float clip_min_y,
195 float clip_max_x,
196 float clip_max_y,
197 float zoom_x,
198 float zoom_y);
199
200int ED_draw_imbuf_method(const ImBuf *ibuf);
201
205void immDrawBorderCorners(unsigned int pos, const rcti *border, float zoomx, float zoomy);
void immDrawPixelsTexTiled_scaling_clipping(IMMDrawPixelsTexState *state, float x, float y, int img_w, int img_h, eGPUTextureFormat 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:126
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:603
void immDrawPixelsTexTiled_scaling(IMMDrawPixelsTexState *state, float x, float y, int img_w, int img_h, eGPUTextureFormat gpu_format, bool use_filter, const void *rect, float scaleX, float scaleY, float xzoom, float yzoom, const float color[4])
Definition glutil.cc:301
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:402
void immDrawPixelsTexTiled_clipping(IMMDrawPixelsTexState *state, float x, float y, int img_w, int img_h, eGPUTextureFormat 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:365
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:549
void immDrawPixelsTexScaledFullSize(const IMMDrawPixelsTexState *state, float x, float y, int img_w, int img_h, eGPUTextureFormat gpu_format, bool use_filter, const void *rect, float scaleX, float scaleY, float xzoom, float yzoom, const float color[4])
Definition glutil.cc:55
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:572
void immDrawBorderCorners(unsigned int pos, const rcti *border, float zoomx, float zoomy)
Definition glutil.cc:623
void immDrawPixelsTexTiled(IMMDrawPixelsTexState *state, float x, float y, int img_w, int img_h, eGPUTextureFormat gpu_format, bool use_filter, const void *rect, float xzoom, float yzoom, const float color[4])
Definition glutil.cc:334
int ED_draw_imbuf_method(const ImBuf *ibuf)
Definition glutil.cc:609
IMMDrawPixelsTexState immDrawPixelsTexSetup(int builtin)
Definition glutil.cc:40
eGPUTextureFormat
Group Output data from inside of a node group A color picker Mix two input colors RGB to Convert a color s luminance to a grayscale value Generate a normal vector and a dot product Brightness Control the brightness and contrast of the input color Vector Map input vector components with curves Camera Retrieve information about the camera and how it relates to the current shading point s position Clamp a value between a minimum and a maximum Vector Perform vector math operation Invert Invert a color
#define C
Definition RandGen.cpp:29
struct GPUShader GPUShader
static ulong state[N]