|
Blender V5.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 (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 blender::Vector< T, InlineBufferCapacity, Allocator >::clear(), clipping_plane_count, in_front_map, map_names, select_id_map, and selection_type.
|
inline |
Definition at line 210 of file select_instance.hh.
References blender::BLI_assert(), blender::ceil_to_multiple_u(), in_front_map, blender::max_uu(), blender::draw::detail::StorageCommon< T, len, device_only >::push_update(), blender::draw::StorageArrayBuffer< T, len, device_only >::resize(), 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 222 of file select_instance.hh.
References BLI_assert_unreachable, blender::GPU_SELECT_ALL, blender::GPU_SELECT_INVALID, blender::GPU_SELECT_NEAREST_FIRST_PASS, blender::GPU_SELECT_NEAREST_SECOND_PASS, blender::gpu_select_next_get_mode(), blender::gpu_select_next_get_pick_area_center(), blender::gpu_select_next_get_radius(), blender::GPU_SELECT_PICK_ALL, blender::GPU_SELECT_PICK_NEAREST, blender::GPU_storagebuf_clear(), info_buf, blender::draw::detail::UniformCommon< T, len, device_only >::push_update(), blender::draw::select::SELECT_ALL, select_output_buf, blender::draw::select::SELECT_PICK_ALL, blender::draw::select::SELECT_PICK_NEAREST, and selection_type.
Referenced by blender::draw::overlay::Instance::draw().
|
inline |
Definition at line 259 of file select_instance.hh.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), blender::draw::detail::StorageCommon< T, len, device_only >::async_flush_to_host(), blender::Vector< T, InlineBufferCapacity, Allocator >::data(), blender::GPUSelectResult::depth, blender::GPU_BARRIER_BUFFER_UPDATE, blender::GPU_memory_barrier(), blender::gpu_select_next_set_result(), blender::GPUSelectResult::id, in_front_map, blender::IndexRange::IndexRange(), info_buf, blender::Vector< T, InlineBufferCapacity, Allocator >::is_empty(), blender::gpu::shader::metadata::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 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::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::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::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::Vector< T, InlineBufferCapacity, Allocator >::append(), blender::Vector< T, InlineBufferCapacity, Allocator >::append_and_get_index(), blender::Object::dtx, blender::Object::id, in_front_map, map_names, blender::ID::name, blender::OB_DRAW_IN_FRONT, blender::draw::ObjectRef::object, blender::gpu::shader::metadata::printf, blender::Object::runtime, blender::bke::ObjectRuntime::select_id, select_id_map, and selection_type.
Referenced by blender::bone_draw_b_bone(), blender::bone_draw_custom_shape(), blender::bone_draw_octa(), blender::bone_draw_wire(), blender::drw_shgroup_bone_axes(), blender::drw_shgroup_bone_envelope(), blender::drw_shgroup_bone_sphere(), blender::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(), blender::bone_draw_wire(), blender::draw_bone_degrees_of_freedom(), blender::draw::overlay::GreasePencil::draw_grease_pencil(), blender::drw_shgroup_bone_envelope(), blender::drw_shgroup_bone_envelope_distance(), blender::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().