113 memset(dst, 0x0, offsetof(
DRWManager, gl_context));
121 static void drw_state_ensure_not_reused(
DRWManager *dst)
123 memset(dst, 0xff, offsetof(
DRWManager, gl_context));
400 for (
int i = 0; i < 2; i++) {
458 for (
int i = 0; i < 2; i++) {
462 for (
int i = 0; i < drw_data->
ubo_len; i++) {
477 DRWData *vmempool = *vmempool_p;
479 if (vmempool ==
NULL) {
525 bool do_validation =
true;
542 do_validation =
false;
581 rctf region_space = {0.0f, 1.0f, 0.0f, 1.0f};
587 winmat[3][0] = -1.0f;
588 winmat[3][1] = -1.0f;
629 drw_state_ensure_not_reused(dst);
666 return dupli_key1->
ob != dupli_key2->
ob || dupli_key1->
ob_data != dupli_key2->
ob_data;
709 void **dupli_datas = val;
723 Object temp_object = *dupli_key->
ob;
760 if (sled->engine_type == engine_type) {
761 return sled->storage;
854 if (drawdata ==
NULL) {
859 if (dd->engine_type == engine_type) {
887 const size_t t =
sizeof(
float) - 1;
903 if (init_cb !=
NULL) {
915 if (drawdata ==
NULL) {
920 if (dd->free !=
NULL) {
934 if (drawdata ==
NULL) {
952 static int lasttime = 0;
955 if (
U.vbotimeout == 0 || (ctime - lasttime) <
U.vbocollectrate || ctime == lasttime) {
990 memset(
data->psl->passes, 0,
sizeof(*
data->psl->passes) * data_size->
psl_len);
992 if (engine->engine_init) {
993 engine->engine_init(
data);
1003 if (
data->text_draw_cache) {
1011 if (engine->cache_init) {
1012 engine->cache_init(
data);
1024 if (engine->id_update) {
1046 if (engine->id_update) {
1047 engine->id_update(
data, &ob->
id);
1050 if (engine->cache_populate) {
1051 engine->cache_populate(
data, ob);
1069 if (engine->cache_finish) {
1070 engine->cache_finish(
data);
1079 if (engine->draw_scene) {
1081 engine->draw_scene(
data);
1099 if (
data->text_draw_cache) {
1110 if (
data->info[0] !=
'\0') {
1111 char *chr_current =
data->info;
1112 char *chr_start = chr_current;
1119 BLF_shadow(font_id, 5, (
const float[4]){0.0f, 0.0f, 0.0f, 1.0f});
1122 while (*chr_current++ !=
'\0') {
1124 if (*chr_current ==
'\n') {
1127 *yoffset -= line_height;
1131 chr_start = chr_current + 1;
1138 *yoffset -= line_height;
1219 bool gpencil_engine_needed)
1226 if (gpencil_engine_needed && ((drawtype >=
OB_SOLID) || !use_xray)) {
1231 #ifdef WITH_DRAW_DEBUG
1232 if (
G.debug_value == 31) {
1279 if (
G.is_rendering &&
U.experimental.use_draw_manager_acquire_lock) {
1296 .view_layer = view_layer,
1297 .obact =
OBACT(view_layer),
1298 .engine_type = engine_type,
1316 if (draw_engine->view_update) {
1317 draw_engine->view_update(
data);
1353 .view_layer = view_layer,
1354 .obact =
OBACT(view_layer),
1355 .engine_type = engine_type,
1372 if (draw_engine->view_update) {
1373 draw_engine->view_update(
data);
1426 if (do_annotations) {
1441 #ifdef WITH_XR_OPENXR
1492 if (
G.debug_value > 20 &&
G.debug_value < 30) {
1509 #ifdef WITH_XR_OPENXR
1611 .view_layer = view_layer,
1612 .obact =
OBACT(view_layer),
1613 .engine_type = engine_type,
1631 const bool do_populate_loop = internal_engine || overlays_on || !draw_type_render ||
1632 gpencil_engine_needed;
1659 if (do_populate_loop) {
1663 if ((object_type_exclude_viewport & (1 << ob->type)) != 0) {
1749 const bool is_image_render,
1751 const bool do_color_management,
1759 if (viewport ==
NULL) {
1803 if (viewport ==
NULL) {
1859 .view_layer = view_layer,
1860 .engine_type = engine_type,
1881 render_view = render_view->next) {
1935 .view_layer = view_layer,
1936 .engine_type = engine_type,
1980 render_view = render_view->next) {
2020 const int object_type_exclude_viewport = draw_ctx->
v3d ?
2026 if ((object_type_exclude_viewport & (1 << ob->
type)) == 0) {
2063 .view_layer = view_layer,
2064 .engine_type =
NULL,
2124 .view_layer = view_layer,
2125 .obact =
OBACT(view_layer),
2167 if (do_populate_loop) {
2213 if (do_annotations) {
2226 if (do_annotations) {
2235 if (do_draw_gizmos) {
2242 if (
G.debug_value > 20 &&
G.debug_value < 30) {
2313 bool use_obedit_skip,
2315 bool UNUSED(use_nearest),
2316 const bool do_material_sub_selection,
2319 void *select_pass_user_data,
2321 void *object_filter_user_data)
2328 #ifndef USE_GPU_SELECT
2336 bool use_obedit =
false;
2341 int object_type = 0;
2342 if (obedit !=
NULL) {
2343 object_type = obedit->
type;
2344 object_mode = obedit->
mode;
2358 if (obpose ==
NULL) {
2364 obpose = ob_armature;
2371 object_type = obpose->
type;
2372 object_mode = obpose->
mode;
2384 .view_layer = view_layer,
2386 .engine_type = engine_type,
2401 else if (!draw_surface) {
2447 bool filter_exclude =
false;
2466 if ((object_type_exclude_select & (1 << ob->type)) == 0) {
2467 if (object_filter_fn !=
NULL) {
2472 filter_exclude = (object_filter_fn(ob, object_filter_user_data) ==
false);
2474 if (filter_exclude) {
2542 const bool use_gpencil,
2543 const bool use_basic,
2544 const bool use_overlay)
2562 .view_layer = view_layer,
2563 .obact =
OBACT(view_layer),
2564 .engine_type = engine_type,
2586 GPU_framebuffer_ensure_config(&depth_fb,
2588 GPU_ATTACHMENT_TEXTURE(depth_tx),
2589 GPU_ATTACHMENT_NONE,
2593 GPU_framebuffer_clear_depth(depth_fb, 1.0f);
2612 if ((object_type_exclude_viewport & (1 << ob->type)) != 0) {
2678 .view_layer = view_layer,
2679 .obact =
OBACT(view_layer),
2740 GPU_framebuffer_ensure_config(&depth_fb,
2742 GPU_ATTACHMENT_TEXTURE(depth_tx),
2743 GPU_ATTACHMENT_NONE,
2747 GPU_framebuffer_clear_depth(depth_fb, 1.0f);
2752 if (use_clipping_planes) {
2755 for (
int i = 0; i < 6; i++) {
2763 switch (object->
type) {
2767 Mesh *me =
object->data;
2785 if (use_clipping_planes) {
2920 if (
U.experimental.enable_eevee_next) {
2935 #ifdef WITH_DRAW_DEBUG
2982 if (
type->draw_engine->engine_free) {
2983 type->draw_engine->engine_free();
3042 if (re_gl_context !=
NULL) {
3045 void *re_gpu_context =
NULL;
3064 if (re_gl_context !=
NULL) {
3065 void *re_gpu_context =
NULL;
3195 #ifdef WITH_XR_OPENXR
3206 void *DRW_xr_opengl_context_get(
void)
3212 void *DRW_xr_gpu_context_get(
void)
3218 void DRW_xr_drawing_begin(
void)
3224 void DRW_xr_drawing_end(
void)
3237 #ifdef WITH_OPENGL_DRAW_TESTS
typedef float(TangentPoint)[2]
struct wmWindowManager * CTX_wm_manager(const bContext *C)
struct View3D * CTX_wm_view3d(const bContext *C)
struct Depsgraph * CTX_data_expect_evaluated_depsgraph(const bContext *C)
struct SpaceLink * CTX_wm_space_data(const bContext *C)
struct ARegion * CTX_wm_region(const bContext *C)
void(* BKE_curve_batch_cache_free_cb)(struct Curve *cu)
void(* BKE_curve_batch_cache_dirty_tag_cb)(struct Curve *cu, int mode)
Low-level operations for curves that cannot be defined in the C++ header yet.
void(* BKE_curves_batch_cache_dirty_tag_cb)(struct Curves *curves, int mode)
void(* BKE_curves_batch_cache_free_cb)(struct Curves *curves)
void(* BKE_gpencil_batch_cache_dirty_tag_cb)(struct bGPdata *gpd)
void(* BKE_gpencil_batch_cache_free_cb)(struct bGPdata *gpd)
void(* BKE_lattice_batch_cache_free_cb)(struct Lattice *lt)
void(* BKE_lattice_batch_cache_dirty_tag_cb)(struct Lattice *lt, int mode)
#define FOREACH_OBJECT_IN_MODE_END
bool BKE_object_is_visible_in_viewport(const struct View3D *v3d, const struct Object *ob)
#define FOREACH_OBJECT_IN_MODE_BEGIN(_view_layer, _v3d, _object_type, _object_mode, _instance)
void(* BKE_mball_batch_cache_dirty_tag_cb)(struct MetaBall *mb, int mode)
void(* BKE_mball_batch_cache_free_cb)(struct MetaBall *mb)
void(* BKE_mesh_batch_cache_dirty_tag_cb)(struct Mesh *me, eMeshBatchDirtyMode mode)
void(* BKE_mesh_batch_cache_free_cb)(struct Mesh *me)
struct Object * BKE_modifiers_is_deformed_by_armature(struct Object *ob)
General operations, lookup, etc. for blender objects.
struct Object * BKE_object_pose_armature_get(struct Object *ob)
void BKE_object_replace_data_on_shallow_copy(struct Object *ob, struct ID *new_data)
int BKE_object_visibility(const struct Object *ob, int dag_eval_mode)
bool BKE_object_is_in_editmode(const struct Object *ob)
bool psys_check_enabled(struct Object *ob, struct ParticleSystem *psys, bool use_render_params)
void(* BKE_particle_batch_cache_dirty_tag_cb)(struct ParticleSystem *psys, int mode)
bool psys_in_edit_mode(struct Depsgraph *depsgraph, const struct ParticleSystem *psys)
void(* BKE_particle_batch_cache_free_cb)(struct ParticleSystem *psys)
A BVH for high poly meshes.
General operations for point clouds.
void(* BKE_pointcloud_batch_cache_free_cb)(struct PointCloud *pointcloud)
void(* BKE_pointcloud_batch_cache_dirty_tag_cb)(struct PointCloud *pointcloud, int mode)
struct Depsgraph * BKE_scene_get_depsgraph(const struct Scene *scene, const struct ViewLayer *view_layer)
struct SpaceType * BKE_spacetype_from_id(int spaceid)
struct ARegionType * BKE_regiontype_from_id(const struct SpaceType *st, int regionid)
void(* BKE_subsurf_modifier_free_gpu_cache_cb)(struct Subdiv *subdiv)
void(* BKE_volume_batch_cache_dirty_tag_cb)(struct Volume *volume, int mode)
void(* BKE_volume_batch_cache_free_cb)(struct Volume *volume)
void BLF_shadow_offset(int fontid, int x, int y)
void BLF_shadow(int fontid, int level, const float rgba[4]) ATTR_NONNULL(3)
void BLF_disable(int fontid, int option)
void BLF_enable(int fontid, int option)
void BLF_draw_default(float x, float y, float z, const char *str, size_t str_len) ATTR_NONNULL()
#define BLI_assert_msg(a, msg)
unsigned int BLI_ghashutil_ptrhash(const void *key)
GSet * BLI_gset_ptr_new(const char *info)
GHash * BLI_ghash_new(GHashHashFP hashfp, GHashCmpFP cmpfp, const char *info) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT
void BLI_ghash_free(GHash *gh, GHashKeyFreeFP keyfreefp, GHashValFreeFP valfreefp)
void BLI_gset_free(GSet *gs, GSetKeyFreeFP keyfreefp)
bool BLI_ghash_ensure_p(GHash *gh, void *key, void ***r_val) ATTR_WARN_UNUSED_RESULT
#define LISTBASE_FOREACH(type, var, list)
BLI_INLINE void BLI_listbase_clear(struct ListBase *lb)
void void BLI_freelistN(struct ListBase *listbase) ATTR_NONNULL(1)
void BLI_addtail(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void BLI_remlink(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
int BLI_listbase_count(const struct ListBase *listbase) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
void unit_m4(float m[4][4])
void copy_m4_m4(float m1[4][4], const float m2[4][4])
MINLINE void copy_v4_v4(float r[4], const float a[4])
MINLINE float normalize_v3_v3(float r[3], const float a[3])
MINLINE void copy_v3_fl(float r[3], float f)
MINLINE void zero_v3(float r[3])
void BLI_memblock_destroy(BLI_memblock *mblk, MemblockValFreeFP free_callback) ATTR_NONNULL(1)
#define BLI_memblock_create(elem_size)
void BLI_memblock_iternew(BLI_memblock *mblk, BLI_memblock_iter *iter) ATTR_NONNULL()
BLI_memblock * BLI_memblock_create_ex(uint elem_size, uint chunk_size) ATTR_WARN_UNUSED_RESULT
void * BLI_memblock_iterstep(BLI_memblock_iter *iter) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
void * BLI_memblock_alloc(BLI_memblock *mblk) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
void BLI_memblock_clear(BLI_memblock *mblk, MemblockValFreeFP free_callback) ATTR_NONNULL(1)
BLI_INLINE int BLI_rcti_size_y(const struct rcti *rct)
void BLI_rcti_init(struct rcti *rect, int xmin, int xmax, int ymin, int ymax)
void BLI_rctf_transform_calc_m4_pivot_min(const rctf *dst, const rctf *src, float matrix[4][4])
BLI_INLINE int BLI_rcti_size_x(const struct rcti *rct)
bool BLI_rcti_is_empty(const struct rcti *rect)
char * BLI_strncpy(char *__restrict dst, const char *__restrict src, size_t maxncpy) ATTR_NONNULL()
struct TaskGraph * BLI_task_graph_create(void)
void BLI_task_graph_free(struct TaskGraph *task_graph)
void BLI_task_graph_work_and_wait(struct TaskGraph *task_graph)
void BLI_ticket_mutex_unlock(TicketMutex *ticket)
void BLI_ticket_mutex_lock(TicketMutex *ticket)
void BLI_ticket_mutex_free(TicketMutex *ticket)
int BLI_thread_is_main(void)
TicketMutex * BLI_ticket_mutex_alloc(void)
struct Depsgraph Depsgraph
struct Scene * DEG_get_input_scene(const Depsgraph *graph)
bool DEG_id_type_any_exists(const struct Depsgraph *depsgraph, short id_type)
#define DEG_OBJECT_ITER_FOR_RENDER_ENGINE_BEGIN(graph_, instance_)
struct ViewLayer * DEG_get_evaluated_view_layer(const struct Depsgraph *graph)
#define DEG_OBJECT_ITER_FOR_RENDER_ENGINE_END
struct Object * DEG_get_evaluated_object(const struct Depsgraph *depsgraph, struct Object *object)
struct Scene * DEG_get_evaluated_scene(const struct Depsgraph *graph)
void(* DrawDataFreeCb)(struct DrawData *engine_data)
void(* DrawDataInitCb)(struct DrawData *engine_data)
#define OB_MODE_ALL_WEIGHT_PAINT
#define PSYS_HAIR_DYNAMICS
#define OBPOSE_FROM_OBACT(ob)
#define OBEDIT_FROM_OBACT(ob)
#define OBWEIGHTPAINT_FROM_OBACT(ob)
#define OBACT(_view_layer)
#define V3D_SHOW_ANNOTATION
@ V3D_OVERLAY_BONE_SELECT
#define RV3D_LOCK_FLAGS(rv3d)
#define RV3D_CLIPPING_ENABLED(v3d, rv3d)
@ V3D_SHADING_SCENE_WORLD_RENDER
@ V3D_SHADING_SCENE_WORLD
#define V3D_XR_SESSION_MIRROR
@ V3D_OVERLAY_EDIT_OCCLUDE_WIRE
#define V3D_XR_SHOW_CONTROLLERS
#define V3D_HIDE_OVERLAYS
#define V3D_XR_SESSION_SURFACE
#define V3D_XR_SHOW_CUSTOM_OVERLAYS
void DRW_cache_free_old_subdiv(void)
void DRW_instance_data_list_free(struct DRWInstanceDataList *idatalist)
bool(* DRW_ObjectFilterFn)(struct Object *ob, void *user_data)
void DRW_uniform_attrs_pool_free(struct GHash *table)
bool(* DRW_SelectPassFn)(eDRWSelectStage stage, void *user_data)
struct DRWInstanceDataList * DRW_instance_data_list_create(void)
#define DRW_UBO_FREE_SAFE(ubo)
#define DRW_STATE_DEPTH_TEST_ENABLED
struct DRWContextState DRWContextState
#define DRW_TEXTURE_FREE_SAFE(tex)
void ED_region_pixelspace(const struct ARegion *region)
bScreen * ED_screen_animation_playing(const struct wmWindowManager *wm)
const rcti * ED_region_visible_rect(ARegion *region)
#define REGION_DRAW_POST_VIEW
void ED_region_draw_cb_draw(const struct bContext *C, struct ARegion *region, int type)
void ED_region_surface_draw_cb_draw(struct ARegionType *art, int type)
#define REGION_DRAW_PRE_VIEW
#define XRAY_ENABLED(v3d)
struct RenderEngineType * ED_view3d_engine_type(const struct Scene *scene, int drawtype)
void ED_view3d_clipping_local(struct RegionView3D *rv3d, const float mat[4][4])
void ED_view3d_init_mats_rv3d(const struct Object *ob, struct RegionView3D *rv3d)
void GPU_batch_program_set_builtin_with_config(GPUBatch *batch, eGPUBuiltinShader shader_id, eGPUShaderConfig sh_cfg)
#define GPU_batch_uniformbuf_bind(batch, name, ubo)
void GPU_batch_draw(GPUBatch *batch)
bool GPU_use_main_context_workaround(void)
void GPU_context_main_lock(void)
void GPU_render_begin(void)
GPUContext * GPU_context_active_get(void)
void GPU_context_discard(GPUContext *)
GPUContext * GPU_context_create(void *ghost_window)
eGPUBackendType GPU_backend_get_type(void)
void GPU_context_active_set(GPUContext *)
void GPU_context_main_unlock(void)
void GPU_render_end(void)
GPUDrawList * GPU_draw_list_create(int length)
void GPU_draw_list_discard(GPUDrawList *list)
GPUFrameBuffer * GPU_framebuffer_back_get(void)
struct GPUFrameBuffer GPUFrameBuffer
bool GPU_framebuffer_check_valid(GPUFrameBuffer *fb, char err_out[256])
void GPU_framebuffer_restore(void)
GPUFrameBuffer * GPU_framebuffer_active_get(void)
void GPU_framebuffer_free(GPUFrameBuffer *fb)
void GPU_framebuffer_bind(GPUFrameBuffer *fb)
GPUFrameBuffer * GPU_framebuffer_create(const char *name)
_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 GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_BOOL GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLushort pattern _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble u2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLdouble GLdouble v2 _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLdouble GLdouble nz _GL_VOID_RET _GL_VOID GLfloat GLfloat nz _GL_VOID_RET _GL_VOID GLint GLint nz _GL_VOID_RET _GL_VOID GLshort GLshort nz _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const GLfloat *values _GL_VOID_RET _GL_VOID GLsizei const GLushort *values _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID const GLuint const GLclampf *priorities _GL_VOID_RET _GL_VOID GLdouble y _GL_VOID_RET _GL_VOID GLfloat y _GL_VOID_RET _GL_VOID GLint y _GL_VOID_RET _GL_VOID GLshort y _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLfloat GLfloat z _GL_VOID_RET _GL_VOID GLint GLint z _GL_VOID_RET _GL_VOID GLshort GLshort z _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble w _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat w _GL_VOID_RET _GL_VOID GLint GLint GLint w _GL_VOID_RET _GL_VOID GLshort GLshort GLshort w _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble y2 _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat y2 _GL_VOID_RET _GL_VOID GLint GLint GLint y2 _GL_VOID_RET _GL_VOID GLshort GLshort GLshort y2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLuint *buffer _GL_VOID_RET _GL_VOID GLdouble t _GL_VOID_RET _GL_VOID GLfloat t _GL_VOID_RET _GL_VOID GLint t _GL_VOID_RET _GL_VOID GLshort t _GL_VOID_RET _GL_VOID GLdouble t
void GPU_matrix_identity_projection_set(void)
void GPU_matrix_pop_projection(void)
#define GPU_matrix_set(x)
#define GPU_matrix_mul(x)
#define GPU_matrix_projection_set(x)
void GPU_matrix_identity_set(void)
void GPU_matrix_push_projection(void)
@ GPU_SHADER_3D_DEPTH_ONLY
@ GPU_BLEND_ALPHA_PREMULT
void GPU_blend(eGPUBlend blend)
void GPU_apply_state(void)
void GPU_viewport(int x, int y, int width, int height)
void GPU_depth_test(eGPUDepthTest test)
void GPU_clip_distances(int distances_enabled)
int GPU_texture_height(const GPUTexture *tex)
struct GPUTexture GPUTexture
int GPU_texture_width(const GPUTexture *tex)
void GPU_texture_free(GPUTexture *tex)
GPUTexture * GPU_texture_create_2d(const char *name, int w, int h, int mip_len, eGPUTextureFormat format, const float *data)
GPUTexture * GPU_viewport_color_texture(GPUViewport *viewport, int view)
void GPU_viewport_bind_from_offscreen(GPUViewport *viewport, struct GPUOffScreen *ofs, bool is_xr_surface)
GPUViewport * GPU_viewport_create(void)
bool GPU_viewport_is_stereo_get(GPUViewport *viewport)
bool GPU_viewport_do_update(GPUViewport *viewport)
void GPU_viewport_unbind_from_offscreen(GPUViewport *viewport, struct GPUOffScreen *ofs, bool display_colorspace, bool do_overlay_merge)
int GPU_viewport_active_view_get(GPUViewport *viewport)
void GPU_viewport_free(GPUViewport *viewport)
struct DRWData ** GPU_viewport_data_get(GPUViewport *viewport)
void GPU_viewport_tag_update(GPUViewport *viewport)
GPUTexture * GPU_viewport_depth_texture(GPUViewport *viewport)
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 Bright Control the brightness and contrast of the input color Vector Map an input vectors to used to fine tune the interpolation of the input 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 a producing a negative Combine Generate a color from its and blue channels(Deprecated)") DefNode(ShaderNode
void UI_FontThemeColor(int fontid, int colorid)
void UI_SetTheme(int spacetype, int regionid)
void ED_annotation_draw_view2d(const bContext *C, bool onlyv2d)
void ED_annotation_draw_view3d(Scene *scene, struct Depsgraph *depsgraph, View3D *v3d, ARegion *region, bool only3d)
DrawEngineType draw_engine_basic_type
return(oflags[bm->toolflag_index].f &oflag) !=0
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
const Depsgraph * depsgraph
DEGForeachIDComponentCallback callback
SyclQueue void void size_t num_bytes void
void drw_batch_cache_generate_requested_evaluated_mesh_or_curve(Object *ob)
void drw_batch_cache_generate_requested(Object *ob)
void DRW_shape_cache_free(void)
void DRW_batch_cache_free_old(Object *ob, int ctime)
void DRW_particle_batch_cache_free(struct ParticleSystem *psys)
void DRW_mesh_batch_cache_create_requested(struct TaskGraph *task_graph, struct Object *ob, struct Mesh *me, const struct Scene *scene, bool is_paint_mode, bool use_hide)
void DRW_curve_batch_cache_free(struct Curve *cu)
void DRW_lattice_batch_cache_free(struct Lattice *lt)
void DRW_gpencil_batch_cache_dirty_tag(struct bGPdata *gpd)
void DRW_lattice_batch_cache_dirty_tag(struct Lattice *lt, int mode)
void DRW_gpencil_batch_cache_free(struct bGPdata *gpd)
void DRW_volume_batch_cache_free(struct Volume *volume)
void DRW_particle_batch_cache_dirty_tag(struct ParticleSystem *psys, int mode)
void DRW_curves_batch_cache_dirty_tag(struct Curves *curves, int mode)
void DRW_mball_batch_cache_dirty_tag(struct MetaBall *mb, int mode)
void DRW_mesh_batch_cache_dirty_tag(struct Mesh *me, eMeshBatchDirtyMode mode)
void DRW_mball_batch_cache_free(struct MetaBall *mb)
void DRW_pointcloud_batch_cache_dirty_tag(struct PointCloud *pointcloud, int mode)
void DRW_volume_batch_cache_dirty_tag(struct Volume *volume, int mode)
void DRW_pointcloud_batch_cache_free(struct PointCloud *pointcloud)
void DRW_curves_batch_cache_free(struct Curves *curves)
struct GPUBatch * DRW_mesh_batch_cache_get_edit_triangles(struct Mesh *me)
void DRW_mesh_batch_cache_free(struct Mesh *me)
void DRW_curve_batch_cache_dirty_tag(struct Curve *cu, int mode)
struct GPUBatch * DRW_mesh_batch_cache_get_surface(struct Mesh *me)
void DRW_subdiv_cache_free(Subdiv *subdiv)
void DRW_viewport_colormanagement_set(GPUViewport *viewport)
void DRW_globals_update(void)
void DRW_globals_free(void)
void DRW_volume_free(void)
void DRW_curves_init(struct DRWData *drw_data)
void DRW_smoke_init(struct DRWData *drw_data)
void DRW_volume_ubos_pool_free(void *pool)
void DRW_curves_ubos_pool_free(struct CurvesUniformBufPool *pool)
void DRW_curves_update(void)
void DRW_smoke_exit(struct DRWData *drw_data)
void DRW_volume_init(struct DRWData *drw_data)
void DRW_curves_free(void)
void drw_debug_draw(void)
void drw_debug_init(void)
void * DRW_instance_data_next(DRWInstanceData *idata)
void DRW_instance_data_list_free_unused(DRWInstanceDataList *idatalist)
DRWInstanceData * DRW_instance_data_request(DRWInstanceDataList *idatalist, uint attr_size)
GHash * DRW_uniform_attrs_pool_new()
void DRW_instance_buffer_finish(DRWInstanceDataList *idatalist)
void DRW_uniform_attrs_pool_clear_all(GHash *table)
void DRW_instance_data_list_reset(DRWInstanceDataList *idatalist)
void DRW_instance_data_list_resize(DRWInstanceDataList *idatalist)
#define MAX_INSTANCE_DATA_SIZE
void DRW_drawdata_free(ID *id)
const float * DRW_viewport_pixelsize_get(void)
bool DRW_opengl_context_release(void)
bool DRW_state_is_opengl_render(void)
struct Object * DRW_object_get_dupli_parent(const Object *UNUSED(ob))
void DRW_opengl_context_create(void)
void DRW_gpu_render_context_enable(void *re_gpu_context)
bool DRW_state_is_playback(void)
static void drw_engines_enable_overlays(void)
static void drw_duplidata_load(Object *ob)
static void drw_notify_view_update_offscreen(struct Depsgraph *depsgraph, RenderEngineType *engine_type, ARegion *region, View3D *v3d, GPUViewport *viewport)
bool DRW_render_check_grease_pencil(Depsgraph *depsgraph)
void ** DRW_duplidata_get(void *vedata)
bool DRW_state_is_select(void)
static void drw_engines_world_update(Scene *scene)
static void drw_engines_draw_text(void)
void DRW_draw_region_engine_info(int xoffset, int *yoffset, int line_height)
static void drw_engines_enable(ViewLayer *UNUSED(view_layer), RenderEngineType *engine_type, bool gpencil_engine_needed)
void DRW_draw_view(const bContext *C)
DrawData * DRW_drawdata_ensure(ID *id, DrawEngineType *engine_type, size_t size, DrawDataInitCb init_cb, DrawDataFreeCb free_cb)
bool DRW_state_show_text(void)
void DRW_draw_select_id(Depsgraph *depsgraph, ARegion *region, View3D *v3d, const rcti *rect)
static void drw_engines_cache_finish(void)
void DRW_engines_free(void)
bool DRW_state_is_navigating(void)
static void drw_manager_exit(DRWManager *dst)
void DRW_opengl_context_enable(void)
bool DRW_state_is_depth(void)
static void drw_engine_enable_image_editor(void)
bool DRW_engine_render_support(DrawEngineType *draw_engine_type)
static void drw_manager_init(DRWManager *dst, GPUViewport *viewport, const int size[2])
void DRW_draw_depth_loop(struct Depsgraph *depsgraph, ARegion *region, View3D *v3d, GPUViewport *viewport, const bool use_gpencil, const bool use_basic, const bool use_overlay)
DRWData * DRW_viewport_data_create(void)
struct IdDdtTemplate IdDdtTemplate
void * DRW_view_layer_engine_data_get(DrawEngineType *engine_type)
static void drw_task_graph_deinit(void)
void ** DRW_view_layer_engine_data_ensure(DrawEngineType *engine_type, void(*callback)(void *storage))
void DRW_notify_view_update(const DRWUpdateContext *update_ctx)
static void drw_engines_init(void)
static void drw_engines_data_validate(void)
bool DRW_object_is_in_edit_mode(const Object *ob)
void DRW_render_viewport_size_set(const int size[2])
static void drw_engines_draw_scene(void)
static void duplidata_value_free(void *val)
void DRW_opengl_render_context_disable(void *re_gl_context)
static DRWData * drw_viewport_data_ensure(GPUViewport *viewport)
bool DRW_state_is_material_select(void)
static void use_drw_engine(DrawEngineType *engine)
DefaultFramebufferList * DRW_viewport_framebuffer_list_get(void)
void DRW_render_instance_buffer_finish(void)
static void DRW_render_gpencil_to_image(RenderEngine *engine, struct RenderLayer *render_layer, const rcti *rect)
void DRW_engines_register(void)
void DRW_draw_render_loop_ex(struct Depsgraph *depsgraph, RenderEngineType *engine_type, ARegion *region, View3D *v3d, GPUViewport *viewport, const bContext *evil_C)
static void drw_state_prepare_clean_for_draw(DRWManager *dst)
bool DRW_object_is_renderable(const Object *ob)
void DRW_opengl_context_disable_ex(bool restore)
static void drw_context_state_init(void)
void DRW_cache_free_old_batches(Main *bmain)
void DRW_draw_render_loop_offscreen(struct Depsgraph *depsgraph, RenderEngineType *engine_type, ARegion *region, View3D *v3d, const bool is_image_render, const bool draw_background, const bool do_color_management, GPUOffScreen *ofs, GPUViewport *viewport)
void DRW_render_gpencil(struct RenderEngine *engine, struct Depsgraph *depsgraph)
void DRW_draw_depth_object(Scene *scene, ARegion *region, View3D *v3d, GPUViewport *viewport, Object *object)
static void drw_registered_engines_free(void)
void ** DRW_view_layer_engine_data_ensure_ex(ViewLayer *view_layer, DrawEngineType *engine_type, void(*callback)(void *storage))
int DRW_object_visibility_in_active_context(const Object *ob)
static uint dupli_key_hash(const void *key)
void DRW_draw_callbacks_post_scene(void)
static void drw_engines_enable_basic(void)
static bool drw_draw_show_annotation(void)
bool DRW_state_draw_support(void)
void DRW_render_context_disable(Render *render)
bool DRW_state_is_fbo(void)
struct DupliObject * DRW_object_get_dupli(const Object *UNUSED(ob))
static void drw_engines_cache_populate(Object *ob)
bool DRW_object_is_visible_psys_in_active_context(const Object *object, const ParticleSystem *psys)
void DRW_draw_select_loop(struct Depsgraph *depsgraph, ARegion *region, View3D *v3d, bool use_obedit_skip, bool draw_surface, bool UNUSED(use_nearest), const bool do_material_sub_selection, const rcti *rect, DRW_SelectPassFn select_pass_fn, void *select_pass_user_data, DRW_ObjectFilterFn object_filter_fn, void *object_filter_user_data)
const DRWContextState * DRW_context_state_get(void)
void DRW_render_to_image(RenderEngine *engine, struct Depsgraph *depsgraph)
void DRW_viewport_data_free(DRWData *drw_data)
void DRW_draw_callbacks_pre_scene(void)
bool DRW_state_draw_background(void)
static void draw_unit_state_create(void)
static void drw_engines_enable_from_engine(const RenderEngineType *engine_type, eDrawType drawtype)
static void drw_engines_enable_editors(void)
void DRW_opengl_context_enable_ex(bool UNUSED(restore))
void DRW_opengl_render_context_enable(void *re_gl_context)
void DRW_cache_restart(void)
DrawData * DRW_drawdata_get(ID *id, DrawEngineType *engine_type)
static void drw_engines_cache_init(void)
static void draw_render_result_ensure_pass_cb(void *user_data, struct Scene *UNUSED(scene), struct ViewLayer *view_layer, const char *name, int channels, const char *chanid, eNodeSocketDatatype UNUSED(type))
static void drw_task_graph_init(void)
void DRW_opengl_context_activate(bool drw_state)
static void duplidata_key_free(void *key)
const float * DRW_viewport_size_get(void)
void DRW_draw_render_loop_2d_ex(struct Depsgraph *depsgraph, ARegion *region, GPUViewport *viewport, const bContext *evil_C)
static bool drw_gpencil_engine_needed(Depsgraph *depsgraph, View3D *v3d)
bool DRW_object_use_hide_faces(const struct Object *ob)
void DRW_engine_register(DrawEngineType *draw_engine_type)
static struct DRWSelectBuffer g_select_buffer
const float * DRW_viewport_screenvecs_get(void)
void DRW_opengl_context_disable(void)
void DRW_render_set_time(RenderEngine *engine, Depsgraph *depsgraph, int frame, float subframe)
static struct @293 g_registered_engines
static void drw_engines_disable(void)
bool DRW_state_is_image_render(void)
void DRW_opengl_context_destroy(void)
void DRW_custom_pipeline(DrawEngineType *draw_engine_type, struct Depsgraph *depsgraph, void(*callback)(void *vedata, void *user_data), void *user_data)
const float * DRW_viewport_invert_size_get(void)
DrawDataList * DRW_drawdatalist_from_id(ID *id)
static void drw_duplidata_free(void)
static bool id_can_have_drawdata(const ID *id)
static bool dupli_key_cmp(const void *key1, const void *key2)
void DRW_render_context_enable(Render *render)
void DRW_gpu_render_context_disable(void *UNUSED(re_gpu_context))
bool DRW_state_is_scene_render(void)
void DRW_engines_register_experimental(void)
static void draw_select_framebuffer_depth_only_setup(const int size[2])
void DRW_viewport_request_redraw(void)
struct DRWTextStore * DRW_text_cache_ensure(void)
static void drw_viewport_data_reset(DRWData *drw_data)
static void draw_texture_release(DRWData *drw_data)
DefaultTextureList * DRW_viewport_texture_list_get(void)
void DRW_render_object_iter(void *vedata, RenderEngine *engine, struct Depsgraph *depsgraph, void(*callback)(void *vedata, Object *ob, RenderEngine *engine, struct Depsgraph *depsgraph))
static void drw_drawdata_unlink_dupli(ID *id)
void DRW_draw_render_loop(struct Depsgraph *depsgraph, ARegion *region, View3D *v3d, GPUViewport *viewport)
static bool id_type_can_have_drawdata(const short id_type)
void drw_resource_buffer_finish(DRWData *vmempool)
#define PROFILE_END_UPDATE(time_update, time_start)
#define PROFILE_START(time_start)
#define DRW_RESOURCE_CHUNK_LEN
struct DRWObjectInfos DRWObjectInfos
struct DRWObjectMatrix DRWObjectMatrix
BLI_INLINE void DRW_handle_increment(DRWResourceHandle *handle)
struct DRWCullingState DRWCullingState
DRWView * DRW_view_create(const float viewmat[4][4], const float winmat[4][4], const float(*culling_viewmat)[4], const float(*culling_winmat)[4], DRWCallVisibilityFn *visibility_fn)
void DRW_view_clip_planes_set(DRWView *view, float(*planes)[4], int plane_len)
void DRW_view_camtexco_set(DRWView *view, float texco[4])
void DRW_view_reset(void)
void DRW_state_reset(void)
void DRW_state_lock(DRWState state)
void DRW_select_load_id(uint id)
void DRW_stats_begin(void)
void DRW_stats_group_start(const char *name)
void DRW_stats_reset(void)
void DRW_stats_draw(const rcti *rect)
void DRW_stats_group_end(void)
void DRW_stats_free(void)
void DRW_text_cache_draw(DRWTextStore *dt, ARegion *region, struct View3D *v3d)
DRWTextStore * DRW_text_cache_create(void)
void DRW_text_cache_destroy(struct DRWTextStore *dt)
void DRW_texture_pool_free(DRWTexturePool *pool)
void DRW_texture_pool_reset(DRWTexturePool *pool)
DRWTexturePool * DRW_texture_pool_create()
void DRW_draw_cursor_2d(void)
void DRW_draw_gizmo_2d(void)
void DRW_draw_region_info(void)
void DRW_draw_gizmo_3d(void)
void DRW_view_data_use_engine(DRWViewData *view_data, DrawEngineType *engine_type)
ViewportEngineData * DRW_view_data_engine_data_get_ensure(DRWViewData *view_data, DrawEngineType *engine_type)
DRWViewData * DRW_view_data_create(ListBase *engine_types)
void DRW_view_data_free(DRWViewData *view_data)
DefaultTextureList * DRW_view_data_default_texture_list_get(DRWViewData *view_data)
void DRW_view_data_default_lists_from_viewport(DRWViewData *view_data, GPUViewport *viewport)
double * DRW_view_data_cache_time_get(DRWViewData *view_data)
DefaultFramebufferList * DRW_view_data_default_framebuffer_list_get(DRWViewData *view_data)
void DRW_view_data_texture_list_size_validate(DRWViewData *view_data, const int size[2])
void DRW_view_data_reset(DRWViewData *view_data)
void DRW_view_data_free_unused(DRWViewData *view_data)
#define DRW_ENABLED_ENGINE_ITER(view_data_, engine_, data_)
RenderEngineType DRW_engine_viewport_eevee_type
RenderEngineType DRW_engine_viewport_eevee_next_type
void RE_engine_frame_set(RenderEngine *engine, int frame, float subframe)
void RE_engine_update_render_passes(struct RenderEngine *engine, struct Scene *scene, struct ViewLayer *view_layer, update_render_passes_cb_t callback, void *callback_data)
void RE_engine_add_pass(RenderEngine *engine, const char *name, int channels, const char *chan_id, const char *layername)
void RE_engines_register(RenderEngineType *render_type)
RenderResult * RE_engine_get_result(RenderEngine *engine)
void RE_engine_end_result(RenderEngine *engine, RenderResult *result, bool cancel, bool highlight, bool merge_results)
RenderResult * RE_engine_begin_result(RenderEngine *engine, int x, int y, int w, int h, const char *layername, const char *viewname)
RenderEngineType DRW_engine_viewport_external_type
bool DRW_engine_external_acquire_for_image_editor(void)
DrawEngineType draw_engine_external_type
DrawEngineType draw_engine_gpencil_type
void GPU_framebuffer_texture_attach(GPUFrameBuffer *fb, GPUTexture *tex, int slot, int mip)
void GPU_clear_color(float red, float green, float blue, float alpha)
void GPU_offscreen_bind(GPUOffScreen *ofs, bool save)
DrawEngineType draw_engine_image_type
void RE_GetViewPlane(Render *re, rctf *r_viewplane, rcti *r_disprect)
void(* MEM_freeN)(void *vmemh)
void *(* MEM_callocN)(size_t len, const char *str)
void *(* MEM_mallocN)(size_t len, const char *str)
static const pxr::TfToken st("st", pxr::TfToken::Immortal)
void drw_batch_cache_validate(Object *custom)
DrawEngineType draw_engine_overlay_type
void * RE_gpu_context_get(Render *re)
void * RE_gl_context_get(Render *re)
RenderLayer * RE_GetRenderLayer(RenderResult *rr, const char *name)
void RE_SetActiveRenderView(Render *re, const char *viewname)
DrawEngineType draw_engine_debug_select_type
DrawEngineType draw_engine_select_type
struct SELECTID_Context * DRW_select_engine_context_get(void)
struct SpaceLink * space_data
const struct bContext * evil_C
struct Depsgraph * depsgraph
struct ViewLayer * view_layer
struct Object * object_pose
struct Object * object_edit
struct RegionView3D * rv3d
struct GHash * obattrs_ubo_pool
struct BLI_memblock * images
struct BLI_memblock * commands_small
struct BLI_memblock * obinfos
struct BLI_memblock * commands
struct BLI_memblock * shgroups
struct BLI_memblock * passes
struct BLI_memblock * uniforms
struct DRWTexturePool * texture_pool
struct GPUUniformBuf ** obinfos_ubo
struct DRWViewData * view_data[2]
struct BLI_memblock * obmats
struct GPUUniformBuf ** matrices_ubo
DRWInstanceDataList * idatalist
struct BLI_memblock * views
struct BLI_memblock * callbuffers
struct CurvesUniformBufPool * curves_ubos
struct BLI_memblock * cullstates
struct DupliObject * dupli_source
DRWResourceHandle ob_handle
struct DRWViewData * view_data_active
DRWResourceHandle pass_handle
struct TaskGraph * task_graph
bool buffer_finish_called
DRWResourceHandle resource_handle
struct ID * dupli_origin_data
struct DRWTextStore ** text_store_p
DRWInstanceData * object_instance_data[MAX_INSTANCE_DATA_SIZE]
struct Object * dupli_parent
struct GSet * delayed_extraction
struct GHash * dupli_ghash
struct DRWManager::@313 options
struct GPUFrameBuffer * default_framebuffer
struct Object * dupli_origin
TicketMutex * gl_context_mutex
DrawEngineType * draw_engine
struct GPUFrameBuffer * framebuffer_depth_only
struct GPUTexture * texture_depth
struct RenderEngineType * engine_type
struct ViewLayer * view_layer
struct Depsgraph * depsgraph
struct GPUUniformBuf * block_ubo
struct GPUTexture * weight_ramp
struct GPUUniformBuf * view_ubo
struct GPUFrameBuffer * overlay_fb
struct GPUFrameBuffer * default_fb
struct DrawEngineType * engine_type
void(* store_metadata)(void *vedata, struct RenderResult *render_result)
void(* render_to_image)(void *vedata, struct RenderEngine *engine, struct RenderLayer *layer, const struct rcti *rect)
struct PointCache * pointcache
struct DrawEngineType * draw_engine
struct ToolSettings * toolsettings
int object_type_exclude_select
int object_type_exclude_viewport
struct DrawEngineType * engine_type
struct ViewLayerEngineData * next
void(* free)(void *storage)
struct DRWRegisteredDrawEngine * engine_type
double PIL_check_seconds_timer(void)
static void draw_background(const rcti *rect)
GPUViewport * WM_draw_region_get_viewport(ARegion *region)
GPUViewport * WM_draw_region_get_bound_viewport(ARegion *region)
void WM_init_opengl(void)
void wmOrtho2(float x1, float x2, float y1, float y2)
void * WM_opengl_context_create(void)
void wm_window_reset_drawable(void)
void WM_opengl_context_activate(void *context)
void WM_opengl_context_release(void *context)
void WM_opengl_context_dispose(void *context)
ARegionType * WM_xr_surface_controller_region_type_get(void)
RenderEngineType DRW_engine_viewport_workbench_type