42 &format,
"dummy", gpu::VertAttrType::SFLOAT_32_32_32_32);
47 const float vert[4] = {0.0f, 0.0f, 0.0f, 0.0f};
56 if (drw_data ==
nullptr) {
66 MEM_delete(pointcloud_module);
69template<
typename PassT>
88 const bool is_empty = pointcloud.
totpoint == 0;
92 sub_ps.bind_texture(
"u", module.
dummy_vbo);
93 sub_ps.bind_texture(
"au", module.
dummy_vbo);
94 sub_ps.bind_texture(
"a", module.
dummy_vbo);
95 sub_ps.bind_texture(
"c", module.
dummy_vbo);
96 sub_ps.bind_texture(
"ac", module.
dummy_vbo);
99 sub_ps.bind_texture(
"ptcloud_pos_rad_tx", is_empty ? module.
dummy_vbo : pos_rad_buf);
101 if (gpu_material !=
nullptr) {
104 char sampler_name[32];
110 sub_ps.bind_texture(sampler_name,
111 (attribute_buf && !is_empty) ? attribute_buf : &module.
dummy_vbo);
#define GPU_VERTBUF_DISCARD_SAFE(verts)
detail::PassBase< command::DrawMultiBuf > Sub
gpu::Batch * pointcloud_surface_get(PointCloud *pointcloud)
void DRW_pointcloud_module_free(draw::PointCloudModule *module)
void drw_curves_get_attribute_sampler_name(const StringRef layer_name, char r_sampler_name[32])
gpu::VertBuf ** DRW_pointcloud_evaluated_attribute(PointCloud *pointcloud, StringRef name)
void DRW_pointcloud_init(DRWData *drw_data=nullptr)
gpu::Batch * pointcloud_sub_pass_setup_implementation(PassT &sub_ps, const ObjectRef &ob_ref, const ResourceHandleRange &res_handle, GPUMaterial *gpu_material)
gpu::Batch * pointcloud_sub_pass_setup(PassMain::Sub &sub_ps, const ObjectRef &ob_ref, const ResourceHandleRange &res_handle, GPUMaterial *gpu_material=nullptr)
gpu::VertBuf * pointcloud_position_and_radius_get(PointCloud *pointcloud)
gpu::Batch * gsplat_sub_pass_setup(PassMain::Sub &sub_ps, const ObjectRef &ob_ref, const ResourceHandleRange &res_handle, GPUMaterial *gpu_material=nullptr)
BLI_assert(slot->slot_subtype.map==BMO_OP_SLOT_SUBTYPE_MAP_FLT)
T & DRW_object_get_data_for_drawing(const Object &object)
ListBaseT< GPUMaterialAttribute > GPU_material_attributes(const GPUMaterial *material)
gpu::VertBuf * GPU_vertbuf_create_with_format_ex(const GPUVertFormat &format, GPUUsageType usage)
uint GPU_vertformat_attr_add(GPUVertFormat *format, StringRef name, gpu::VertAttrType type)
void GPU_vertbuf_attr_fill(gpu::VertBuf *, uint a_idx, const void *data)
void GPU_vertbuf_data_alloc(gpu::VertBuf &verts, uint v_len)
@ GPU_USAGE_FLAG_BUFFER_TEXTURE_ONLY
draw::PointCloudModule * pointcloud_module