Blender  V3.3
external_engine.c
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later
2  * Copyright 2017 Blender Foundation. */
3 
11 #include "DRW_render.h"
12 
13 #include "DNA_modifier_types.h"
14 #include "DNA_screen_types.h"
15 #include "DNA_view3d_types.h"
16 
17 #include "BKE_object.h"
18 #include "BKE_particle.h"
19 
20 #include "ED_image.h"
21 #include "ED_screen.h"
22 
23 #include "GPU_batch.h"
24 #include "GPU_debug.h"
25 #include "GPU_matrix.h"
26 #include "GPU_shader.h"
27 #include "GPU_state.h"
28 #include "GPU_viewport.h"
29 
30 #include "RE_engine.h"
31 #include "RE_pipeline.h"
32 
33 #include "external_engine.h" /* own include */
34 
35 /* Shaders */
36 
37 #define EXTERNAL_ENGINE "BLENDER_EXTERNAL"
38 
39 extern char datatoc_basic_depth_frag_glsl[];
40 extern char datatoc_basic_depth_vert_glsl[];
41 
42 extern char datatoc_common_view_lib_glsl[];
43 
44 /* *********** LISTS *********** */
45 
46 /* GPUViewport.storage
47  * Is freed every time the viewport engine changes. */
48 typedef struct EXTERNAL_Storage {
49  int dummy;
51 
52 typedef struct EXTERNAL_StorageList {
56 
57 typedef struct EXTERNAL_FramebufferList {
60 
61 typedef struct EXTERNAL_TextureList {
62  /* default */
65 
66 typedef struct EXTERNAL_PassList {
69 
70 typedef struct EXTERNAL_Data {
71  void *engine_type;
77 
80 
81 /* *********** STATIC *********** */
82 
83 static struct {
84  /* Depth Pre Pass */
86 } e_data = {NULL}; /* Engine data */
87 
88 typedef struct EXTERNAL_PrivateData {
90 
91  /* Do we need to update the depth or can we reuse the last calculated texture. */
92  bool need_depth;
94 } EXTERNAL_PrivateData; /* Transient data */
95 
96 /* Functions */
97 
98 static void external_engine_init(void *vedata)
99 {
100  EXTERNAL_StorageList *stl = ((EXTERNAL_Data *)vedata)->stl;
101  const DRWContextState *draw_ctx = DRW_context_state_get();
102  ARegion *region = draw_ctx->region;
103 
104  /* Depth pre-pass. */
105  if (!e_data.depth_sh) {
106  /* NOTE: Reuse Basic engine depth only shader. */
107  e_data.depth_sh = GPU_shader_create_from_info_name("basic_depth_mesh");
108  }
109 
110  if (!stl->g_data) {
111  /* Alloc transient pointers */
112  stl->g_data = MEM_mallocN(sizeof(*stl->g_data), __func__);
113  stl->g_data->need_depth = true;
114  }
115 
116  stl->g_data->update_depth = true;
117 
118  /* Progressive render samples are tagged with no rebuild, in that case we
119  * can skip updating the depth buffer */
120  if (region && (region->do_draw & RGN_DRAW_NO_REBUILD)) {
121  stl->g_data->update_depth = false;
122  }
123 }
124 
125 /* Add shading group call which will take care of writing to the depth buffer, so that the
126  * alpha-under overlay will happen for the render buffer. */
128 {
129  float obmat[4][4];
130  unit_m4(obmat);
131  scale_m4_fl(obmat, 0.5f);
132 
133  /* NOTE: Use the same Z-depth value as in the regular image drawing engine. */
134  translate_m4(obmat, 1.0f, 1.0f, 0.75f);
135 
136  GPUBatch *geom = DRW_cache_quad_get();
137 
138  DRW_shgroup_call_obmat(grp, geom, obmat);
139 }
140 
141 static void external_cache_init(void *vedata)
142 {
143  EXTERNAL_PassList *psl = ((EXTERNAL_Data *)vedata)->psl;
144  EXTERNAL_StorageList *stl = ((EXTERNAL_Data *)vedata)->stl;
145  EXTERNAL_TextureList *txl = ((EXTERNAL_Data *)vedata)->txl;
146  EXTERNAL_FramebufferList *fbl = ((EXTERNAL_Data *)vedata)->fbl;
147  const DRWContextState *draw_ctx = DRW_context_state_get();
148  const View3D *v3d = draw_ctx->v3d;
149 
150  {
152 
153  GPU_framebuffer_ensure_config(&fbl->depth_buffer_fb,
154  {
155  GPU_ATTACHMENT_TEXTURE(txl->depth_buffer_tx),
156  });
157  }
158 
159  /* Depth Pass */
160  {
161  psl->depth_pass = DRW_pass_create("Depth Pass",
163  stl->g_data->depth_shgrp = DRW_shgroup_create(e_data.depth_sh, psl->depth_pass);
164  }
165 
166  if (v3d != NULL) {
167  /* Do not draw depth pass when overlays are turned off. */
168  stl->g_data->need_depth = (v3d->flag2 & V3D_HIDE_OVERLAYS) == 0;
169  }
170  else if (draw_ctx->space_data != NULL) {
171  const eSpace_Type space_type = draw_ctx->space_data->spacetype;
172  if (space_type == SPACE_IMAGE) {
174 
175  stl->g_data->need_depth = true;
176  stl->g_data->update_depth = true;
177  }
178  }
179 }
180 
181 static void external_cache_populate(void *vedata, Object *ob)
182 {
183  const DRWContextState *draw_ctx = DRW_context_state_get();
184  EXTERNAL_StorageList *stl = ((EXTERNAL_Data *)vedata)->stl;
185 
186  if (draw_ctx->space_data != NULL) {
187  const eSpace_Type space_type = draw_ctx->space_data->spacetype;
188  if (space_type == SPACE_IMAGE) {
189  return;
190  }
191  }
192 
193  if (!(DRW_object_is_renderable(ob) &&
195  return;
196  }
197 
198  if (ob->type == OB_GPENCIL) {
199  /* Grease Pencil objects need correct depth to do the blending. */
200  stl->g_data->need_depth = true;
201  return;
202  }
203 
204  if (ob->type == OB_MESH && ob->modifiers.first != NULL) {
205  LISTBASE_FOREACH (ModifierData *, md, &ob->modifiers) {
206  if (md->type != eModifierType_ParticleSystem) {
207  continue;
208  }
209  ParticleSystem *psys = ((ParticleSystemModifierData *)md)->psys;
211  continue;
212  }
213  ParticleSettings *part = psys->part;
214  const int draw_as = (part->draw_as == PART_DRAW_REND) ? part->ren_as : part->draw_as;
215 
216  if (draw_as == PART_DRAW_PATH) {
217  struct GPUBatch *hairs = DRW_cache_particles_get_hair(ob, psys, NULL);
218  DRW_shgroup_call(stl->g_data->depth_shgrp, hairs, NULL);
219  }
220  }
221  }
222  struct GPUBatch *geom = DRW_cache_object_surface_get(ob);
223  if (geom) {
224  /* Depth Prepass */
225  DRW_shgroup_call(stl->g_data->depth_shgrp, geom, ob);
226  }
227 }
228 
229 static void external_cache_finish(void *UNUSED(vedata))
230 {
231 }
232 
233 static void external_draw_scene_do_v3d(void *vedata)
234 {
235  const DRWContextState *draw_ctx = DRW_context_state_get();
236  RegionView3D *rv3d = draw_ctx->rv3d;
237  ARegion *region = draw_ctx->region;
238 
240 
241  /* Create render engine. */
242  if (!rv3d->render_engine) {
243  RenderEngineType *engine_type = draw_ctx->engine_type;
244 
245  if (!(engine_type->view_update && engine_type->view_draw)) {
246  return;
247  }
248 
249  RenderEngine *engine = RE_engine_create(engine_type);
250  engine_type->view_update(engine, draw_ctx->evil_C, draw_ctx->depsgraph);
251  rv3d->render_engine = engine;
252  }
253 
254  /* Rendered draw. */
256  GPU_matrix_push();
257  ED_region_pixelspace(region);
258 
259  /* Render result draw. */
260  const RenderEngineType *type = rv3d->render_engine->type;
261  type->view_draw(rv3d->render_engine, draw_ctx->evil_C, draw_ctx->depsgraph);
262 
263  GPU_bgl_end();
264 
265  GPU_matrix_pop();
267 
268  /* Set render info. */
269  EXTERNAL_Data *data = vedata;
270  if (rv3d->render_engine->text[0] != '\0') {
271  BLI_strncpy(data->info, rv3d->render_engine->text, sizeof(data->info));
272  }
273  else {
274  data->info[0] = '\0';
275  }
276 }
277 
278 /* Configure current matrix stack so that the external engine can use the same drawing code for
279  * both viewport and image editor drawing.
280  *
281  * The engine draws result in the pixel space, and is applying render offset. For image editor we
282  * need to switch from normalized space to pixel space, and "un-apply" offset. */
284 {
285  BLI_assert(engine != NULL);
286 
287  const DRWContextState *draw_ctx = DRW_context_state_get();
288  const DRWView *view = DRW_view_get_active();
289  struct SpaceImage *space_image = (struct SpaceImage *)draw_ctx->space_data;
290 
291  /* Apply current view as transformation matrix.
292  * This will configure drawing for normalized space with current zoom and pan applied. */
293 
294  float view_matrix[4][4];
295  DRW_view_viewmat_get(view, view_matrix, false);
296 
297  float projection_matrix[4][4];
298  DRW_view_winmat_get(view, projection_matrix, false);
299 
300  GPU_matrix_projection_set(projection_matrix);
301  GPU_matrix_set(view_matrix);
302 
303  /* Switch from normalized space to pixel space. */
304  {
305  int width, height;
306  ED_space_image_get_size(space_image, &width, &height);
307 
308  const float width_inv = width ? 1.0f / width : 0.0f;
309  const float height_inv = height ? 1.0f / height : 0.0f;
310  GPU_matrix_scale_2f(width_inv, height_inv);
311  }
312 
313  /* Un-apply render offset. */
314  {
315  Render *render = engine->re;
316  rctf view_rect;
317  rcti render_rect;
318  RE_GetViewPlane(render, &view_rect, &render_rect);
319 
320  GPU_matrix_translate_2f(-render_rect.xmin, -render_rect.ymin);
321  }
322 }
323 
324 static void external_draw_scene_do_image(void *UNUSED(vedata))
325 {
326  const DRWContextState *draw_ctx = DRW_context_state_get();
327  Scene *scene = draw_ctx->scene;
329  RenderEngine *engine = RE_engine_get(re);
330 
331  /* Is tested before enabling the drawing engine. */
332  BLI_assert(re != NULL);
333  BLI_assert(engine != NULL);
334 
336 
337  /* Clear the depth buffer to the value used by the background overlay so that the overlay is not
338  * happening outside of the drawn image.
339  *
340  * NOTE: The external engine only draws color. The depth is taken care of using the depth pass
341  * which initialized the depth to the values expected by the background overlay. */
342  GPU_framebuffer_clear_depth(dfbl->default_fb, 1.0f);
343 
345  GPU_matrix_push();
346 
348 
349  GPU_debug_group_begin("External Engine");
350 
351  const RenderEngineType *engine_type = engine->type;
352  BLI_assert(engine_type != NULL);
353  BLI_assert(engine_type->draw != NULL);
354 
355  engine_type->draw(engine, draw_ctx->evil_C, draw_ctx->depsgraph);
356 
358 
359  GPU_matrix_pop();
361 
362  DRW_state_reset();
363  GPU_bgl_end();
364 
366 }
367 
368 static void external_draw_scene_do(void *vedata)
369 {
370  const DRWContextState *draw_ctx = DRW_context_state_get();
371 
372  if (draw_ctx->v3d != NULL) {
374  return;
375  }
376 
377  if (draw_ctx->space_data == NULL) {
378  return;
379  }
380 
381  const eSpace_Type space_type = draw_ctx->space_data->spacetype;
382  if (space_type == SPACE_IMAGE) {
384  return;
385  }
386 }
387 
388 static void external_draw_scene(void *vedata)
389 {
390  const DRWContextState *draw_ctx = DRW_context_state_get();
391  EXTERNAL_StorageList *stl = ((EXTERNAL_Data *)vedata)->stl;
392  EXTERNAL_PassList *psl = ((EXTERNAL_Data *)vedata)->psl;
393  EXTERNAL_FramebufferList *fbl = ((EXTERNAL_Data *)vedata)->fbl;
395 
396  /* Will be NULL during OpenGL render.
397  * OpenGL render is used for quick preview (thumbnails or sequencer preview)
398  * where using the rendering engine to preview doesn't make so much sense. */
399  if (draw_ctx->evil_C) {
400  const float clear_col[4] = {0, 0, 0, 0};
401  /* This is to keep compatibility with external engine. */
402  /* TODO(fclem): remove it eventually. */
404  GPU_framebuffer_clear_color(dfbl->default_fb, clear_col);
405 
406  external_draw_scene_do(vedata);
407  }
408 
409  if (stl->g_data->update_depth && stl->g_data->need_depth) {
411  /* Copy main depth buffer to cached framebuffer. */
413  }
414 
415  /* Copy cached depth buffer to main framebuffer. */
417 }
418 
419 static void external_engine_free(void)
420 {
421  DRW_SHADER_FREE_SAFE(e_data.depth_sh);
422 }
423 
425 
427  NULL,
428  NULL,
429  N_("External"),
433  NULL, /* instance_free */
438  NULL,
439  NULL,
440  NULL,
441  NULL,
442 };
443 
444 /* NOTE: currently unused,
445  * we should not register unless we want to see this when debugging the view. */
446 
448  NULL,
449  NULL,
451  N_("External"),
453  NULL,
454  NULL,
455  NULL,
456  NULL,
457  NULL,
458  NULL,
459  NULL,
460  NULL,
461  NULL,
463  {NULL, NULL, NULL},
464 };
465 
467 {
468  const DRWContextState *draw_ctx = DRW_context_state_get();
469  const SpaceLink *space_data = draw_ctx->space_data;
470  Scene *scene = draw_ctx->scene;
471 
472  if (space_data == NULL) {
473  return false;
474  }
475 
476  const eSpace_Type space_type = draw_ctx->space_data->spacetype;
477  if (space_type != SPACE_IMAGE) {
478  return false;
479  }
480 
481  struct SpaceImage *space_image = (struct SpaceImage *)space_data;
482  const Image *image = ED_space_image(space_image);
483  if (image == NULL || image->type != IMA_TYPE_R_RESULT) {
484  return false;
485  }
486 
487  if (image->render_slot != image->last_render_slot) {
488  return false;
489  }
490 
491  /* Render is allocated on main thread, so it is safe to access it from here. */
493 
494  if (re == NULL) {
495  return false;
496  }
497 
498  return RE_engine_draw_acquire(re);
499 }
500 
501 #undef EXTERNAL_ENGINE
General operations, lookup, etc. for blender objects.
@ OB_VISIBLE_SELF
Definition: BKE_object.h:150
#define BLI_assert(a)
Definition: BLI_assert.h:46
#define LISTBASE_FOREACH(type, var, list)
Definition: BLI_listbase.h:336
void unit_m4(float m[4][4])
Definition: rct.c:1090
void translate_m4(float mat[4][4], float tx, float ty, float tz)
Definition: math_matrix.c:2318
void scale_m4_fl(float R[4][4], float scale)
Definition: math_matrix.c:2297
char * BLI_strncpy(char *__restrict dst, const char *__restrict src, size_t maxncpy) ATTR_NONNULL()
Definition: string.c:64
#define UNUSED(x)
@ IMA_TYPE_R_RESULT
@ eModifierType_ParticleSystem
@ OB_MESH
@ OB_GPENCIL
#define PART_DRAW_PATH
#define PART_DRAW_REND
@ RGN_DRAW_NO_REBUILD
eSpace_Type
@ SPACE_IMAGE
#define V3D_HIDE_OVERLAYS
@ DRW_STATE_WRITE_DEPTH
Definition: DRW_render.h:302
@ DRW_STATE_DEPTH_LESS_EQUAL
Definition: DRW_render.h:311
#define DRW_SHADER_FREE_SAFE(shader)
Definition: DRW_render.h:254
#define DRW_shgroup_call_obmat(shgroup, geom, obmat)
Definition: DRW_render.h:420
#define DRW_STATE_DEFAULT
Definition: DRW_render.h:350
#define DRW_VIEWPORT_DATA_SIZE(ty)
Definition: DRW_render.h:96
#define DRW_shgroup_call(shgroup, geom, ob)
Definition: DRW_render.h:414
struct Image * ED_space_image(const struct SpaceImage *sima)
void ED_space_image_get_size(struct SpaceImage *sima, int *r_width, int *r_height)
Definition: image_edit.c:201
void ED_region_pixelspace(const struct ARegion *region)
static AppView * view
GPUBatch
Definition: GPU_batch.h:78
void GPU_debug_group_end(void)
Definition: gpu_debug.cc:32
void GPU_debug_group_begin(const char *name)
Definition: gpu_debug.cc:21
struct GPUFrameBuffer GPUFrameBuffer
@ GPU_DEPTH_BIT
void GPU_framebuffer_bind(GPUFrameBuffer *fb)
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei height
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum type
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei width
void GPU_matrix_pop(void)
Definition: gpu_matrix.cc:126
void GPU_matrix_scale_2f(float x, float y)
Definition: gpu_matrix.cc:216
void GPU_matrix_pop_projection(void)
Definition: gpu_matrix.cc:140
#define GPU_matrix_set(x)
Definition: GPU_matrix.h:225
void GPU_matrix_push(void)
Definition: gpu_matrix.cc:119
#define GPU_matrix_projection_set(x)
Definition: GPU_matrix.h:226
void GPU_matrix_translate_2f(float x, float y)
Definition: gpu_matrix.cc:174
void GPU_matrix_push_projection(void)
Definition: gpu_matrix.cc:133
struct GPUShader GPUShader
Definition: GPU_shader.h:20
GPUShader * GPU_shader_create_from_info_name(const char *info_name)
Definition: gpu_shader.cc:265
void GPU_bgl_end(void)
Definition: gpu_state.cc:346
struct GPUTexture GPUTexture
Definition: GPU_texture.h:17
@ GPU_DEPTH24_STENCIL8
Definition: GPU_texture.h:120
#define RE_USE_STEREO_VIEWPORT
Definition: RE_engine.h:51
#define RE_INTERNAL
Definition: RE_engine.h:43
Scene scene
GPUBatch * DRW_cache_quad_get(void)
Definition: draw_cache.c:389
GPUBatch * DRW_cache_particles_get_hair(Object *object, ParticleSystem *psys, ModifierData *md)
Definition: draw_cache.c:3093
GPUBatch * DRW_cache_object_surface_get(Object *ob)
Definition: draw_cache.c:887
DefaultFramebufferList * DRW_viewport_framebuffer_list_get(void)
Definition: draw_manager.c:633
bool DRW_object_is_renderable(const Object *ob)
Definition: draw_manager.c:180
int DRW_object_visibility_in_active_context(const Object *ob)
Definition: draw_manager.c:209
bool DRW_object_is_visible_psys_in_active_context(const Object *object, const ParticleSystem *psys)
Definition: draw_manager.c:234
const DRWContextState * DRW_context_state_get(void)
void DRW_view_winmat_get(const DRWView *view, float mat[4][4], bool inverse)
DRWShadingGroup * DRW_shgroup_create(struct GPUShader *shader, DRWPass *pass)
DRWPass * DRW_pass_create(const char *name, DRWState state)
void DRW_view_viewmat_get(const DRWView *view, float mat[4][4], bool inverse)
void DRW_draw_pass(DRWPass *pass)
const DRWView * DRW_view_get_active(void)
void DRW_state_reset(void)
void DRW_state_reset_ex(DRWState state)
void DRW_texture_ensure_fullscreen_2d(GPUTexture **tex, eGPUTextureFormat format, DRWTextureFlag flags)
#define GPU_INFO_SIZE
depth_tx normal_tx diffuse_light_tx specular_light_tx volume_light_tx environment_tx ambient_occlusion_tx aov_value_tx in_weight_img image(1, GPU_R32F, Qualifier::WRITE, ImageType::FLOAT_2D_ARRAY, "out_weight_img") .image(3
RenderEngine * RE_engine_create(RenderEngineType *type)
Definition: engine.c:136
void RE_engine_draw_release(Render *re)
Definition: engine.c:1218
bool RE_engine_draw_acquire(Render *re)
Definition: engine.c:1204
struct RenderEngine * RE_engine_get(const Render *re)
Definition: engine.c:1199
static void external_cache_populate(void *vedata, Object *ob)
RenderEngineType DRW_engine_viewport_external_type
struct EXTERNAL_FramebufferList EXTERNAL_FramebufferList
struct EXTERNAL_StorageList EXTERNAL_StorageList
struct EXTERNAL_PassList EXTERNAL_PassList
struct EXTERNAL_Storage EXTERNAL_Storage
static struct @216 e_data
static void external_draw_scene(void *vedata)
bool DRW_engine_external_acquire_for_image_editor(void)
static void external_draw_scene_do_v3d(void *vedata)
char datatoc_common_view_lib_glsl[]
static void external_cache_image_add(DRWShadingGroup *grp)
char datatoc_basic_depth_vert_glsl[]
DrawEngineType draw_engine_external_type
static void external_engine_init(void *vedata)
static void external_cache_finish(void *UNUSED(vedata))
struct EXTERNAL_TextureList EXTERNAL_TextureList
struct GPUShader * depth_sh
char datatoc_basic_depth_frag_glsl[]
static void external_image_space_matrix_set(const RenderEngine *engine)
static void external_engine_free(void)
struct EXTERNAL_Data EXTERNAL_Data
struct EXTERNAL_PrivateData EXTERNAL_PrivateData
#define EXTERNAL_ENGINE
static const DrawEngineDataSize external_data_size
static void external_draw_scene_do_image(void *UNUSED(vedata))
static void external_draw_scene_do(void *vedata)
static void external_cache_init(void *vedata)
void GPU_framebuffer_blit(GPUFrameBuffer *gpufb_read, int read_slot, GPUFrameBuffer *gpufb_write, int write_slot, eGPUFrameBufferBits blit_buffers)
void RE_GetViewPlane(Render *re, rctf *r_viewplane, rcti *r_disprect)
Definition: initrender.c:210
void *(* MEM_mallocN)(size_t len, const char *str)
Definition: mallocn.c:33
Render * RE_GetSceneRender(const Scene *scene)
Definition: pipeline.c:551
struct Scene * scene
Definition: DRW_render.h:979
struct SpaceLink * space_data
Definition: DRW_render.h:977
const struct bContext * evil_C
Definition: DRW_render.h:997
struct Depsgraph * depsgraph
Definition: DRW_render.h:987
struct View3D * v3d
Definition: DRW_render.h:976
struct ARegion * region
Definition: DRW_render.h:974
struct RenderEngineType * engine_type
Definition: DRW_render.h:985
struct RegionView3D * rv3d
Definition: DRW_render.h:975
struct GPUFrameBuffer * depth_only_fb
struct GPUFrameBuffer * default_fb
EXTERNAL_FramebufferList * fbl
char info[GPU_INFO_SIZE]
EXTERNAL_StorageList * stl
EXTERNAL_PassList * psl
EXTERNAL_TextureList * txl
void * instance_data
struct GPUFrameBuffer * depth_buffer_fb
struct DRWPass * depth_pass
DRWShadingGroup * depth_shgrp
struct EXTERNAL_PrivateData * g_data
struct EXTERNAL_Storage * storage
struct GPUTexture * depth_buffer_tx
void * first
Definition: DNA_listBase.h:31
ListBase modifiers
ParticleSettings * part
struct RenderEngine * render_engine
void(* view_draw)(struct RenderEngine *engine, const struct bContext *context, struct Depsgraph *depsgraph)
Definition: RE_engine.h:102
void(* view_update)(struct RenderEngine *engine, const struct bContext *context, struct Depsgraph *depsgraph)
Definition: RE_engine.h:99
void(* draw)(struct RenderEngine *engine, const struct bContext *context, struct Depsgraph *depsgraph)
Definition: RE_engine.h:87
RenderEngineType * type
Definition: RE_engine.h:128
char text[512]
Definition: RE_engine.h:137
struct Render * re
Definition: RE_engine.h:135
int ymin
Definition: DNA_vec_types.h:64
int xmin
Definition: DNA_vec_types.h:63
#define N_(msgid)