258 if ((part->childtype == 0) &&
402 for (
int i = 0; i < 2; i++) {
426 if (++attr->users > 10) {
481 for (
int i = 0; i < 2; i++) {
485 for (
int i = 0; i < drw_data->
ubo_len; i++) {
500 DRWData *vmempool = *vmempool_p;
502 if (vmempool ==
nullptr) {
550 bool do_validation =
true;
551 if (size ==
nullptr && viewport ==
nullptr) {
556 else if (size ==
nullptr) {
564 dst->
size[0] = size[0];
565 dst->
size[1] = size[1];
567 do_validation =
false;
586 if (rv3d !=
nullptr) {
599 View2D *v2d = ®ion->v2d;
603 rctf region_space = {0.0f, 1.0f, 0.0f, 1.0f};
609 winmat[3][0] = -1.0f;
610 winmat[3][1] = -1.0f;
634 sizeof(float4) * 6,
nullptr,
"G_draw.clipping_ubo");
696 return dupli_key1->
ob != dupli_key2->
ob || dupli_key1->
ob_data != dupli_key2->
ob_data;
702 if (dupli ==
nullptr) {
739 void **dupli_datas =
static_cast<void **
>(val);
753 Object temp_object = blender::dna::shallow_copy(*dupli_key->
ob);
755 temp_object.
runtime = &runtime;
791 if (sled->engine_type == engine_type) {
792 return sled->storage;
891 if (drawdata ==
nullptr) {
896 if (dd->engine_type == engine_type) {
924 const size_t t =
sizeof(
float) - 1;
925 size = (size + t) & ~t;
926 size_t fsize = size /
sizeof(
float);
940 if (init_cb !=
nullptr) {
952 if (drawdata ==
nullptr) {
957 if (dd->free !=
nullptr) {
971 if (drawdata ==
nullptr) {
989 static int lasttime = 0;
992 if (
U.vbotimeout == 0 || (ctime - lasttime) <
U.vbocollectrate || ctime == lasttime) {
999 scene =
static_cast<Scene *
>(scene->id.next))
1013 DRW_batch_cache_free_old(ob, ctime);
1032 memset(data->psl->passes, 0,
sizeof(*data->psl->passes) * data_size->
psl_len);
1034 if (engine->engine_init) {
1035 engine->engine_init(data);
1047 if (data->text_draw_cache) {
1049 data->text_draw_cache =
nullptr;
1055 if (engine->cache_init) {
1056 engine->cache_init(data);
1063 if (scene->world ==
nullptr) {
1068 if (engine->id_update) {
1069 engine->id_update(data, &scene->world->id);
1090 if (engine->id_update) {
1091 engine->id_update(data, &ob->
id);
1094 if (engine->cache_populate) {
1095 engine->cache_populate(data, ob);
1113 if (engine->cache_finish) {
1114 engine->cache_finish(data);
1125 if (engine->draw_scene) {
1127 engine->draw_scene(data);
1145 if (data->text_draw_cache) {
1156 if (data->info[0] !=
'\0') {
1157 const char *buf_step =
IFACE_(data->info);
1159 const char *buf = buf_step;
1161 const int buf_len = buf_step - buf;
1162 *yoffset -= line_height;
1164 }
while (*buf_step ? ((
void)buf_step++,
true) :
false);
1280 bool gpencil_engine_needed)
1287 if (gpencil_engine_needed && ((drawtype >=
OB_SOLID) || !use_xray)) {
1297#ifdef WITH_DRAW_DEBUG
1298 if (
G.debug_value == 31) {
1318 const bool exclude_gpencil_rendering =
1380 for (
int view = 0; view < view_count; view++) {
1432 for (
int view = 0; view < view_count; view++) {
1489 if (do_annotations) {
1504#ifdef WITH_XR_OPENXR
1555 if (
G.debug_value > 20 &&
G.debug_value < 30) {
1572#ifdef WITH_XR_OPENXR
1695 const bool do_populate_loop = internal_engine || overlays_on || !draw_type_render ||
1696 gpencil_engine_needed;
1706 DRW_pointcloud_init();
1724 if (do_populate_loop) {
1734 if ((object_type_exclude_viewport & (1 << ob->type)) != 0) {
1770 DRW_curves_update();
1820 const bool is_image_render,
1822 const bool do_color_management,
1830 if (viewport ==
nullptr) {
1874 if (viewport ==
nullptr) {
1922 if (render_layer ==
nullptr) {
1960 render_view !=
nullptr;
1961 render_view = render_view->next)
2044 render_view !=
nullptr;
2045 render_view = render_view->
next)
2065 DRW_cache_free_old_subdiv();
2082 DRW_pointcloud_init();
2088 const int object_type_exclude_viewport = draw_ctx->
v3d ?
2097 if ((object_type_exclude_viewport & (1 << ob->
type)) == 0) {
2141 DRW_pointcloud_init();
2171 void (*
callback)(
void *vedata,
void *user_data),
2193 DRW_pointcloud_init();
2253 if (do_populate_loop) {
2301 region->v2d.cur.xmin, region->v2d.cur.xmax, region->v2d.cur.ymin, region->v2d.cur.ymax);
2302 if (do_annotations) {
2315 if (do_annotations) {
2324 if (do_draw_gizmos) {
2331 if (
G.debug_value > 20 &&
G.debug_value < 30) {
2404 bool use_obedit_skip,
2407 const bool do_material_sub_selection,
2410 void *select_pass_user_data,
2412 void *object_filter_user_data)
2422#ifndef USE_GPU_SELECT
2423 UNUSED_VARS(scene, view_layer, v3d, region, rect);
2430 bool use_obedit =
false;
2435 int object_type = 0;
2436 if (obedit !=
nullptr) {
2437 object_type = obedit->
type;
2452 if (obpose ==
nullptr) {
2458 obpose = ob_armature;
2465 object_type = obpose->
type;
2492 if (
U.experimental.enable_overlay_next) {
2495 else if (use_obedit) {
2498 else if (!draw_surface) {
2523 DRW_pointcloud_init();
2545 bool filter_exclude =
false;
2570 if ((object_type_exclude_select & (1 << ob->type)) == 0) {
2571 if (object_filter_fn !=
nullptr) {
2576 filter_exclude = (object_filter_fn(ob, object_filter_user_data) ==
false);
2578 if (filter_exclude) {
2612 DRW_curves_update();
2619 if (!
U.experimental.enable_overlay_next) {
2625 if (!
U.experimental.enable_overlay_next) {
2653 const bool use_gpencil,
2654 const bool use_basic,
2655 const bool use_overlay,
2656 const bool use_only_selected)
2699 GPUFrameBuffer *depth_fb =
nullptr;
2714 DRW_pointcloud_init();
2733 if ((object_type_exclude_viewport & (1 << ob->type)) != 0) {
2739 if (use_only_selected && !(ob->base_flag &
BASE_SELECTED)) {
2759 DRW_curves_update();
2882 GPUFrameBuffer *depth_fb =
nullptr;
2895 if (use_clipping_planes) {
2898 for (
int i = 0; i < 6; i++) {
2901 copy_m4_m4(planes.ClipModelMatrix.ptr(), object->object_to_world().ptr());
2906 switch (object->type) {
2908 blender::gpu::Batch *
batch;
2910 Mesh &mesh = *
static_cast<Mesh *
>(
object->data);
2913 batch = DRW_mesh_batch_cache_get_edit_triangles(mesh);
2916 batch = DRW_mesh_batch_cache_get_surface(mesh);
2919 DRW_mesh_batch_cache_create_requested(*task_graph, *
object, mesh, *scene,
false,
true);
2927 GPUUniformBuf *ubo =
nullptr;
2928 if (use_clipping_planes) {
3088#ifdef WITH_DRAW_DEBUG
3139 if (type->draw_engine->engine_free) {
3140 type->draw_engine->engine_free();
3167 DRW_pointcloud_free();
3207 if (re_system_gpu_context !=
nullptr) {
3229 if (re_system_gpu_context !=
nullptr) {
3357#ifdef WITH_XR_OPENXR
3359void *DRW_system_gpu_context_get()
3373void *DRW_xr_blender_gpu_context_get()
3380void DRW_xr_drawing_begin()
3387void DRW_xr_drawing_end()
3402#ifdef WITH_GPU_DRAW_TESTS
Depsgraph * CTX_data_expect_evaluated_depsgraph(const bContext *C)
SpaceLink * CTX_wm_space_data(const bContext *C)
ARegion * CTX_wm_region(const bContext *C)
wmWindowManager * CTX_wm_manager(const bContext *C)
View3D * CTX_wm_view3d(const bContext *C)
void(* BKE_curve_batch_cache_free_cb)(Curve *cu)
void(* BKE_curve_batch_cache_dirty_tag_cb)(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)
Low-level operations for grease pencil that cannot be defined in the C++ header yet.
void(* BKE_grease_pencil_batch_cache_dirty_tag_cb)(GreasePencil *grease_pencil, int mode)
void(* BKE_grease_pencil_batch_cache_free_cb)(GreasePencil *grease_pencil)
void(* BKE_lattice_batch_cache_dirty_tag_cb)(Lattice *lt, int mode)
void(* BKE_lattice_batch_cache_free_cb)(Lattice *lt)
void BKE_view_layer_synced_ensure(const Scene *scene, ViewLayer *view_layer)
#define FOREACH_OBJECT_IN_MODE_END
Object * BKE_view_layer_active_object_get(const ViewLayer *view_layer)
bool BKE_object_is_visible_in_viewport(const View3D *v3d, const Object *ob)
#define FOREACH_OBJECT_IN_MODE_BEGIN(_scene, _view_layer, _v3d, _object_type, _object_mode, _instance)
void(* BKE_mesh_batch_cache_free_cb)(void *batch_cache)
void(* BKE_mesh_batch_cache_dirty_tag_cb)(Mesh *mesh, eMeshBatchDirtyMode mode)
Object * BKE_modifiers_is_deformed_by_armature(Object *ob)
General operations, lookup, etc. for blender objects.
bool BKE_object_is_in_editmode(const Object *ob)
void BKE_object_replace_data_on_shallow_copy(Object *ob, ID *new_data)
Object * BKE_object_pose_armature_get(Object *ob)
int BKE_object_visibility(const Object *ob, int dag_eval_mode)
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)
General operations for point clouds.
void(* BKE_pointcloud_batch_cache_free_cb)(PointCloud *pointcloud)
void(* BKE_pointcloud_batch_cache_dirty_tag_cb)(PointCloud *pointcloud, int mode)
Depsgraph * BKE_scene_get_depsgraph(const Scene *scene, const ViewLayer *view_layer)
SpaceType * BKE_spacetype_from_id(int spaceid)
ARegionType * BKE_regiontype_from_id(const SpaceType *st, int regionid)
void(* BKE_subsurf_modifier_free_gpu_cache_cb)(blender::bke::subdiv::Subdiv *subdiv)
void(* BKE_volume_batch_cache_dirty_tag_cb)(Volume *volume, int mode)
void(* BKE_volume_batch_cache_free_cb)(Volume *volume)
void BLF_draw_default(float x, float y, float z, const char *str, size_t str_len) ATTR_NONNULL()
#define BLI_assert_unreachable()
#define BLI_assert_msg(a, msg)
GSet * BLI_gset_ptr_new(const char *info)
unsigned int BLI_ghashutil_ptrhash(const void *key)
GHash * BLI_ghash_new(GHashHashFP hashfp, GHashCmpFP cmpfp, const char *info) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT
unsigned int BLI_ghashutil_inthash_p_simple(const void *ptr)
bool BLI_ghashutil_intcmp(const void *a, const void *b)
bool BLI_ghash_remove(GHash *gh, const void *key, GHashKeyFreeFP keyfreefp, GHashValFreeFP valfreefp)
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)
void BLI_freelinkN(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
#define LISTBASE_FOREACH_MUTABLE(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 void copy_v3_fl(float r[3], float f)
void BLI_memblock_destroy(BLI_memblock *mblk, MemblockValFreeFP free_callback) ATTR_NONNULL(1)
void * BLI_memblock_alloc(BLI_memblock *mblk) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
#define BLI_memblock_create(elem_size)
BLI_memblock * BLI_memblock_create_ex(uint elem_size, uint chunk_size) ATTR_WARN_UNUSED_RESULT
void BLI_memblock_iternew(BLI_memblock *mblk, BLI_memblock_iter *iter) ATTR_NONNULL()
void BLI_memblock_clear(BLI_memblock *mblk, MemblockValFreeFP free_callback) ATTR_NONNULL(1)
void * BLI_memblock_iterstep(BLI_memblock_iter *iter) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
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 char size_t char const char * BLI_strchr_or_end(const char *str, char ch) ATTR_WARN_UNUSED_RESULT ATTR_RETURNS_NONNULL ATTR_NONNULL(1)
void BLI_task_graph_free(struct TaskGraph *task_graph)
struct TaskGraph * BLI_task_graph_create(void)
void BLI_task_graph_work_and_wait(struct TaskGraph *task_graph)
TicketMutex * BLI_ticket_mutex_alloc(void)
void BLI_ticket_mutex_unlock(TicketMutex *ticket)
bool BLI_ticket_mutex_lock_check_recursive(TicketMutex *ticket)
void BLI_ticket_mutex_lock(TicketMutex *ticket)
void BLI_ticket_mutex_free(TicketMutex *ticket)
int BLI_thread_is_main(void)
double BLI_time_now_seconds(void)
#define POINTER_FROM_UINT(i)
#define CLOG_ERROR(clg_ref,...)
#define DEG_OBJECT_ITER_BEGIN(settings_, instance_)
#define DEG_OBJECT_ITER_END
Scene * DEG_get_evaluated_scene(const Depsgraph *graph)
ViewLayer * DEG_get_evaluated_view_layer(const Depsgraph *graph)
#define DEG_OBJECT_ITER_FOR_RENDER_ENGINE_FLAGS
Scene * DEG_get_input_scene(const Depsgraph *graph)
bool DEG_id_type_any_exists(const Depsgraph *depsgraph, short id_type)
void(* DrawDataFreeCb)(struct DrawData *engine_data)
void(* DrawDataInitCb)(struct DrawData *engine_data)
@ BASE_ENABLED_AND_VISIBLE_IN_DEFAULT_VIEWPORT
@ BASE_ENABLED_AND_MAYBE_VISIBLE_IN_VIEWPORT
#define OB_MODE_ALL_WEIGHT_PAINT
#define OBPOSE_FROM_OBACT(ob)
#define BASE_SELECTED(v3d, base)
#define OBEDIT_FROM_OBACT(ob)
#define OBWEIGHTPAINT_FROM_OBACT(ob)
#define BASE_SELECTABLE(v3d, base)
@ V3D_SHADING_USE_COMPOSITOR_CAMERA
@ V3D_SHADING_USE_COMPOSITOR_DISABLED
#define RV3D_LOCK_FLAGS(rv3d)
#define RV3D_CLIPPING_ENABLED(v3d, rv3d)
@ V3D_OVERLAY_BONE_SELECT
@ V3D_SHADING_SCENE_WORLD_RENDER
@ V3D_SHADING_SCENE_WORLD
@ V3D_XR_SHOW_CUSTOM_OVERLAYS
@ V3D_XR_SHOW_CONTROLLERS
void DRW_instance_data_list_free(DRWInstanceDataList *idatalist)
DRWInstanceDataList * DRW_instance_data_list_create()
bool(*)(Object *ob, void *user_data) DRW_ObjectFilterFn
bool(*)(eDRWSelectStage stage, void *user_data) DRW_SelectPassFn
void DRW_uniform_attrs_pool_free(GHash *table)
#define DRW_UBO_FREE_SAFE(ubo)
#define DRW_TEXTURE_FREE_SAFE(tex)
const rcti * ED_region_visible_rect(ARegion *region)
void ED_region_pixelspace(const ARegion *region)
bScreen * ED_screen_animation_playing(const wmWindowManager *wm)
void ED_region_draw_cb_draw(const bContext *C, ARegion *region, int type)
#define REGION_DRAW_POST_VIEW
void ED_region_surface_draw_cb_draw(ARegionType *art, int type)
#define REGION_DRAW_PRE_VIEW
#define XRAY_ENABLED(v3d)
#define RETOPOLOGY_ENABLED(v3d)
void ED_view3d_init_mats_rv3d(const Object *ob, RegionView3D *rv3d)
void ED_view3d_clipping_local(RegionView3D *rv3d, const float mat[4][4])
RenderEngineType * ED_view3d_engine_type(const Scene *scene, int drawtype)
#define GPU_batch_uniformbuf_bind(batch, name, ubo)
void GPU_batch_draw(blender::gpu::Batch *batch)
void GPU_batch_program_set_builtin_with_config(blender::gpu::Batch *batch, eGPUBuiltinShader shader_id, eGPUShaderConfig sh_cfg)
bool GPU_use_main_context_workaround()
GPUContext * GPU_context_create(void *ghost_window, void *ghost_context)
void GPU_context_main_lock()
GPUContext * GPU_context_active_get()
void GPU_context_main_unlock()
void GPU_context_discard(GPUContext *)
void GPU_context_active_set(GPUContext *)
eGPUBackendType GPU_backend_get_type()
GPUDrawList * GPU_draw_list_create(int list_length)
void GPU_draw_list_discard(GPUDrawList *list)
bool GPU_framebuffer_check_valid(GPUFrameBuffer *framebuffer, char err_out[256])
GPUFrameBuffer * GPU_framebuffer_create(const char *name)
#define GPU_FRAMEBUFFER_FREE_SAFE(fb)
#define GPU_ATTACHMENT_TEXTURE(_texture)
GPUFrameBuffer * GPU_framebuffer_active_get()
void GPU_offscreen_bind(GPUOffScreen *offscreen, bool save)
void GPU_framebuffer_restore()
void GPU_framebuffer_clear_depth_stencil(GPUFrameBuffer *fb, float clear_depth, uint clear_stencil)
#define GPU_ATTACHMENT_NONE
void GPU_clear_color(float red, float green, float blue, float alpha)
void GPU_framebuffer_bind(GPUFrameBuffer *framebuffer)
#define GPU_framebuffer_ensure_config(_fb,...)
void GPU_framebuffer_clear_depth(GPUFrameBuffer *fb, float clear_depth)
void GPU_framebuffer_free(GPUFrameBuffer *framebuffer)
GPUFrameBuffer * GPU_framebuffer_back_get()
void GPU_framebuffer_texture_attach(GPUFrameBuffer *framebuffer, GPUTexture *texture, int slot, int mip)
void GPU_matrix_identity_projection_set()
void GPU_matrix_identity_set()
#define GPU_matrix_set(x)
void GPU_matrix_push_projection()
#define GPU_matrix_mul(x)
void GPU_matrix_pop_projection()
#define GPU_matrix_projection_set(x)
@ GPU_SHADER_3D_DEPTH_ONLY
@ GPU_BLEND_ALPHA_PREMULT
void GPU_blend(eGPUBlend blend)
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 *texture)
GPUTexture * GPU_texture_create_2d(const char *name, int width, int height, int mip_len, eGPUTextureFormat format, eGPUTextureUsage usage, const float *data)
void GPU_texture_free(GPUTexture *texture)
int GPU_texture_width(const GPUTexture *texture)
@ GPU_TEXTURE_USAGE_SHADER_READ
@ GPU_TEXTURE_USAGE_ATTACHMENT
GPUTexture * GPU_viewport_color_texture(GPUViewport *viewport, int view)
void GPU_viewport_unbind_from_offscreen(GPUViewport *viewport, GPUOffScreen *ofs, bool display_colorspace, bool do_overlay_merge)
GPUViewport * GPU_viewport_create()
void GPU_viewport_bind_from_offscreen(GPUViewport *viewport, GPUOffScreen *ofs, bool is_xr_surface)
bool GPU_viewport_is_stereo_get(GPUViewport *viewport)
bool GPU_viewport_do_update(GPUViewport *viewport)
int GPU_viewport_active_view_get(GPUViewport *viewport)
void GPU_viewport_free(GPUViewport *viewport)
GPUTexture * GPU_viewport_depth_texture(GPUViewport *viewport)
void GPU_viewport_tag_update(GPUViewport *viewport)
DRWData ** GPU_viewport_data_get(GPUViewport *viewport)
void UI_SetTheme(int spacetype, int regionid)
void ED_annotation_draw_view3d(Scene *scene, Depsgraph *depsgraph, View3D *v3d, ARegion *region, bool only3d)
void ED_annotation_draw_view2d(const bContext *C, bool onlyv2d)
DrawEngineType draw_engine_basic_type
struct GPUContext GPUContext
DrawEngineType draw_engine_compositor_type
const Depsgraph * depsgraph
DEGForeachIDComponentCallback callback
void drw_batch_cache_generate_requested_evaluated_mesh_or_curve(Object *ob)
void DRW_shape_cache_free()
void drw_batch_cache_generate_requested(Object *ob)
void drw_batch_cache_validate(Object *ob)
void DRW_viewport_colormanagement_set(GPUViewport *viewport)
void DRW_globals_update()
void DRW_volume_ubos_pool_free(void *pool)
void DRW_volume_init(DRWData *drw_data)
void DRW_smoke_exit(DRWData *drw_data)
void DRW_smoke_init(DRWData *drw_data)
void drw_debug_module_free(DRWDebugModule *module)
void DRW_instance_data_list_free_unused(DRWInstanceDataList *idatalist)
void DRW_instance_buffer_finish(DRWInstanceDataList *idatalist)
void DRW_uniform_attrs_pool_clear_all(GHash *table)
void * DRW_instance_data_next(DRWInstanceData *idata)
GHash * DRW_uniform_attrs_pool_new()
void DRW_instance_data_list_reset(DRWInstanceDataList *idatalist)
DRWInstanceData * DRW_instance_data_request(DRWInstanceDataList *idatalist, uint attr_size)
void DRW_instance_data_list_resize(DRWInstanceDataList *idatalist)
#define MAX_INSTANCE_DATA_SIZE
Object * DRW_object_get_dupli_parent(const Object *)
void DRW_drawdata_free(ID *id)
void DRW_gpu_context_destroy()
DrawData * DRW_drawdata_get(ID *id, DrawEngineType *engine_type)
static void drw_notify_view_update_offscreen(Depsgraph *depsgraph, RenderEngineType *engine_type, ARegion *region, View3D *v3d, GPUViewport *viewport)
static void drw_engines_cache_finish()
const float * DRW_viewport_invert_size_get()
static void drw_duplidata_load(Object *ob)
void DRW_draw_render_loop_ex(Depsgraph *depsgraph, RenderEngineType *engine_type, ARegion *region, View3D *v3d, GPUViewport *viewport, const bContext *evil_C)
const float * DRW_viewport_pixelsize_get()
bool DRW_state_show_text()
bool DRW_render_check_grease_pencil(Depsgraph *depsgraph)
DRWData * DRW_viewport_data_create()
static void drw_engines_world_update(Scene *scene)
static bool drw_draw_show_annotation()
void DRW_draw_region_engine_info(int xoffset, int *yoffset, int line_height)
bool DRW_draw_in_progress()
bool DRW_state_draw_background()
void DRW_draw_view(const bContext *C)
static void draw_unit_state_create()
void * DRW_view_layer_engine_data_get(DrawEngineType *engine_type)
static void drw_manager_exit(DRWManager *dst)
void DRW_draw_render_loop(Depsgraph *depsgraph, ARegion *region, View3D *v3d, GPUViewport *viewport)
bool DRW_state_is_viewport_image_render()
bool DRW_engine_render_support(DrawEngineType *draw_engine_type)
static void drw_manager_init(DRWManager *dst, GPUViewport *viewport, const int size[2])
DefaultFramebufferList * DRW_viewport_framebuffer_list_get()
void DRW_notify_view_update(const DRWUpdateContext *update_ctx)
static void drw_engines_init()
bool DRW_object_is_in_edit_mode(const Object *ob)
bool DRW_state_is_material_select()
blender::draw::TextureFromPool & DRW_viewport_pass_texture_get(const char *pass_name)
void DRW_render_viewport_size_set(const int size[2])
void ** DRW_view_layer_engine_data_ensure_ex(ViewLayer *view_layer, DrawEngineType *engine_type, void(*callback)(void *storage))
void DRW_gpu_context_disable()
static void duplidata_value_free(void *val)
const float * DRW_viewport_size_get()
static DRWData * drw_viewport_data_ensure(GPUViewport *viewport)
static void use_drw_engine(DrawEngineType *engine)
void DRW_gpu_context_disable_ex(bool restore)
bool DRW_object_use_hide_faces(const Object *ob)
static void drw_state_prepare_clean_for_draw(DRWManager *dst)
void DRW_draw_callbacks_pre_scene()
static void draw_prune_vlattrs(DRWData *drw_data)
static void drw_context_state_init()
bool DRW_object_is_renderable(const Object *ob)
DRWTextStore * DRW_text_cache_ensure()
static void drw_engines_enable_editors()
DrawData * DRW_drawdata_ensure(ID *id, DrawEngineType *engine_type, size_t size, DrawDataInitCb init_cb, DrawDataFreeCb free_cb)
void DRW_cache_free_old_batches(Main *bmain)
void DRW_gpu_context_enable_ex(bool)
void DRW_draw_depth_loop(Depsgraph *depsgraph, ARegion *region, View3D *v3d, GPUViewport *viewport, const bool use_gpencil, const bool use_basic, const bool use_overlay, const bool use_only_selected)
void DRW_system_gpu_render_context_enable(void *re_system_gpu_context)
void DRW_gpu_context_enable()
void DRW_render_instance_buffer_finish()
void DRW_gpu_context_create()
void DRW_draw_depth_object(Scene *scene, ARegion *region, View3D *v3d, GPUViewport *viewport, Object *object)
static void drw_task_graph_deinit()
void DRW_custom_pipeline(DrawEngineType *draw_engine_type, Depsgraph *depsgraph, void(*callback)(void *vedata, void *user_data), void *user_data)
int DRW_object_visibility_in_active_context(const Object *ob)
static uint dupli_key_hash(const void *key)
void DRW_gpu_context_activate(bool drw_state)
bool DRW_state_is_image_render()
bool DRW_state_is_painting()
void DRW_render_context_disable(Render *render)
static void drw_engines_cache_init()
void DRW_blender_gpu_render_context_disable(void *)
bool DRW_state_is_scene_render()
static void drw_engines_data_validate()
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(Depsgraph *depsgraph, ARegion *region, View3D *v3d, bool use_obedit_skip, bool draw_surface, bool, 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)
void DRW_viewport_data_free(DRWData *drw_data)
void DRW_draw_render_loop_offscreen(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)
DefaultTextureList * DRW_viewport_texture_list_get()
static void drw_engines_enable_from_engine(const RenderEngineType *engine_type, eDrawType drawtype)
void DRW_render_to_image(RenderEngine *engine, Depsgraph *depsgraph)
static void drw_registered_engines_free()
static void drw_engines_enable_overlays()
void ** DRW_view_layer_engine_data_ensure(DrawEngineType *engine_type, void(*callback)(void *storage))
void DRW_system_gpu_render_context_disable(void *re_system_gpu_context)
static void duplidata_key_free(void *key)
DrawDataList * DRW_drawdatalist_from_id(ID *id)
static bool drw_gpencil_engine_needed(Depsgraph *depsgraph, View3D *v3d)
void DRW_engine_register(DrawEngineType *draw_engine_type)
void ** DRW_duplidata_get(void *vedata)
static void drw_task_graph_init()
void DRW_draw_render_loop_2d_ex(Depsgraph *depsgraph, ARegion *region, GPUViewport *viewport, const bContext *evil_C)
static struct DRWSelectBuffer g_select_buffer
void DRW_draw_select_id(Depsgraph *depsgraph, ARegion *region, View3D *v3d)
void DRW_render_set_time(RenderEngine *engine, Depsgraph *depsgraph, int frame, float subframe)
const DRWContextState * DRW_context_state_get()
bool DRW_state_draw_support()
void DRW_render_gpencil(RenderEngine *engine, Depsgraph *depsgraph)
void DRW_draw_callbacks_post_scene()
static void DRW_render_gpencil_to_image(RenderEngine *engine, RenderLayer *render_layer, const rcti *rect)
bool DRW_gpu_context_release()
void DRW_engines_register()
DupliObject * DRW_object_get_dupli(const Object *)
bool DRW_is_viewport_compositor_enabled()
void DRW_viewport_request_redraw()
void DRW_custom_pipeline_end()
static bool id_can_have_drawdata(const ID *id)
void DRW_render_object_iter(void *vedata, RenderEngine *engine, Depsgraph *depsgraph, void(*callback)(void *vedata, Object *ob, RenderEngine *engine, Depsgraph *depsgraph))
static bool dupli_key_cmp(const void *key1, const void *key2)
void DRW_render_context_enable(Render *render)
bool DRW_state_is_select()
static void drw_duplidata_free()
static void drw_engines_disable()
static void draw_select_framebuffer_depth_only_setup(const int size[2])
static void drw_engines_draw_text()
static void drw_state_ensure_not_reused(DRWManager *dst)
static void drw_viewport_data_reset(DRWData *drw_data)
static void draw_texture_release(DRWData *drw_data)
bool DRW_state_is_navigating()
static void drw_engines_enable_basic()
bool DRW_state_is_playback()
static void drw_engines_draw_scene()
void DRW_custom_pipeline_begin(DrawEngineType *draw_engine_type, Depsgraph *depsgraph)
bool DRW_state_is_depth()
static void drw_engines_enable(ViewLayer *, RenderEngineType *engine_type, bool gpencil_engine_needed)
static void drw_drawdata_unlink_dupli(ID *id)
void DRW_blender_gpu_render_context_enable(void *re_gpu_context)
static void drw_engine_enable_image_editor()
static struct @275 g_registered_engines
static bool id_type_can_have_drawdata(const short id_type)
void drw_resource_buffer_finish(DRWData *vmempool)
void DRW_manager_end_sync()
#define PROFILE_END_UPDATE(time_update, time_start)
#define PROFILE_START(time_start)
#define DRW_RESOURCE_CHUNK_LEN
BLI_INLINE void DRW_handle_increment(DRWResourceHandle *handle)
void DRW_manager_begin_sync()
void DRW_view_clip_planes_set(DRWView *view, float(*planes)[4], int plane_len)
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_state_lock(DRWState state)
void DRW_select_load_id(uint id)
void DRW_stats_group_start(const char *name)
void DRW_stats_group_end()
void DRW_stats_draw(const rcti *rect)
DRWTextStore * DRW_text_cache_create()
void DRW_text_cache_draw(DRWTextStore *dt, ARegion *region, View3D *v3d)
void DRW_text_cache_destroy(DRWTextStore *dt)
#define DRW_STATE_DEPTH_TEST_ENABLED
void DRW_texture_pool_free(DRWTexturePool *pool)
DRWTexturePool * DRW_texture_pool_create()
void DRW_texture_pool_reset(DRWTexturePool *pool)
void DRW_draw_region_info()
void DRW_draw_cursor_2d()
void DRW_view_data_use_engine(DRWViewData *view_data, DrawEngineType *engine_type)
void DRW_view_data_free(DRWViewData *view_data)
void DRW_view_data_default_lists_from_viewport(DRWViewData *view_data, GPUViewport *viewport)
DefaultFramebufferList * DRW_view_data_default_framebuffer_list_get(DRWViewData *view_data)
DefaultTextureList * DRW_view_data_default_texture_list_get(DRWViewData *view_data)
void DRW_view_data_engines_view_update(DRWViewData *view_data)
draw::TextureFromPool & DRW_view_data_pass_texture_get(DRWViewData *view_data, const char *pass_name)
double * DRW_view_data_cache_time_get(DRWViewData *view_data)
DRWViewData * DRW_view_data_create(ListBase *engine_types)
void DRW_view_data_texture_list_size_validate(DRWViewData *view_data, const int size[2])
void DRW_view_data_reset(DRWViewData *view_data)
ViewportEngineData * DRW_view_data_engine_data_get_ensure(DRWViewData *view_data, DrawEngineType *engine_type)
void DRW_view_data_free_unused(DRWViewData *view_data)
#define DRW_ENABLED_ENGINE_ITER(view_data_, engine_, data_)
RenderEngineType DRW_engine_viewport_eevee_next_type
draw_view in_light_buf[] float
draw_view push_constant(Type::INT, "radiance_src") .push_constant(Type capture_info_buf storage_buf(1, Qualifier::READ, "ObjectBounds", "bounds_buf[]") .push_constant(Type draw_view int
RenderEngineType DRW_engine_viewport_external_type
bool DRW_engine_external_acquire_for_image_editor()
DrawEngineType draw_engine_external_type
DrawEngineType draw_engine_gpencil_type
DrawEngineType draw_engine_image_type
void RE_GetViewPlane(Render *re, rctf *r_viewplane, rcti *r_disprect)
void RE_engine_frame_set(RenderEngine *engine, int frame, float subframe)
RenderResult * RE_engine_begin_result(RenderEngine *engine, int x, int y, int w, int h, const char *layername, const char *viewname)
RenderResult * RE_engine_get_result(RenderEngine *engine)
void RE_engines_register(RenderEngineType *render_type)
void RE_engine_end_result(RenderEngine *engine, RenderResult *result, bool cancel, bool highlight, bool merge_results)
void *(* MEM_mallocN)(size_t len, const char *str)
void MEM_freeN(void *vmemh)
void *(* MEM_callocN)(size_t len, const char *str)
DrawEngineType draw_engine_overlay_type
DrawEngineType draw_engine_overlay_next_type
DrawEngineType draw_engine_debug_select_type
DrawEngineType draw_engine_select_type
SELECTID_Context * DRW_select_engine_context_get()
DrawEngineType draw_engine_select_next_type
static void draw_background()
void * RE_blender_gpu_context_ensure(Render *re)
void * RE_system_gpu_context_get(Render *re)
RenderLayer * RE_GetRenderLayer(RenderResult *rr, const char *name)
void RE_SetActiveRenderView(Render *re, const char *viewname)
const ViewerPath * viewer_path
RenderEngineType * engine_type
GPUUniformBuf ** obinfos_ubo
BLI_memblock * cullstates
GHash * vlattrs_name_cache
DRWInstanceDataList * idatalist
ListBase vlattrs_name_list
GPUUniformBuf * vlattrs_ubo
BLI_memblock * callbuffers
DRWTexturePool * texture_pool
BLI_memblock * commands_small
LayerAttribute * vlattrs_buf
blender::draw::CurvesUniformBufPool * curves_ubos
GPUUniformBuf ** matrices_ubo
DRWViewData * view_data[2]
DRWResourceHandle ob_handle
DRWResourceHandle pass_handle
GSet * delayed_extraction
bool buffer_finish_called
DRWResourceHandle resource_handle
DRWTextStore ** text_store_p
GPUContext * blender_gpu_context
DupliObject * dupli_source
DRWInstanceData * object_instance_data[MAX_INSTANCE_DATA_SIZE]
GPUFrameBuffer * default_framebuffer
struct DRWManager::@295 options
TicketMutex * system_gpu_context_mutex
void * system_gpu_context
DRWViewData * view_data_active
DrawEngineType * draw_engine
GPUTexture * texture_depth
GPUFrameBuffer * framebuffer_depth_only
RenderEngineType * engine_type
GPUUniformBuf * clipping_ubo
GPUUniformBuf * block_ubo
GPUFrameBuffer * overlay_fb
GPUFrameBuffer * default_fb
struct DrawEngineType * engine_type
void(* render_to_image)(void *vedata, RenderEngine *engine, RenderLayer *layer, const rcti *rect)
void(* store_metadata)(void *vedata, RenderResult *render_result)
ObjectRuntimeHandle * runtime
struct PointCache * pointcache
struct DrawEngineType * draw_engine
blender::Array< Object * > objects
struct bNodeTree * nodetree
int object_type_exclude_select
int object_type_exclude_viewport
struct DrawEngineType * engine_type
void(* free)(void *storage)
DRWRegisteredDrawEngine * engine_type
GPUViewport * WM_draw_region_get_viewport(ARegion *region)
GPUViewport * WM_draw_region_get_bound_viewport(ARegion *region)
void wmOrtho2(float x1, float x2, float y1, float y2)
void * WM_system_gpu_context_create()
void wm_window_reset_drawable()
void WM_system_gpu_context_dispose(void *context)
void WM_system_gpu_context_activate(void *context)
void WM_system_gpu_context_release(void *context)
ARegionType * WM_xr_surface_controller_region_type_get()
RenderEngineType DRW_engine_viewport_workbench_type