|
Blender V5.0
|
#include <overlay_outline.hh>
Inherits blender::draw::overlay::Overlay.
Public Member Functions | |
| 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 | flat_objects_pass_sync (Manager &manager, View &view, Resources &res, const State &state) |
| void | pre_draw (Manager &manager, View &view) final |
| void | draw_line_only_ex (Framebuffer &framebuffer, Resources &res, Manager &manager, View &view) |
Display selected object outline. The option can be found under (Viewport Overlays > Objects > Outline Selected).
Definition at line 24 of file overlay_outline.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 47 of file overlay_outline.hh.
References DRW_CLIPPING_UBO_SLOT, DRW_STATE_BLEND_ALPHA_PREMUL, DRW_STATE_DEPTH_LESS_EQUAL, DRW_STATE_WRITE_COLOR, DRW_STATE_WRITE_DEPTH, blender::draw::overlay::Overlay::enabled_, G, G_TRANSFORM_OBJ, GPU_PRIM_TRIS, OVERLAY_GLOBALS_SLOT, state, TH_OUTLINE_WIDTH, U, UI_GetThemeValuef(), USER_GPU_FLAG_OVERLAY_SMOOTH_WIRE, and V3D_SELECT_OUTLINE.
|
inline |
Definition at line 235 of file overlay_outline.hh.
References blender::draw::overlay::Resources::depth_tx, blender::draw::overlay::Overlay::enabled_, GPU_ATTACHMENT_TEXTURE, GPU_debug_group_begin(), GPU_debug_group_end(), GPU_framebuffer_bind(), GPU_TEXTURE_USAGE_ATTACHMENT, GPU_TEXTURE_USAGE_SHADER_READ, blender::draw::Texture::size(), blender::draw::Manager::submit(), blender::draw::Manager::submit_only(), and view.
|
inline |
Definition at line 195 of file overlay_outline.hh.
References blender::draw::overlay::Resources::clip_planes_buf, DRW_CLIPPING_UBO_SLOT, DRW_STATE_DEPTH_LESS_EQUAL, DRW_STATE_WRITE_COLOR, DRW_STATE_WRITE_DEPTH, blender::draw::overlay::Overlay::enabled_, G, G_TRANSFORM_OBJ, blender::gpu::StaticShader::get(), blender::draw::overlay::Resources::globals_buf, GPU_PRIM_LINES, blender::draw::overlay::ShaderModule::outline_prepass_wire, OVERLAY_GLOBALS_SLOT, blender::draw::overlay::Resources::shaders, state, and view.
|
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 128 of file overlay_outline.hh.
References blender::draw::curves_sub_pass_setup(), blender::draw::DRW_cache_mesh_edge_detection_get(), blender::draw::DRW_cache_mesh_surface_get(), blender::draw::DRW_cache_volume_selection_surface_get(), blender::draw::overlay::Overlay::enabled_, error(), blender::draw::overlay::FlatObjectRef::flat_axis_index_get(), GPU_PRIM_LINES, OB_BOUNDBOX, OB_CURVES, OB_GREASE_PENCIL, OB_MESH, OB_POINTCLOUD, OB_VOLUME, blender::draw::pointcloud_sub_pass_setup(), and state.
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 224 of file overlay_outline.hh.
References blender::draw::overlay::Overlay::enabled_, and view.