Blender V5.3
GPU_vertex_buffer.hh File Reference
#include "BLI_array_utils.hh"
#include "BLI_assert.hh"
#include "BLI_enum_flags.hh"
#include "BLI_math_base_c.hh"
#include "BLI_span.hh"
#include "BLI_virtual_array.hh"
#include "GPU_common.hh"
#include "GPU_vertex_format.hh"

Go to the source code of this file.

Classes

class  blender::gpu::VertBufDeleter
class  blender::gpu::VertBuf
struct  blender::GPUVertBufRaw

Namespaces

namespace  blender
 BMesh Iterators.
namespace  blender::gpu

Macros

#define GPU_vertbuf_init_with_format(verts, format)
#define GPU_VERTBUF_DISCARD_SAFE(verts)

Typedefs

using blender::gpu::VertBufPtr = std::unique_ptr<gpu::VertBuf, gpu::VertBufDeleter>

Enumerations

enum  blender::GPUVertBufStatus { blender::GPU_VERTBUF_INVALID = 0 , blender::GPU_VERTBUF_INIT = (1 << 0) , blender::GPU_VERTBUF_DATA_DIRTY = (1 << 1) , blender::GPU_VERTBUF_DATA_UPLOADED = (1 << 2) }
enum  blender::GPUUsageType {
  blender::GPU_USAGE_STREAM = 0 , blender::GPU_USAGE_STATIC = 1 , blender::GPU_USAGE_DYNAMIC = 2 , blender::GPU_USAGE_DEVICE_ONLY = 3 ,
  blender::GPU_USAGE_FLAG_BUFFER_TEXTURE_ONLY = 1 << 3
}

Functions

 blender::ENUM_OPERATORS (GPUUsageType)
static gpu::VertBuf * blender::GPU_vertbuf_create_with_format (const GPUVertFormat &format)
GPU_INLINE void * blender::GPU_vertbuf_raw_step (GPUVertBufRaw *a)
GPU_INLINE uint blender::GPU_vertbuf_raw_used (const GPUVertBufRaw *a)
C-API
void blender::GPU_vertbuf_discard (gpu::VertBuf *)
gpu::VertBuf * blender::GPU_vertbuf_calloc ()
gpu::VertBuf * blender::GPU_vertbuf_create_with_format_ex (const GPUVertFormat &format, GPUUsageType usage)
void blender::GPU_vertbuf_read (const gpu::VertBuf *verts, void *data)
void blender::GPU_vertbuf_clear (gpu::VertBuf *verts)
void blender::GPU_vertbuf_handle_ref_add (gpu::VertBuf *verts)
void blender::GPU_vertbuf_handle_ref_remove (gpu::VertBuf *verts)
void blender::GPU_vertbuf_init_with_format_ex (gpu::VertBuf &verts, const GPUVertFormat &format, GPUUsageType)
void blender::GPU_vertbuf_init_build_on_device (gpu::VertBuf &verts, const GPUVertFormat &format, uint v_len)
gpu::VertBuf * blender::GPU_vertbuf_create_on_device (const GPUVertFormat &format, uint v_len)
void blender::GPU_vertbuf_data_alloc (gpu::VertBuf &verts, uint v_len)
void blender::GPU_vertbuf_data_resize (gpu::VertBuf &verts, uint v_len)
void blender::GPU_vertbuf_data_len_set (gpu::VertBuf &verts, uint v_len)
void blender::GPU_vertbuf_attr_set (gpu::VertBuf *, uint a_idx, uint v_idx, const void *data)
void blender::GPU_vertbuf_vert_set (gpu::VertBuf *verts, uint v_idx, const void *data)
void blender::GPU_vertbuf_attr_fill (gpu::VertBuf *, uint a_idx, const void *data)
void blender::GPU_vertbuf_attr_fill_stride (gpu::VertBuf *, uint a_idx, uint stride, const void *data)
void blender::GPU_vertbuf_attr_get_raw_data (gpu::VertBuf *, uint a_idx, GPUVertBufRaw *access)
const GPUVertFormat * blender::GPU_vertbuf_get_format (const gpu::VertBuf *verts)
uint blender::GPU_vertbuf_get_vertex_alloc (const gpu::VertBuf *verts)
uint blender::GPU_vertbuf_get_vertex_len (const gpu::VertBuf *verts)
GPUVertBufStatus blender::GPU_vertbuf_get_status (const gpu::VertBuf *verts)
void blender::GPU_vertbuf_tag_dirty (gpu::VertBuf *verts)
void blender::GPU_vertbuf_use (gpu::VertBuf *)
void blender::GPU_vertbuf_bind_as_ssbo (gpu::VertBuf *verts, int binding)
void blender::GPU_vertbuf_bind_as_texture (gpu::VertBuf *verts, int binding)
void blender::GPU_vertbuf_wrap_handle (gpu::VertBuf *verts, uint64_t handle)
void blender::GPU_vertbuf_update_sub (gpu::VertBuf *verts, uint start, uint len, const void *data)
uint blender::GPU_vertbuf_get_memory_usage ()

Detailed Description

GPU vertex buffer

Definition in file GPU_vertex_buffer.hh.

Macro Definition Documentation

◆ GPU_VERTBUF_DISCARD_SAFE

#define GPU_VERTBUF_DISCARD_SAFE ( verts)
Value:
do { \
if (verts != nullptr) { \
GPU_vertbuf_discard(verts); \
verts = nullptr; \
} \
} while (0)

Definition at line 374 of file GPU_vertex_buffer.hh.

Referenced by blender::animviz_calc_motionpaths(), blender::draw::clear_edit_data(), blender::bke::motionpath::clear_preview_location(), blender::draw::curve_batch_cache_clear(), blender::draw::GSplatEvalCache::discard_attributes(), blender::draw::GSplatEvalCache::discard_buffers(), blender::draw::draw_patch_map_free(), blender::draw::draw_subdiv_cache_free(), blender::draw::draw_subdiv_cache_free_material_data(), blender::draw::draw_subdiv_free_edit_mode_cache(), blender::draw::DRW_curve_batch_cache_dirty_tag(), blender::draw::DRW_particles_batch_cache_get_edit_strands(), blender::bke::motionpath::free_cache(), blender::gpu::Context::free_resources(), blender::GPU_batch_clear(), blender::draw::grease_pencil_batch_cache_clear(), blender::draw::lattice_batch_cache_clear(), blender::draw::particle_batch_cache_clear(), blender::draw::particle_batch_cache_clear_hair(), blender::draw::particle_batch_cache_clear_point(), blender::draw::particle_batch_cache_ensure_edit_pos_and_seg(), blender::draw::particle_batch_cache_ensure_pos(), blender::draw::particle_batch_cache_ensure_pos_and_seg(), blender::draw::pointcloud_batch_cache_clear(), blender::draw::pointcloud_discard_attributes(), blender::draw::pointcloud_surface_shaded_get(), blender::bke::motionpath::set_preview_location(), blender::draw::test_draw_curves_interpolate_attributes(), blender::draw::test_draw_curves_interpolate_position(), blender::draw::test_draw_curves_lib(), blender::draw::test_draw_curves_topology(), blender::draw::volume_batch_cache_clear(), blender::draw::CurvesModule::~CurvesModule(), blender::draw::GSplatModule::~GSplatModule(), and blender::draw::PointCloudModule::~PointCloudModule().

◆ GPU_vertbuf_init_with_format