|
Blender V5.0
|
#include <overlay_curve.hh>
Inherits blender::draw::overlay::Overlay.
Public Member Functions | |
| void | begin_sync (Resources &res, const State &state) final |
| void | edit_object_sync (Manager &manager, const ObjectRef &ob_ref, Resources &, const State &) final |
| void | edit_object_sync_legacy (Manager &manager, const ObjectRef &ob_ref, Resources &) |
| void | draw_line (Framebuffer &framebuffer, Manager &manager, View &view) final |
| void | draw_color_only (Framebuffer &framebuffer, Manager &manager, View &view) final |
Curve object display (including legacy curves) for both object and edit modes.
Definition at line 27 of file overlay_curve.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 55 of file overlay_curve.hh.
References CURVE_HANDLE_NONE, DRW_CLIPPING_UBO_SLOT, DRW_STATE_BLEND_ALPHA, DRW_STATE_DEPTH_GREATER, DRW_STATE_DEPTH_LESS_EQUAL, DRW_STATE_WRITE_COLOR, DRW_STATE_WRITE_DEPTH, blender::draw::overlay::Overlay::enabled_, GPU_use_hq_normals_workaround(), name, OVERLAY_GLOBALS_SLOT, SCE_PERF_HQ_NORMALS, state, and V3D_OVERLAY_EDIT_CU_NORMALS.
|
inlinefinalvirtual |
Reimplemented from blender::draw::overlay::Overlay.
Definition at line 271 of file overlay_curve.hh.
References blender::draw::overlay::Overlay::enabled_, GPU_framebuffer_bind(), and view.
|
inlinefinalvirtual |
Reimplemented from blender::draw::overlay::Overlay.
Definition at line 257 of file overlay_curve.hh.
References blender::draw::overlay::Overlay::enabled_, GPU_framebuffer_bind(), and view.
|
inlinefinalvirtual |
Fills passes or buffers for each object in edit mode. Runs for each individual object state for a specific mode. 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 194 of file overlay_curve.hh.
References blender::draw::DRW_curves_batch_cache_get_edit_curves_handles(), blender::draw::DRW_curves_batch_cache_get_edit_curves_lines(), blender::draw::DRW_curves_batch_cache_get_edit_points(), DRW_object_get_data_for_drawing(), blender::draw::overlay::Overlay::enabled_, GPU_PRIM_TRIS, blender::bke::Point, and Curves::selection_domain.
Referenced by blender::draw::overlay::Instance::object_sync().
|
inline |
Definition at line 222 of file overlay_curve.hh.
References CU_3D, blender::draw::DRW_cache_curve_edge_normal_get(), blender::draw::DRW_cache_curve_edge_overlay_get(), blender::draw::DRW_cache_curve_edge_wire_get(), blender::draw::DRW_cache_curve_vert_overlay_get(), DRW_object_get_data_for_drawing(), blender::draw::overlay::Overlay::enabled_, Curve::flag, GPU_PRIM_LINES, GPU_PRIM_TRIS, OB_CURVES_LEGACY, blender::draw::ObjectRef::object, Object::type, and blender::draw::Manager::unique_handle().
Referenced by blender::draw::overlay::Instance::object_sync().