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>
78 bool is_empty = pointcloud.
totpoint == 0;
84 sub_ps.bind_texture(
"u",
module.dummy_vbo);
85 sub_ps.bind_texture(
"au",
module.dummy_vbo);
86 sub_ps.bind_texture(
"a",
module.dummy_vbo);
87 sub_ps.bind_texture(
"c",
module.dummy_vbo);
88 sub_ps.bind_texture(
"ac",
module.dummy_vbo);
91 sub_ps.bind_texture(
"ptcloud_pos_rad_tx", is_empty ?
module.dummy_vbo : pos_rad_buf);
93 if (gpu_material !=
nullptr) {
96 char sampler_name[32];
102 sub_ps.bind_texture(sampler_name,
103 (attribute_buf && !is_empty) ? attribute_buf : &
module.dummy_vbo);
#define LISTBASE_FOREACH(type, var, list)
T & DRW_object_get_data_for_drawing(const Object &object)
ListBase GPU_material_attributes(const GPUMaterial *material)
void GPU_vertbuf_attr_fill(blender::gpu::VertBuf *, uint a_idx, const void *data)
blender::gpu::VertBuf * GPU_vertbuf_create_with_format_ex(const GPUVertFormat &format, GPUUsageType usage)
#define GPU_VERTBUF_DISCARD_SAFE(verts)
void GPU_vertbuf_data_alloc(blender::gpu::VertBuf &verts, uint v_len)
@ GPU_USAGE_FLAG_BUFFER_TEXTURE_ONLY
detail::PassBase< command::DrawMultiBuf > Sub
gpu::Batch * pointcloud_surface_get(PointCloud *pointcloud)
void DRW_pointcloud_module_free(draw::PointCloudModule *module)
gpu::Batch * pointcloud_sub_pass_setup_implementation(PassT &sub_ps, Object *object, GPUMaterial *gpu_material)
gpu::Batch * pointcloud_sub_pass_setup(PassMain::Sub &sub_ps, Object *object, GPUMaterial *gpu_material=nullptr)
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::VertBuf * pointcloud_position_and_radius_get(PointCloud *pointcloud)
static struct PyModuleDef module
blender::draw::PointCloudModule * pointcloud_module