Blender V5.3
blender::draw::GSplatEvalCache Struct Reference

#include <draw_gsplat_private.hh>

Public Member Functions

GSplatEvalCache management
void ensure_builtin_buffers (PointCloud &pointcloud)
void ensure_compute_buffers (PointCloud &pointcloud)
void ensure_edit_dots_indices (PointCloud &pointcloud)
void ensure_attribute (PointCloud &pointcloud, int attrib_i)
gpu::VertBuf * shape_data_buf_get ()
gpu::VertBuf * radiance_data_buf_get ()
gpu::VertBuf ** ellipses_comp_buf_get ()
gpu::VertBuf ** radiance_comp_buf_get ()
gpu::UniformBuf * infos_buf_get ()
gpu::VertBuf ** attributes_get (uint request_i)
gpu::Batch * dots_get ()
gpu::Batch * edit_dots_get ()
gpu::Batch * surface_get (const PointCloud &pointcloud)
void ensure_requested (PointCloud &pointcloud)
void discard_buffers ()
void discard_attributes ()

Static Public Member Functions

GSplatBatchCache management
static GSplatEvalCache & get (PointCloud &pointcloud)

Public Attributes

friend GSplatModule
friend GSplatBatchCache
gpu::Batch * surface
gpu::Batch ** surface_per_mat
gpu::Batch * dots
gpu::Batch * edit_dots
gpu::VertBuf * shape_data_buf
gpu::VertBuf * radiance_data_buf
gpu::UniformBuf * infos_buf
gpu::VertBuf * ellipses_comp_buf
gpu::VertBuf * radiance_comp_buf
gpu::VertBuf * attr_viewer
gpu::VertBuf * attributes_buf [GPU_MAX_ATTR]
gpu::IndexBuf * edit_dots_indices = nullptr
VectorSet< std::string > attr_used
VectorSet< std::string > attr_used_over_time
int last_attr_matching_time
int mat_len

Detailed Description

Cache object that stores batches and buffers for drawing a gsplat, and is responsible for filling these from the object's attributes.

Pointers to batches/buffers are provided through _get(), and are not present until ensure_requested() is called.

Definition at line 53 of file draw_gsplat_private.hh.

Member Function Documentation

◆ attributes_get()

gpu::VertBuf ** blender::draw::GSplatEvalCache::attributes_get ( uint request_i)

Definition at line 436 of file draw_cache_impl_gsplat.cc.

References attributes_buf.

Referenced by blender::draw::DRW_gsplat_evaluated_attribute().

◆ discard_attributes()

◆ discard_buffers()

◆ dots_get()

gpu::Batch * blender::draw::GSplatEvalCache::dots_get ( )

◆ edit_dots_get()

gpu::Batch * blender::draw::GSplatEvalCache::edit_dots_get ( )

◆ ellipses_comp_buf_get()

gpu::VertBuf ** blender::draw::GSplatEvalCache::ellipses_comp_buf_get ( )

◆ ensure_attribute()

◆ ensure_builtin_buffers()

◆ ensure_compute_buffers()

◆ ensure_edit_dots_indices()

void blender::draw::GSplatEvalCache::ensure_edit_dots_indices ( PointCloud & pointcloud)

◆ ensure_requested()

◆ get()

◆ infos_buf_get()

gpu::UniformBuf * blender::draw::GSplatEvalCache::infos_buf_get ( )

◆ radiance_comp_buf_get()

gpu::VertBuf ** blender::draw::GSplatEvalCache::radiance_comp_buf_get ( )

◆ radiance_data_buf_get()

gpu::VertBuf * blender::draw::GSplatEvalCache::radiance_data_buf_get ( )

◆ shape_data_buf_get()

gpu::VertBuf * blender::draw::GSplatEvalCache::shape_data_buf_get ( )

◆ surface_get()

Member Data Documentation

◆ attr_used

VectorSet<std::string> blender::draw::GSplatEvalCache::attr_used

◆ attr_used_over_time

VectorSet<std::string> blender::draw::GSplatEvalCache::attr_used_over_time

Attributes that were used at some point. This is used for garbage collection, to remove attributes that are not used in shaders anymore due to user edits.

Definition at line 108 of file draw_gsplat_private.hh.

Referenced by blender::draw::DRW_gsplat_batch_cache_free_old().

◆ attr_viewer

gpu::VertBuf* blender::draw::GSplatEvalCache::attr_viewer

Definition at line 85 of file draw_gsplat_private.hh.

Referenced by discard_buffers().

◆ attributes_buf

gpu::VertBuf* blender::draw::GSplatEvalCache::attributes_buf[GPU_MAX_ATTR]

◆ dots

gpu::Batch* blender::draw::GSplatEvalCache::dots

Definition at line 63 of file draw_gsplat_private.hh.

Referenced by discard_buffers(), dots_get(), and ensure_requested().

◆ edit_dots

gpu::Batch* blender::draw::GSplatEvalCache::edit_dots

◆ edit_dots_indices

gpu::IndexBuf* blender::draw::GSplatEvalCache::edit_dots_indices = nullptr

◆ ellipses_comp_buf

gpu::VertBuf* blender::draw::GSplatEvalCache::ellipses_comp_buf

◆ GSplatBatchCache

friend blender::draw::GSplatEvalCache::GSplatBatchCache

Definition at line 55 of file draw_gsplat_private.hh.

◆ GSplatModule

friend blender::draw::GSplatEvalCache::GSplatModule

Definition at line 54 of file draw_gsplat_private.hh.

◆ infos_buf

gpu::UniformBuf* blender::draw::GSplatEvalCache::infos_buf

Definition at line 73 of file draw_gsplat_private.hh.

Referenced by discard_buffers(), infos_buf_get(), and surface_get().

◆ last_attr_matching_time

int blender::draw::GSplatEvalCache::last_attr_matching_time

The last time in seconds that the attr_used and attr_used_over_time were exactly the same. If the delta between this time and the current scene time is greater than the timeout set in user preferences (U.vbotimeout) then garbage collection is performed.

Definition at line 115 of file draw_gsplat_private.hh.

Referenced by blender::draw::DRW_gsplat_batch_cache_free_old().

◆ mat_len

int blender::draw::GSplatEvalCache::mat_len

◆ radiance_comp_buf

gpu::VertBuf* blender::draw::GSplatEvalCache::radiance_comp_buf

◆ radiance_data_buf

gpu::VertBuf* blender::draw::GSplatEvalCache::radiance_data_buf

◆ shape_data_buf

gpu::VertBuf* blender::draw::GSplatEvalCache::shape_data_buf

◆ surface

gpu::Batch* blender::draw::GSplatEvalCache::surface

Definition at line 60 of file draw_gsplat_private.hh.

Referenced by discard_buffers(), and surface_get().

◆ surface_per_mat

gpu::Batch** blender::draw::GSplatEvalCache::surface_per_mat

The documentation for this struct was generated from the following files: