|
Blender V4.3
|
#include <select_instance.hh>
Inherited by blender::draw::overlay::Resources.
Public Member Functions | |
| SelectMap (const SelectionType selection_type) | |
| const ID | select_id (const ObjectRef &ob_ref, uint sub_object_id=0) |
| void | begin_sync () |
| void | select_bind (PassSimple &pass) |
| void | select_bind (PassMain &pass) |
| void | select_bind (PassMain &pass, PassMain::Sub &sub) |
| void | end_sync () |
| void | read_result () |
Static Public Member Functions | |
| static const ID | select_invalid_id () |
Public Attributes | |
| const SelectionType | selection_type |
| Vector< uint > | select_id_map |
| Vector< std::string > | map_names |
| StorageArrayBuffer< uint > | select_output_buf = {"select_output_buf"} |
| StorageArrayBuffer< uint, 4, true > | dummy_select_buf = {"dummy_select_buf"} |
| UniformBuffer< SelectInfoData > | info_buf |
| bool | disable_depth_test = false |
Generate selection IDs from objects and keep record of the mapping between them. The id's are contiguous so that we can create a destination buffer.
Definition at line 88 of file select_instance.hh.
|
inline |
Definition at line 106 of file select_instance.hh.
|
inline |
Definition at line 149 of file select_instance.hh.
References blender::Vector< T, InlineBufferCapacity, Allocator >::clear(), disable_depth_test, blender::draw::select::DISABLED, GPU_SELECT_ALL, GPU_SELECT_NEAREST_FIRST_PASS, GPU_SELECT_NEAREST_SECOND_PASS, gpu_select_next_get_mode(), gpu_select_next_get_pick_area_center(), GPU_SELECT_PICK_ALL, GPU_SELECT_PICK_NEAREST, info_buf, map_names, blender::draw::select::SELECT_ALL, select_id_map, blender::draw::select::SELECT_PICK_ALL, blender::draw::select::SELECT_PICK_NEAREST, and selection_type.
|
inline |
Definition at line 234 of file select_instance.hh.
References ceil_to_multiple_u(), blender::draw::select::DISABLED, GPU_storagebuf_clear(), info_buf, blender::draw::detail::StorageCommon< T, len, device_only >::push_update(), blender::draw::StorageArrayBuffer< T, len, device_only >::resize(), blender::draw::select::SELECT_ALL, select_id_map, select_output_buf, selection_type, and blender::Vector< T, InlineBufferCapacity, Allocator >::size().
Referenced by blender::draw::overlay::Instance::end_sync().
|
inline |
Definition at line 252 of file select_instance.hh.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), blender::Vector< T, InlineBufferCapacity, Allocator >::data(), blender::draw::select::DISABLED, GPU_BARRIER_BUFFER_UPDATE, GPU_memory_barrier(), gpu_select_next_set_result(), GPUSelectResult::id, info_buf, printf, blender::draw::detail::StorageCommon< T, len, device_only >::read(), blender::draw::select::SELECT_ALL, select_id_map, select_output_buf, blender::draw::select::SELECT_PICK_ALL, blender::draw::select::SELECT_PICK_NEAREST, selection_type, and blender::Vector< T, InlineBufferCapacity, Allocator >::size().
Referenced by blender::draw::overlay::Instance::draw().
|
inline |
IMPORTANT: Changes the draw state. Need to be called after the pass's own state_set.
Definition at line 198 of file select_instance.hh.
References disable_depth_test, blender::draw::select::DISABLED, DRW_STATE_WRITE_COLOR, dummy_select_buf, info_buf, SELECT_DATA, SELECT_ID_IN, SELECT_ID_OUT, select_output_buf, and selection_type.
|
inline |
IMPORTANT: Changes the draw state. Need to be called after the pass's own state_set.
Definition at line 217 of file select_instance.hh.
References blender::draw::detail::PassBase< DrawCommandBufType >::bind_ssbo(), blender::draw::detail::PassBase< DrawCommandBufType >::bind_ubo(), disable_depth_test, blender::draw::select::DISABLED, DRW_STATE_WRITE_COLOR, dummy_select_buf, info_buf, SELECT_DATA, SELECT_ID_IN, SELECT_ID_OUT, select_output_buf, selection_type, and blender::draw::detail::PassBase< DrawCommandBufType >::state_set().
|
inline |
IMPORTANT: Changes the draw state. Need to be called after the pass's own state_set.
Definition at line 183 of file select_instance.hh.
References disable_depth_test, blender::draw::select::DISABLED, DRW_STATE_WRITE_COLOR, info_buf, SELECT_DATA, SELECT_ID_OUT, select_output_buf, and selection_type.
Referenced by blender::draw::overlay::Armatures::begin_sync(), blender::draw::overlay::Cameras::begin_sync(), blender::draw::overlay::Empties::begin_sync(), blender::draw::overlay::Fluids::begin_sync(), blender::draw::overlay::Lattices::begin_sync(), blender::draw::overlay::LightProbes::begin_sync(), blender::draw::overlay::Particles::begin_sync(), blender::draw::overlay::Prepass::begin_sync(), blender::draw::overlay::Wireframe::begin_sync(), blender::draw::overlay::Bounds::end_sync(), blender::draw::overlay::Cameras::end_sync(), blender::draw::overlay::EditText::end_sync(), blender::draw::overlay::Empties::end_sync(), blender::draw::overlay::ForceFields::end_sync(), blender::draw::overlay::LightProbes::end_sync(), blender::draw::overlay::Lights::end_sync(), blender::draw::overlay::Metaballs::end_sync(), blender::draw::overlay::Relations::end_sync(), and blender::draw::overlay::Speakers::end_sync().
|
inlinenodiscard |
Definition at line 110 of file select_instance.hh.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), blender::Vector< T, InlineBufferCapacity, Allocator >::append_and_get_index(), blender::draw::select::DISABLED, Object::id, map_names, ID::name, blender::draw::ObjectRef::object, printf, Object::runtime, select_id_map, and selection_type.
Referenced by ArmatureBoneDrawStrategyBBone::draw_bone(), ArmatureBoneDrawStrategyCustomShape::draw_bone(), ArmatureBoneDrawStrategyOcta::draw_bone(), ArmatureBoneDrawStrategyWire::draw_bone(), drw_shgroup_bone_axes(), drw_shgroup_bone_envelope(), drw_shgroup_bone_sphere(), drw_shgroup_bone_stick(), blender::draw::overlay::Lattices::edit_object_sync(), blender::draw::overlay::Metaballs::edit_object_sync(), blender::draw::overlay::Bounds::object_sync(), blender::draw::overlay::Cameras::object_sync(), blender::draw::overlay::Empties::object_sync(), blender::draw::overlay::Fluids::object_sync(), blender::draw::overlay::ForceFields::object_sync(), blender::draw::overlay::Lattices::object_sync(), blender::draw::overlay::LightProbes::object_sync(), blender::draw::overlay::Lights::object_sync(), blender::draw::overlay::Metaballs::object_sync(), blender::draw::overlay::Particles::object_sync(), blender::draw::overlay::Prepass::object_sync(), blender::draw::overlay::Speakers::object_sync(), blender::draw::overlay::Wireframe::object_sync(), blender::draw::overlay::Prepass::particle_sync(), and blender::draw::overlay::Prepass::sculpt_sync().
|
inlinestaticnodiscard |
Definition at line 144 of file select_instance.hh.
Referenced by ArmatureBoneDrawStrategyCustomShape::draw_bone(), ArmatureBoneDrawStrategyWire::draw_bone(), draw_bone_degrees_of_freedom(), drw_shgroup_bone_envelope(), drw_shgroup_bone_envelope_distance(), and drw_shgroup_bone_sphere().
| bool blender::draw::select::SelectMap::disable_depth_test = false |
Will remove the depth test state from any pass drawing objects with select id.
Definition at line 104 of file select_instance.hh.
Referenced by begin_sync(), select_bind(), select_bind(), and select_bind().
| StorageArrayBuffer<uint, 4, true> blender::draw::select::SelectMap::dummy_select_buf = {"dummy_select_buf"} |
Dummy buffer. Might be better to remove, but simplify the shader create info patching.
Definition at line 100 of file select_instance.hh.
Referenced by select_bind(), and select_bind().
| UniformBuffer<SelectInfoData> blender::draw::select::SelectMap::info_buf |
Uniform buffer to bind to all passes to pass information about the selection state.
Definition at line 102 of file select_instance.hh.
Referenced by begin_sync(), end_sync(), read_result(), select_bind(), select_bind(), and select_bind().
| Vector<std::string> blender::draw::select::SelectMap::map_names |
Debug map containing a copy of the object name.
Definition at line 95 of file select_instance.hh.
Referenced by begin_sync(), and select_id().
Mapping between internal IDs and object->runtime->select_id.
Definition at line 92 of file select_instance.hh.
Referenced by begin_sync(), end_sync(), read_result(), and select_id().
| StorageArrayBuffer<uint> blender::draw::select::SelectMap::select_output_buf = {"select_output_buf"} |
Stores the result of the whole selection drawing. Content depends on selection mode.
Definition at line 98 of file select_instance.hh.
Referenced by end_sync(), read_result(), select_bind(), select_bind(), and select_bind().
| const SelectionType blender::draw::select::SelectMap::selection_type |
Definition at line 89 of file select_instance.hh.
Referenced by blender::draw::overlay::AntiAliasing::begin_sync(), blender::draw::overlay::AttributeViewer::begin_sync(), blender::draw::overlay::ModeTransfer::begin_sync(), blender::draw::overlay::MotionPath::begin_sync(), blender::draw::overlay::Paints::begin_sync(), blender::draw::overlay::XrayFade::begin_sync(), begin_sync(), blender::draw::overlay::Instance::draw(), end_sync(), read_result(), select_bind(), select_bind(), select_bind(), and select_id().