|
Blender V5.0
|
#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 (int clipping_plane_count) |
| void | select_bind (PassSimple &pass) |
| void | select_bind (PassMain &pass) |
| void | select_bind (PassMain &pass, PassMain::Sub &sub) |
| void | end_sync () |
| void | pre_draw () |
| 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< bool > | in_front_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 |
| int | clipping_plane_count = 0 |
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 108 of file select_instance.hh.
References selection_type.
Referenced by blender::draw::overlay::Resources::Resources().
|
inline |
Definition at line 152 of file select_instance.hh.
References clipping_plane_count, blender::draw::select::DISABLED, in_front_map, map_names, select_id_map, and selection_type.
|
inline |
Definition at line 210 of file select_instance.hh.
References BLI_assert, ceil_to_multiple_u(), blender::draw::select::DISABLED, in_front_map, max_uu(), select_id_map, select_output_buf, and selection_type.
|
inline |
Definition at line 222 of file select_instance.hh.
References BLI_assert_unreachable, blender::draw::select::DISABLED, GPU_SELECT_ALL, GPU_SELECT_INVALID, 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, GPU_storagebuf_clear(), info_buf, blender::draw::select::SELECT_ALL, select_output_buf, blender::draw::select::SELECT_PICK_ALL, blender::draw::select::SELECT_PICK_NEAREST, and selection_type.
|
inline |
Definition at line 257 of file select_instance.hh.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), blender::Vector< T, InlineBufferCapacity, Allocator >::data(), GPUSelectResult::depth, blender::draw::select::DISABLED, GPU_BARRIER_BUFFER_UPDATE, GPU_memory_barrier(), gpu_select_next_set_result(), i, GPUSelectResult::id, in_front_map, info_buf, blender::Vector< T, InlineBufferCapacity, Allocator >::is_empty(), printf, 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().
|
inline |
IMPORTANT: Changes the draw state. Need to be called after the pass's own state_set.
Definition at line 180 of file select_instance.hh.
References blender::draw::detail::PassBase< DrawCommandBufType >::bind_ssbo(), blender::draw::detail::PassBase< DrawCommandBufType >::bind_ubo(), clipping_plane_count, 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, blender::draw::detail::PassBase< DrawCommandBufType >::state_set(), and blender::draw::detail::PassBase< DrawCommandBufType >::use_custom_ids.
|
inline |
IMPORTANT: Changes the draw state. Need to be called after the pass's own state_set.
Definition at line 196 of file select_instance.hh.
References blender::draw::detail::PassBase< DrawCommandBufType >::bind_ssbo(), blender::draw::detail::PassBase< DrawCommandBufType >::bind_ubo(), clipping_plane_count, 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, blender::draw::detail::PassBase< DrawCommandBufType >::state_set(), and blender::draw::detail::PassBase< DrawCommandBufType >::use_custom_ids.
|
inline |
IMPORTANT: Changes the draw state. Need to be called after the pass's own state_set.
Definition at line 168 of file select_instance.hh.
References blender::draw::detail::PassBase< DrawCommandBufType >::bind_ssbo(), blender::draw::detail::PassBase< DrawCommandBufType >::bind_ubo(), clipping_plane_count, blender::draw::select::DISABLED, DRW_STATE_WRITE_COLOR, info_buf, SELECT_DATA, SELECT_ID_OUT, select_output_buf, selection_type, and blender::draw::detail::PassBase< DrawCommandBufType >::state_set().
|
inlinenodiscard |
Definition at line 112 of file select_instance.hh.
References blender::draw::select::DISABLED, Object::dtx, Object::id, in_front_map, map_names, ID::name, OB_DRAW_IN_FRONT, blender::draw::ObjectRef::object, printf, Object::runtime, select_id_map, and selection_type.
Referenced by bone_draw_b_bone(), bone_draw_custom_shape(), bone_draw_octa(), bone_draw_wire(), drw_shgroup_bone_axes(), drw_shgroup_bone_envelope(), drw_shgroup_bone_sphere(), drw_shgroup_bone_stick(), blender::draw::overlay::Wireframe::object_sync_ex(), blender::draw::overlay::Prepass::particle_sync(), and blender::draw::overlay::Prepass::sculpt_sync().
|
inlinestaticnodiscard |
Definition at line 147 of file select_instance.hh.
Referenced by blender::draw::overlay::LinePrimitiveBuf::append(), blender::draw::overlay::LinePrimitiveBuf::append(), blender::draw::overlay::PointPrimitiveBuf::append(), bone_draw_wire(), draw_bone_degrees_of_freedom(), blender::draw::overlay::GreasePencil::draw_grease_pencil(), drw_shgroup_bone_envelope(), drw_shgroup_bone_envelope_distance(), drw_shgroup_bone_sphere(), and blender::draw::overlay::Axes::object_sync().
| int blender::draw::select::SelectMap::clipping_plane_count = 0 |
If clipping is enabled, this is the number of clip planes to enable.
Definition at line 106 of file select_instance.hh.
Referenced by blender::draw::overlay::Resources::begin_sync(), 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 102 of file select_instance.hh.
Referenced by select_bind(), and select_bind().
| Vector<bool> blender::draw::select::SelectMap::in_front_map |
Track objects with OB_DRAW_IN_FRONT.
Definition at line 94 of file select_instance.hh.
Referenced by begin_sync(), end_sync(), read_result(), and select_id().
| 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 104 of file select_instance.hh.
Referenced by pre_draw(), 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 97 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 100 of file select_instance.hh.
Referenced by end_sync(), pre_draw(), 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 begin_sync(), end_sync(), blender::draw::overlay::Resources::init(), blender::draw::overlay::Resources::is_selection(), pre_draw(), read_result(), select_bind(), select_bind(), select_bind(), select_id(), and SelectMap().