114thread_local DRWContext *DRWContext::g_context =
nullptr;
127 this->inv_size = 1.0f / this->size;
138 if (this->v3d !=
nullptr && this->region !=
nullptr) {
149 this->object_pose = this->obact;
155 this->object_pose =
nullptr;
162 if (this->object_edit && rv3d) {
216 if (space_data !=
nullptr) {
244 static thread_local TaskGraph *task_graph_ptr_;
258 if (delayed_extraction) {
259 task_graph_ptr_ =
graph;
260 BLI_gset_free(delayed_extraction, delayed_extraction_free_callback);
261 task_graph_ptr_ =
nullptr;
262 delayed_extraction =
nullptr;
271 static void delayed_extraction_free_callback(
void *
object)
274 reinterpret_cast<Object *
>(
object), *task_graph_ptr_);
278thread_local TaskGraph *ExtractionGraph::task_graph_ptr_ =
nullptr;
379 if (cage_mesh ==
nullptr) {
401 for (
int i = 0;
i < 2;
i++) {
429 for (
int i = 0;
i < 2;
i++) {
444 if (
data ==
nullptr) {
481 if (this->
rv3d !=
nullptr) {
485 else if (this->region) {
488 rctf region_space = {0.0f, 1.0f, 0.0f, 1.0f};
494 winmat[0][0] = winmat[1][1] = 2.0f;
495 winmat[3][0] = winmat[3][1] = -1.0f;
507 this->
data->modules_init();
514 this->
data->modules_exit();
521 if (this->
data !=
nullptr && this->
viewport ==
nullptr) {
524 this->
data =
nullptr;
531 pass_name, [&]() {
return std::make_unique<blender::draw::TextureFromPool>(pass_name); });
557 ID *ob_data =
nullptr;
559 DupliKey() =
default;
567 friend bool operator==(
const DupliKey &a,
const DupliKey &
b)
569 return a.ob ==
b.ob && a.ob_data ==
b.ob_data;
575 DupliKey last_key_ = {};
590 if (last_key_ == ob_ref.dupli_object_) {
595 last_key_ = ob_ref.dupli_object_;
597 if (dupli_set_ ==
nullptr) {
598 dupli_set_ = MEM_new<blender::Set<DupliKey>>(
"DupliCacheManager::dupli_set_");
601 if (dupli_set_->add(last_key_)) {
618 if (dupli_set_ ==
nullptr) {
628 Iter
begin = dupli_set_->begin();
629 Iter end = dupli_set_->end();
630 for (Iter iter =
begin; iter != end; ++iter) {
631 const DupliKey &key = *iter;
634 if (key.ob_data != ob->
data) {
637 tmp_object = blender::dna::shallow_copy(*ob);
638 tmp_object.
runtime = &tmp_runtime;
651 MEM_SAFE_DELETE(dupli_set_);
663 : dupli_object_(dupli_object), dupli_parent_(dupli_parent),
object(ob)
668 : dupli_object_(duplis[0]), dupli_parent_(dupli_parent), duplis_(&duplis),
object(&ob)
698 const int draw_as = (psys->part->draw_as ==
PART_DRAW_REND) ? psys->part->ren_as :
812 if (ob_visible && should_draw_object_cb(*ob)) {
815 ObjectRef ob_ref(ob, data_.dupli_parent, data_.dupli_object_current);
816 draw_object_cb(ob_ref);
819 bool is_preview_dupli = data_.dupli_parent && data_.dupli_object_current;
820 if (is_preview_dupli) {
828 ob->runtime->geometry_set_eval !=
nullptr);
830 if (!instances_visible) {
853 if (!should_draw_object_cb(*dupli.ob)) {
861 ob, &dupli, eval_mode,
false, &tmp_object, &tmp_runtime) ||
862 !should_draw_object_cb(tmp_object))
874 draw_object_cb(ob_ref);
887 dupli.preview_base_geometry,
888 dupli.preview_instance_index);
893 for (
const auto &[key, instances] : dupli_map.
items()) {
896 ob, first_dupli, eval_mode,
false, &tmp_object, &tmp_runtime) ||
897 !should_draw_object_cb(tmp_object))
911 draw_object_cb(ob_ref);
931 static int lasttime = 0;
934 if (
U.vbotimeout == 0 || (ctime - lasttime) <
U.vbocollectrate || ctime == lasttime) {
994 data->modules_begin_sync();
1000 iter_callback(dupli_handler, extraction);
1016 sync(iter_callback);
1053 if (instance.
info[0] !=
'\0') {
1054 const char *buf_step =
IFACE_(instance.
info);
1056 const char *buf = buf_step;
1058 const int buf_len = buf_step - buf;
1059 *yoffset -= line_height;
1061 }
while (*buf_step ? ((
void)buf_step++,
true) :
false);
1138 if ((drawtype >=
OB_SOLID) || !use_xray) {
1146#ifdef WITH_DRAW_DEBUG
1147 if (
G.debug_value == 31) {
1148 view_data.edit_select_debug.set_used(
true);
1224 if (do_annotations) {
1237#ifdef WITH_XR_OPENXR
1296#ifdef WITH_XR_OPENXR
1372 if (do_annotations) {
1387 if (do_annotations) {
1394 if (do_draw_gizmos) {
1435 const bool do_populate_loop = internal_engine || overlays_on || !draw_type_render ||
1436 gpencil_engine_needed;
1438 auto should_draw_object = [&](
Object &ob) ->
bool {
1446 if (do_populate_loop) {
1485 if (do_populate_loop) {
1545 const bool is_image_render,
1547 const bool do_color_management,
1555 if (viewport ==
nullptr) {
1566 BLI_assert(is_xr_surface == !is_image_render);
1604 if (viewport ==
nullptr) {
1641 if (render_layer ==
nullptr) {
1662 render_view !=
nullptr;
1663 render_view = render_view->
next)
1729 render_view !=
nullptr;
1730 render_view = render_view->
next)
1733 render_view_cb(engine, render_layer, render_rect);
1761 auto should_draw_object = [&](
Object &ob) ->
bool {
1851 blender::gpu::TextureFormat::SFLOAT_32_DEPTH,
1865 bool use_obedit_skip,
1868 const bool do_material_sub_selection,
1871 void *select_pass_user_data,
1873 void *object_filter_user_data)
1883 bool use_obedit =
false;
1889 eObjectMode object_mode = eObjectMode::OB_MODE_EDIT;
1890 int object_type = 0;
1891 if (obedit !=
nullptr) {
1892 object_type = obedit->
type;
1913 if (obpose ==
nullptr) {
1919 obpose = ob_armature;
1926 object_type = obpose->
type;
1933 bool use_gpencil = !use_obedit && !draw_surface &&
1948 ob_iter->runtime->select_id =
DEG_get_original(ob_iter)->runtime->select_id;
1958 const bool use_pose_exception = (draw_ctx.
object_pose !=
nullptr);
1961 bool filter_exclude =
false;
1963 auto should_draw_object = [&](
Object &ob) {
1978 if ((object_type_exclude_select & (1 << ob.type)) == 0) {
1979 if (object_filter_fn !=
nullptr) {
1984 filter_exclude = (object_filter_fn(&ob, object_filter_user_data) ==
false);
1986 if (filter_exclude) {
2035 const bool use_gpencil,
2036 const bool use_only_selected,
2037 const bool use_only_active_object)
2050 auto should_draw_object = [&](
Object &ob) {
2060 if (use_only_active_object) {
2118 auto should_draw_object = [&](
Object &ob) {
2163 if (this->
evil_C !=
nullptr) {
2199 if (!this->
scene->compositing_node_group) {
2236#ifdef WITH_DRAW_DEBUG
2237 blender::draw::edit_select_debug::Engine::free_static();
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)
blender::VectorList< DupliObject > DupliList
void object_duplilist(Depsgraph *depsgraph, Scene *sce, Object *ob, blender::Set< const Object * > *include_objects, DupliList &r_duplilist)
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)
Mesh * BKE_mesh_wrapper_ensure_subdivision(Mesh *mesh)
ModifierData * BKE_modifiers_findby_type(const Object *ob, ModifierType type)
Object * BKE_modifiers_is_deformed_by_armature(Object *ob)
General operations, lookup, etc. for blender objects.
const Mesh * BKE_object_get_editmesh_eval_cage(const Object *object)
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_obdata_to_type(const ID *id) ATTR_NONNULL(1)
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)
bool BKE_scene_uses_blender_workbench(const Scene *scene)
SpaceType * BKE_spacetype_from_id(int spaceid)
ARegionType * BKE_regiontype_from_id(const SpaceType *st, int regionid)
bool BKE_subsurf_modifier_has_gpu_subdiv(const Mesh *mesh)
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)
void BLI_gset_free(GSet *gs, GSetKeyFreeFP keyfreefp)
#define LISTBASE_FOREACH(type, var, list)
bool is_negative_m4(const float mat[4][4])
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)
Platform independent time functions.
double BLI_time_now_seconds(void)
#define ENUM_OPERATORS(_type, _max)
#define UNUSED_VARS_NDEBUG(...)
#define SET_FLAG_FROM_TEST(value, test, flag)
#define DEG_OBJECT_ITER_BEGIN(settings_, instance_)
bool DEG_iterator_dupli_is_visible(const DupliObject *dupli, eEvaluationMode eval_mode)
#define DEG_OBJECT_ITER_END
Scene * DEG_get_evaluated_scene(const Depsgraph *graph)
eEvaluationMode DEG_get_mode(const Depsgraph *graph)
ViewLayer * DEG_get_evaluated_view_layer(const Depsgraph *graph)
#define DEG_OBJECT_ITER_FOR_RENDER_ENGINE_FLAGS
bool DEG_iterator_object_is_visible(eEvaluationMode eval_mode, const Object *ob)
T * DEG_get_original(T *id)
Scene * DEG_get_input_scene(const Depsgraph *graph)
bool DEG_id_type_any_exists(const Depsgraph *depsgraph, short id_type)
@ DEG_ITER_OBJECT_FLAG_LINKED_DIRECTLY
@ DEG_ITER_OBJECT_FLAG_LINKED_VIA_SET
@ GREASE_PENCIL_STROKE_ORDER_3D
@ BASE_ENABLED_AND_VISIBLE_IN_DEFAULT_VIEWPORT
@ BASE_ENABLED_AND_MAYBE_VISIBLE_IN_VIEWPORT
#define OB_MODE_ALL_WEIGHT_PAINT
struct ObjectRuntimeHandle ObjectRuntimeHandle
#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
@ V3D_XR_SHOW_CUSTOM_OVERLAYS
@ V3D_XR_SHOW_CONTROLLERS
@ V3D_SHADING_SCENE_WORLD_RENDER
@ V3D_SHADING_SCENE_WORLD
@ V3D_OVERLAY_BONE_SELECT
void DRW_submission_end()
bool DRW_render_check_grease_pencil(Depsgraph *depsgraph)
DRWData * DRW_viewport_data_create()
void DRW_draw_region_engine_info(int xoffset, int *yoffset, int line_height)
bool DRW_draw_in_progress()
void DRW_draw_view(const bContext *C)
bool DRW_gpencil_engine_needed_viewport(Depsgraph *depsgraph, View3D *v3d)
bool(*)(Object *ob, void *user_data) DRW_ObjectFilterFn
void DRW_draw_depth_loop(Depsgraph *depsgraph, ARegion *region, View3D *v3d, GPUViewport *viewport, const bool use_gpencil, const bool use_only_selected, const bool use_only_active_object)
void DRW_cache_free_old_batches(Main *bmain)
void DRW_draw_render_loop_offscreen(Depsgraph *depsgraph, RenderEngineType *engine_type, ARegion *region, View3D *v3d, bool is_image_render, bool draw_background, bool do_color_management, GPUOffScreen *ofs, GPUViewport *viewport)
void DRW_draw_select_loop(Depsgraph *depsgraph, ARegion *region, View3D *v3d, bool use_obedit_skip, bool draw_surface, bool use_nearest, 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_render_context_disable(Render *render)
void DRW_viewport_data_free(DRWData *drw_data)
void DRW_submission_start()
void DRW_draw_select_id(Depsgraph *depsgraph, ARegion *region, View3D *v3d)
void DRW_render_gpencil(RenderEngine *engine, Depsgraph *depsgraph)
void DRW_engines_register()
void DRW_render_context_enable(Render *render)
bool(*)(eDRWSelectStage stage, void *user_data) DRW_SelectPassFn
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)
RenderEngineType * ED_view3d_engine_type(const Scene *scene, int drawtype)
GPUContext * GPU_context_active_get()
GPUBackendType GPU_backend_get_type()
void GPU_debug_group_end()
void GPU_debug_group_begin(const char *name)
blender::gpu::FrameBuffer * GPU_framebuffer_create(const char *name)
#define GPU_FRAMEBUFFER_FREE_SAFE(fb)
#define GPU_ATTACHMENT_TEXTURE(_texture)
void GPU_offscreen_bind(GPUOffScreen *offscreen, bool save)
void GPU_framebuffer_restore()
void GPU_framebuffer_clear_depth_stencil(blender::gpu::FrameBuffer *fb, float clear_depth, uint clear_stencil)
blender::gpu::FrameBuffer * GPU_framebuffer_back_get()
#define GPU_ATTACHMENT_NONE
void GPU_framebuffer_free(blender::gpu::FrameBuffer *fb)
void GPU_framebuffer_texture_attach(blender::gpu::FrameBuffer *fb, blender::gpu::Texture *texture, int slot, int mip)
void GPU_clear_color(float red, float green, float blue, float alpha)
bool GPU_framebuffer_check_valid(blender::gpu::FrameBuffer *fb, char err_out[256])
void GPU_framebuffer_clear_depth(blender::gpu::FrameBuffer *fb, float clear_depth)
#define GPU_framebuffer_ensure_config(_fb,...)
void GPU_framebuffer_bind(blender::gpu::FrameBuffer *fb)
blender::gpu::FrameBuffer * GPU_framebuffer_active_get()
void GPU_matrix_identity_projection_set()
void GPU_matrix_identity_set()
#define GPU_matrix_set(x)
void GPU_matrix_push_projection()
void GPU_matrix_pop_projection()
#define GPU_matrix_projection_set(x)
@ GPU_BLEND_ALPHA_PREMULT
void GPU_blend(GPUBlend blend)
void GPU_depth_test(GPUDepthTest test)
void GPU_viewport(int x, int y, int width, int height)
int GPU_texture_height(const blender::gpu::Texture *texture)
int GPU_texture_width(const blender::gpu::Texture *texture)
@ GPU_TEXTURE_USAGE_SHADER_READ
@ GPU_TEXTURE_USAGE_ATTACHMENT
#define GPU_TEXTURE_FREE_SAFE(texture)
blender::gpu::Texture * GPU_texture_create_2d(const char *name, int width, int height, int mip_len, blender::gpu::TextureFormat format, eGPUTextureUsage usage, const float *data)
void GPU_texture_free(blender::gpu::Texture *texture)
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)
int GPU_viewport_active_view_get(GPUViewport *viewport)
void GPU_viewport_free(GPUViewport *viewport)
void GPU_viewport_tag_update(GPUViewport *viewport)
blender::gpu::Texture * GPU_viewport_color_texture(GPUViewport *viewport, int view)
blender::gpu::Texture * GPU_viewport_depth_texture(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)
bool operator==(const AssetWeakReference &a, const AssetWeakReference &b)
BMesh const char void * data
BPy_StructRNA * depsgraph
unsigned long long int uint64_t
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
Value & lookup_or_add_cb(const Key &key, const CreateValueF &create_value)
Value & lookup_or_add_default(const Key &key)
ItemIterator items() const &
constexpr const char * c_str() const
ObjectRef(Object *ob, Object *dupli_parent=nullptr, DupliObject *dupli_object=nullptr)
static void default_set(const float4x4 &view_mat, const float4x4 &win_mat)
void reset(bool force_free=false)
static TexturePool & get()
void DRW_smoke_begin_sync(DRWData *drw_data)
void DRW_smoke_exit(DRWData *drw_data)
static bool draw_show_annotation()
const DRWContext * DRW_context_get()
DRWData * DRW_viewport_data_create()
static void drw_draw_render_loop_2d(DRWContext &draw_ctx)
void DRW_custom_pipeline_begin(DRWContext &draw_ctx, Depsgraph *)
static void drw_draw_render_loop_3d(DRWContext &draw_ctx, RenderEngineType *engine_type)
static void drw_callbacks_post_scene(DRWContext &draw_ctx)
static void drw_callbacks_pre_scene(DRWContext &draw_ctx)
static void drw_callbacks_post_scene_2D(DRWContext &draw_ctx, View2D &v2d)
bool DRW_object_is_in_edit_mode(const Object *ob)
static void drw_engines_cache_populate(blender::draw::ObjectRef &ref, DupliCacheManager &dupli_cache, ExtractionGraph &extraction)
blender::draw::TextureFromPool & DRW_viewport_pass_texture_get(const char *pass_name)
void DRW_render_to_image(RenderEngine *engine, Depsgraph *depsgraph, std::function< void(RenderEngine *, RenderLayer *, const rcti)> render_view_cb, std::function< void(RenderResult *)> store_metadata_cb)
static DRWData * drw_viewport_data_ensure(GPUViewport *viewport)
bool DRW_object_use_hide_faces(const Object *ob)
void DRW_render_object_iter(RenderEngine *engine, Depsgraph *depsgraph, std::function< void(blender::draw::ObjectRef &, RenderEngine *, Depsgraph *)> callback)
bool DRW_object_is_renderable(const Object *ob)
DRWTextStore * DRW_text_cache_ensure()
static bool gpencil_object_is_excluded(View3D *v3d)
int DRW_object_visibility_in_active_context(const Object *ob)
bool DRW_object_is_visible_psys_in_active_context(const Object *object, const ParticleSystem *psys)
void DRW_viewport_data_free(DRWData *drw_data)
const Mesh * DRW_object_get_editmesh_cage_for_drawing(const Object &object)
static struct DRWSelectBuffer g_select_buffer
void DRW_render_set_time(RenderEngine *engine, Depsgraph *depsgraph, int frame, float subframe)
void DRW_custom_pipeline_end(DRWContext &draw_ctx)
void DRW_viewport_request_redraw()
static void draw_select_framebuffer_depth_only_setup(const int size[2])
static bool gpencil_any_exists(Depsgraph *depsgraph)
static void drw_callbacks_pre_scene_2D(DRWContext &draw_ctx)
blender::draw::Manager * DRW_manager_get()
DRWTextStore * DRW_text_cache_create()
void DRW_draw_region_info(const bContext *C, ARegion *region)
void DRW_draw_gizmo_3d(const bContext *C, ARegion *region)
void DRW_draw_gizmo_2d(const bContext *C, ARegion *region)
void DRW_view_data_default_lists_from_viewport(DRWViewData *view_data, GPUViewport *viewport)
void DRW_view_data_reset(DRWViewData *view_data)
void DRW_view_data_free_unused(DRWViewData *view_data)
RenderEngineType DRW_engine_viewport_eevee_type
bool DRW_engine_external_acquire_for_image_editor(const DRWContext *draw_ctx)
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)
CCL_NAMESPACE_BEGIN ccl_device float invert(const float color, const float factor)
void * MEM_callocN(size_t len, const char *str)
void MEM_freeN(void *vmemh)
void viewport_color_management_set(GPUViewport &viewport, DRWContext &draw_ctx)
void DRW_curves_module_free(draw::CurvesModule *module)
void DRW_particle_batch_cache_free(ParticleSystem *psys)
void DRW_pointcloud_module_free(draw::PointCloudModule *module)
void DRW_lattice_batch_cache_dirty_tag(Lattice *lt, int mode)
static bool supports_handle_ranges(DupliObject *dupli, Object *parent)
void DRW_lattice_batch_cache_free(Lattice *lt)
void DRW_grease_pencil_batch_cache_free(GreasePencil *grease_pencil)
void drw_batch_cache_generate_requested_evaluated_mesh_or_curve(Object *ob, TaskGraph &task_graph)
void DRW_pointcloud_batch_cache_dirty_tag(PointCloud *pointcloud, int mode)
void DRW_curves_init(DRWData *drw_data=nullptr)
void drw_batch_cache_validate(Object *ob)
void DRW_subdiv_cache_free(bke::subdiv::Subdiv *subdiv)
void DRW_grease_pencil_batch_cache_dirty_tag(GreasePencil *grease_pencil, int mode)
void DRW_volume_batch_cache_free(Volume *volume)
void DRW_mesh_batch_cache_free(void *batch_cache)
void DRW_curves_update(draw::Manager &manager)
void DRW_volume_init(DRWData *drw_data=nullptr)
void DRW_volume_batch_cache_dirty_tag(Volume *volume, int mode)
void DRW_curve_batch_cache_free(Curve *cu)
void DRW_curves_begin_sync(DRWData *drw_data)
void drw_batch_cache_generate_requested(Object *ob, TaskGraph &task_graph)
void DRW_curves_batch_cache_dirty_tag(Curves *curves, int mode)
void DRW_pointcloud_init(DRWData *drw_data=nullptr)
void DRW_cache_free_old_subdiv()
void DRW_mesh_batch_cache_dirty_tag(Mesh *mesh, eMeshBatchDirtyMode mode)
void DRW_particle_batch_cache_dirty_tag(ParticleSystem *psys, int mode)
void DRW_pointcloud_batch_cache_free(PointCloud *pointcloud)
void DRW_batch_cache_free_old(Object *ob, int ctime)
static void foreach_obref_in_scene(DRWContext &draw_ctx, FunctionRef< bool(Object &)> should_draw_object_cb, FunctionRef< void(ObjectRef &)> draw_object_cb)
void DRW_volume_module_free(draw::VolumeModule *module)
void DRW_curves_batch_cache_free(Curves *curves)
void DRW_curve_batch_cache_dirty_tag(Curve *cu, int mode)
MatBase< float, 4, 4 > float4x4
uint64_t get_default_hash(const T &v, const Args &...args)
VecBase< int32_t, 2 > int2
VecBase< float, 2 > float2
void DEG_iterator_temp_object_free_properties(const DupliObject *dupli, Object *temp_object)
bool DEG_iterator_temp_object_from_dupli(const Object *dupli_parent, const DupliObject *dupli, eEvaluationMode eval_mode, bool do_matrix_setup, Object *r_temp_object, ObjectRuntimeHandle *r_temp_runtime)
SELECTID_Context * DRW_select_engine_context_get()
RenderLayer * RE_GetRenderLayer(RenderResult *rr, const char *name)
void RE_SetActiveRenderView(Render *re, const char *viewname)
blender::Set< const Object * > * included_objects
const ViewerPath * viewer_path
bool is_image_render() const
DRWContext(Mode mode, Depsgraph *depsgraph, GPUViewport *viewport, const bContext *C=nullptr, ARegion *region=nullptr, View3D *v3d=nullptr)
DRWViewData * view_data_active
std::function< void(struct DupliCacheManager &, struct ExtractionGraph &)> iter_callback_t
GSet * delayed_extraction
void sync(iter_callback_t iter_callback)
DefaultFramebufferList * viewport_framebuffer_list_get() const
bool is_scene_render() const
DRWTextStore ** text_store_p
void enable_engines(bool gpencil_engine_needed=false, RenderEngineType *render_engine_type=nullptr)
enum DRWContext::Mode mode
void engines_draw_scene()
void engines_init_and_sync(iter_callback_t iter_callback)
bool is_transforming() const
blender::gpu::FrameBuffer * default_framebuffer()
DefaultTextureList * viewport_texture_list_get() const
struct DRWContext::@137223300060360004345077367045216134275315355136 options
void engines_data_validate()
bool is_navigating() const
bool is_viewport_compositor_enabled() const
blender::draw::VolumeModule * volume_module
blender::draw::View * default_view
blender::draw::CurvesModule * curves_module
blender::draw::PointCloudModule * pointcloud_module
DRWViewData * view_data[2]
void modules_begin_sync()
blender::gpu::Texture * texture_depth
blender::gpu::FrameBuffer * framebuffer_depth_only
blender::draw::external::Engine external
blender::draw::select::Engine object_select
blender::Map< std::string, std::unique_ptr< blender::draw::TextureFromPool > > viewport_compositor_passes
void foreach_enabled_engine(CallbackT callback)
blender::workbench::Engine workbench
blender::draw::compositor_engine::Engine compositor
blender::draw::gpencil::Engine grease_pencil
blender::image_engine::Engine image
blender::draw::overlay::Engine overlay
blender::draw::edit_select::Engine edit_select
blender::eevee::Engine eevee
blender::gpu::FrameBuffer * overlay_fb
blender::gpu::Texture * depth
virtual void begin_sync()=0
virtual void object_sync(blender::draw::ObjectRef &ob_ref, blender::draw::Manager &manager)=0
virtual void draw(blender::draw::Manager &manager)=0
virtual blender::StringRefNull name_get()=0
virtual void end_sync()=0
void try_add(blender::draw::ObjectRef &ob_ref)
void extract_all(ExtractionGraph &extraction)
ObjectRuntimeHandle * runtime
LightLinking * light_linking
struct PointCache * pointcache
blender::Vector< Object * > objects
struct ToolSettings * toolsettings
int object_type_exclude_select
int object_type_exclude_viewport
const c_style_mat & ptr() const
static MatBase identity()
InstancesKey(Object *object, ID *ob_data, InstancesFlags flags, const blender::bke::GeometrySet *preview_base_geometry, int preview_instance_index)
bool operator==(const InstancesKey &k) const
int preview_instance_index
const blender::bke::GeometrySet * preview_base_geometry
static void set(DRWState state=DRW_STATE_DEFAULT)
static void free_static()
static void free_static()
static void render_to_image(RenderEngine *engine, RenderLayer *render_layer, const rcti rect)
static void free_static()
static void free_static()
static void free_static()
static void free_static()
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 wmOrtho2(float x1, float x2, float y1, float y2)
ARegionType * WM_xr_surface_controller_region_type_get()
RenderEngineType DRW_engine_viewport_workbench_type