|
Blender V5.0
|
#include <overlay_particle.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 &state) final |
| void | object_sync (Manager &manager, const ObjectRef &ob_ref, 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 (Framebuffer &framebuffer, Manager &manager, View &view) final |
Display particle system overlays. Covers particle edit and the legacy hair system.
Definition at line 28 of file overlay_particle.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 44 of file overlay_particle.hh.
References ParticleEditSettings::brushtype, DRW_CLIPPING_UBO_SLOT, DRW_STATE_DEPTH_LESS_EQUAL, DRW_STATE_WRITE_COLOR, DRW_STATE_WRITE_DEPTH, ELEM, blender::draw::overlay::Overlay::enabled_, G, G_TRANSFORM_OBJ, OVERLAY_GLOBALS_SLOT, PE_BRUSH_WEIGHT, PE_settings(), SCE_SELECT_END, SCE_SELECT_POINT, ParticleEditSettings::selectmode, and state.
|
inlinefinalvirtual |
Reimplemented from blender::draw::overlay::Overlay.
Definition at line 287 of file overlay_particle.hh.
References blender::draw::overlay::Overlay::enabled_, GPU_framebuffer_bind(), and view.
|
inlinefinalvirtual |
Reimplemented from blender::draw::overlay::Overlay.
Definition at line 277 of file overlay_particle.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 117 of file overlay_particle.hh.
References DEG_get_original(), blender::draw::DRW_cache_particles_get_edit_inner_points(), blender::draw::DRW_cache_particles_get_edit_strands(), blender::draw::DRW_cache_particles_get_edit_tip_points(), blender::draw::overlay::Overlay::enabled_, Object::particlesystem, PE_create_current(), PE_get_current_from_psys(), printf, and state.
Referenced by blender::draw::overlay::Instance::object_sync().
|
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 183 of file overlay_particle.hh.
References BKE_object_material_get_eval(), ParticleSettings::draw_as, ParticleSettings::draw_size, blender::draw::DRW_cache_particles_get_dots(), blender::draw::DRW_cache_particles_get_hair(), DRW_object_is_visible_psys_in_active_context(), blender::draw::overlay::Overlay::enabled_, GPU_PRIM_LINES, blender::draw::ResourceHandleRange::is_valid(), ParticleSettings::omat, PART_DRAW_AXIS, PART_DRAW_CIRC, PART_DRAW_CROSS, PART_DRAW_DOT, PART_DRAW_GR, PART_DRAW_NOT, PART_DRAW_OB, PART_DRAW_PATH, PART_DRAW_REND, PART_SHAPE_AXIS, PART_SHAPE_CIRCLE, PART_SHAPE_CROSS, PARTICLE_SHAPE_CIRCLE_RESOLUTION, Object::particlesystem, ParticleSettings::ren_as, and state.
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 268 of file overlay_particle.hh.
References blender::draw::overlay::Overlay::enabled_, and view.