|
Blender V5.0
|
#include <overlay_empty.hh>
Inherits blender::draw::overlay::Overlay.
Public Member Functions | |
| Empties (const SelectionType selection_type) | |
| void | begin_sync (Resources &res, const State &state) final |
| void | object_sync (Manager &manager, const ObjectRef &ob_ref, Resources &res, const State &state) final |
| void | end_sync (Resources &res, const State &state) final |
| void | pre_draw (Manager &manager, View &view) final |
| void | draw_line (Framebuffer &framebuffer, Manager &manager, View &view) final |
| void | draw_background_images (Framebuffer &framebuffer, Manager &manager, View &view) |
| void | draw_images (Framebuffer &framebuffer, Manager &manager, View &view) |
| void | draw_in_front_images (Framebuffer &framebuffer, Manager &manager, View &view) |
Static Public Member Functions | |
| static void | begin_sync (CallBuffers &call_buffers) |
| static void | object_sync (const select::ID select_id, const float4x4 &matrix, const float draw_size, const char empty_drawtype, const float4 &color, CallBuffers &call_buffers) |
| static void | end_sync (Resources &res, const State &state, PassSimple::Sub &ps, CallBuffers &call_buffers) |
Friends | |
| class | Cameras |
Empty object type drawing, including image empties.
Definition at line 20 of file overlay_empty.hh.
|
inline |
Definition at line 57 of file overlay_empty.hh.
|
inlinestatic |
Definition at line 101 of file overlay_empty.hh.
Synchronization creates and fill render passes based on context state and scene state.
It runs for every scene update, so keep computation overhead low. If it is triggered, everything in the scene is considered updated. Note that this only concerns the render passes, the mesh batch caches are updated on a per object-data basis.
IMPORTANT: Synchronization must be view agnostic. That is, not rely on view position, projection matrix or frame-buffer size to do conditional pass creation. This is because, by design, syncing can happen once and rendered multiple time (multi view rendering, stereo rendering, orbiting view ...). Conditional pass creation, must be done in the drawing callbacks, but they should remain the exception. Also there will be no access to object data at this point. Creates passes used for object sync and enabling / disabling internal overlay types (e.g. vertices, edges, faces in edit mode). Runs once at the start of the sync cycle. Should also contain passes setup for overlays that are not per object overlays (e.g. Grid).
This method must be implemented.
Implements blender::draw::overlay::Overlay.
Definition at line 59 of file overlay_empty.hh.
References begin_sync(), blender::draw::detail::PassBase< DrawCommandBufType >::bind_ubo(), DRW_CLIPPING_UBO_SLOT, DRW_STATE_BLEND_ALPHA_PREMUL, DRW_STATE_DEPTH_LESS, DRW_STATE_DEPTH_LESS_EQUAL, DRW_STATE_WRITE_COLOR, DRW_STATE_WRITE_DEPTH, blender::draw::overlay::Overlay::enabled_, FLT_MAX, blender::draw::detail::Pass< DrawCommandBufType >::init(), OVERLAY_GLOBALS_SLOT, blender::draw::detail::PassBase< DrawCommandBufType >::push_constant(), blender::draw::detail::PassBase< DrawCommandBufType >::shader_set(), state, blender::draw::detail::PassBase< DrawCommandBufType >::state_set(), and blender::draw::detail::PassBase< DrawCommandBufType >::sub().
Referenced by blender::draw::overlay::Cameras::begin_sync(), and begin_sync().
|
inline |
Definition at line 226 of file overlay_empty.hh.
References blender::draw::overlay::Overlay::enabled_, GPU_framebuffer_bind(), blender::draw::Manager::submit_only(), and view.
|
inline |
Definition at line 236 of file overlay_empty.hh.
References blender::draw::overlay::Overlay::enabled_, GPU_framebuffer_bind(), blender::draw::Manager::submit_only(), and view.
|
inline |
Definition at line 248 of file overlay_empty.hh.
References blender::draw::overlay::Overlay::enabled_, GPU_framebuffer_bind(), blender::draw::Manager::submit_only(), and view.
|
inlinefinalvirtual |
Reimplemented from blender::draw::overlay::Overlay.
Definition at line 216 of file overlay_empty.hh.
References blender::draw::overlay::Overlay::enabled_, GPU_framebuffer_bind(), and view.
Finalize passes or buffers used for object sync. Runs once at the start of the sync cycle.
Reimplemented from blender::draw::overlay::Overlay.
Definition at line 170 of file overlay_empty.hh.
References blender::draw::overlay::Overlay::enabled_, end_sync(), and state.
Referenced by blender::draw::overlay::Cameras::end_sync(), and end_sync().
|
inlinestatic |
Definition at line 181 of file overlay_empty.hh.
References blender::draw::overlay::ShapeCache::arrows, blender::draw::detail::PassBase< DrawCommandBufType >::bind_ubo(), blender::draw::overlay::ShapeCache::circle, blender::draw::overlay::Resources::clip_planes_buf, blender::draw::overlay::ShapeCache::cube, DRW_CLIPPING_UBO_SLOT, DRW_STATE_DEPTH_LESS_EQUAL, DRW_STATE_WRITE_COLOR, DRW_STATE_WRITE_DEPTH, blender::draw::overlay::ShapeCache::empty_cone, blender::draw::overlay::ShapeCache::empty_sphere, blender::draw::overlay::ShaderModule::extra_shape, blender::gpu::StaticShader::get(), blender::draw::overlay::Resources::globals_buf, OVERLAY_GLOBALS_SLOT, blender::draw::overlay::ShapeCache::plain_axes, blender::draw::overlay::ShapeCache::quad_wire, blender::draw::detail::PassBase< DrawCommandBufType >::shader_set(), blender::draw::overlay::Resources::shaders, blender::draw::overlay::Resources::shapes, blender::draw::overlay::ShapeCache::single_arrow, state, and blender::draw::detail::PassBase< DrawCommandBufType >::state_set().
|
inlinestatic |
Definition at line 136 of file overlay_empty.hh.
References data, OB_ARROWS, OB_CIRCLE, OB_CUBE, OB_EMPTY_CONE, OB_EMPTY_SPHERE, OB_PLAINAXES, and OB_SINGLE_ARROW.
|
inlinefinalvirtual |
Fills passes or buffers for each object. Runs for each individual object state. IMPORTANT: Can run only once for instances using the same state (ObjectRef might contains instancing data).
Reimplemented from blender::draw::overlay::Overlay.
Definition at line 113 of file overlay_empty.hh.
References blender::draw::overlay::Overlay::enabled_, OB_EMPTY_IMAGE, object_sync(), and state.
Referenced by object_sync(), and blender::draw::overlay::Instance::object_sync().
Warms PassMain and PassSortable to avoid overhead of pipeline switching. Should only contains calls to generate_commands. NOTE: view is guaranteed to be the same view that will be passed to the draw functions.
Reimplemented from blender::draw::overlay::Overlay.
Definition at line 202 of file overlay_empty.hh.
References blender::draw::overlay::Overlay::enabled_, and view.
|
friend |