|
Blender V5.0
|
#include <overlay_wireframe.hh>
Inherits blender::draw::overlay::Overlay.
Public Member Functions | |
| void | begin_sync (Resources &res, const State &state) final |
| void | object_sync_ex (Manager &manager, const ObjectRef &ob_ref, Resources &res, const State &state, const bool in_edit_paint_mode, const bool in_edit_mode) |
| void | pre_draw (Manager &manager, View &view) final |
| void | copy_depth (TextureRef &depth_tx) |
| void | draw_line (Framebuffer &framebuffer, Manager &manager, View &view) final |
Draw wireframe of objects.
The object wireframe can be drawn because of:
Definition at line 32 of file overlay_wireframe.hh.
|
inlinefinalvirtual |
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 51 of file overlay_wireframe.hh.
References DRW_CLIPPING_UBO_SLOT, DRW_STATE_DEPTH_LESS_EQUAL, DRW_STATE_FIRST_VERTEX_CONVENTION, DRW_STATE_WRITE_COLOR, DRW_STATE_WRITE_DEPTH, blender::draw::overlay::Overlay::enabled_, G, G_TRANSFORM_OBJ, blender::gpu::StaticShader::get(), name, OVERLAY_GLOBALS_SLOT, state, U, USER_GPU_FLAG_OVERLAY_SMOOTH_WIRE, blender::draw::overlay::ShaderModule::wireframe_curve, blender::draw::overlay::ShaderModule::wireframe_mesh, and blender::draw::overlay::ShaderModule::wireframe_points.
|
inline |
Definition at line 255 of file overlay_wireframe.hh.
References blender::draw::overlay::Overlay::enabled_, GPU_texture_copy(), GPU_TEXTURE_USAGE_ATTACHMENT, GPU_TEXTURE_USAGE_SHADER_READ, and blender::draw::Texture::size().
|
inlinefinalvirtual |
Reimplemented from blender::draw::overlay::Overlay.
Definition at line 270 of file overlay_wireframe.hh.
References blender::draw::overlay::Overlay::enabled_, GPU_framebuffer_bind(), and view.
|
inline |
Definition at line 114 of file overlay_wireframe.hh.
References batch, BKE_sculptsession_use_pbvh_draw(), blender::draw::detail::PassBase< DrawCommandBufType >::draw(), blender::draw::overlay::Overlay::draw(), blender::draw::DRW_cache_curve_edge_wire_get(), blender::draw::DRW_cache_grease_pencil_face_wireframe_get(), blender::draw::DRW_cache_mesh_all_verts_get(), blender::draw::DRW_cache_mesh_face_wireframe_get(), blender::draw::DRW_cache_mesh_loose_edges_get(), blender::draw::DRW_cache_surf_edge_wire_get(), blender::draw::DRW_cache_text_edge_wire_get(), blender::draw::DRW_cache_volume_face_wireframe_get(), DRW_object_get_data_for_drawing(), blender::draw::DRW_pointcloud_batch_cache_get_dots(), Object::dt, Object::dtx, Mesh::edges_num, blender::draw::overlay::Overlay::enabled_, blender::draw::select::ID::get(), OB_CURVES, OB_CURVES_LEGACY, OB_DRAW_ALL_EDGES, OB_DRAWWIRE, OB_FONT, OB_GREASE_PENCIL, OB_MESH, OB_POINTCLOUD, OB_SURF, OB_VOLUME, OB_WIRE, blender::draw::ObjectRef::object, blender::draw::SCULPT_BATCH_WIREFRAME, blender::draw::sculpt_batches_get(), blender::draw::select::SelectMap::select_id(), state, Object::type, blender::draw::Manager::unique_handle(), Mesh::verts_num, and VOLUME_WIREFRAME_POINTS.
Referenced by 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 246 of file overlay_wireframe.hh.
References blender::draw::overlay::Overlay::enabled_, and view.