|
Blender
V2.93
|
#include <gpu_vertex_buffer_private.hh>
Inherited by blender::gpu::GLVertBuf.
Public Member Functions | |
| VertBuf () | |
| virtual | ~VertBuf () |
| void | init (const GPUVertFormat *format, GPUUsageType usage) |
| void | clear (void) |
| void | allocate (uint vert_len) |
| void | resize (uint vert_len) |
| void | upload (void) |
| VertBuf * | duplicate (void) |
| size_t | size_alloc_get (void) const |
| size_t | size_used_get (void) const |
| void | reference_add (void) |
| void | reference_remove (void) |
| virtual void | update_sub (uint start, uint len, void *data)=0 |
Public Attributes | |
| GPUVertFormat | format = {} |
| uint | vertex_len = 0 |
| uint | vertex_alloc = 0 |
| GPUVertBufStatus | flag = GPU_VERTBUF_INVALID |
| uchar * | data = NULL |
Static Public Attributes | |
| static size_t | memory_usage = 0 |
Protected Member Functions | |
| virtual void | acquire_data (void)=0 |
| virtual void | resize_data (void)=0 |
| virtual void | release_data (void)=0 |
| virtual void | upload_data (void)=0 |
| virtual void | duplicate_data (VertBuf *dst)=0 |
Protected Attributes | |
| GPUUsageType | usage_ = GPU_USAGE_STATIC |
Implementation of Vertex Buffers. Base class which is then specialized for each implementation (GL, VK, ...).
Definition at line 36 of file gpu_vertex_buffer_private.hh.
| blender::gpu::VertBuf::VertBuf | ( | ) |
Definition at line 46 of file gpu_vertex_buffer.cc.
|
virtual |
Definition at line 52 of file gpu_vertex_buffer.cc.
References BLI_assert, flag, and GPU_VERTBUF_INVALID.
|
protectedpure virtual |
Implemented in blender::gpu::GLVertBuf.
Referenced by allocate().
| void blender::gpu::VertBuf::allocate | ( | uint | vert_len | ) |
Definition at line 87 of file gpu_vertex_buffer.cc.
References acquire_data(), BLI_assert, data, flag, GPU_VERTBUF_DATA_DIRTY, vertex_alloc, and vertex_len.
| void blender::gpu::VertBuf::clear | ( | void | ) |
Definition at line 69 of file gpu_vertex_buffer.cc.
References flag, GPU_VERTBUF_INVALID, and release_data().
| VertBuf * blender::gpu::VertBuf::duplicate | ( | void | ) |
Definition at line 75 of file gpu_vertex_buffer.cc.
References duplicate_data(), blender::gpu::GPUBackend::get(), and blender::gpu::GPUBackend::vertbuf_alloc().
|
protectedpure virtual |
Implemented in blender::gpu::GLVertBuf.
Referenced by duplicate().
| void blender::gpu::VertBuf::init | ( | const GPUVertFormat * | format, |
| GPUUsageType | usage | ||
| ) |
Definition at line 58 of file gpu_vertex_buffer.cc.
References flag, GPU_VERTBUF_DATA_DIRTY, GPU_VERTBUF_INIT, GPU_vertformat_copy(), usage_, and VertexFormat_pack().
|
inline |
Definition at line 85 of file gpu_vertex_buffer_private.hh.
|
inline |
Definition at line 89 of file gpu_vertex_buffer_private.hh.
References BLI_assert.
|
protectedpure virtual |
Implemented in blender::gpu::GLVertBuf.
Referenced by clear().
| void blender::gpu::VertBuf::resize | ( | uint | vert_len | ) |
Definition at line 99 of file gpu_vertex_buffer.cc.
References BLI_assert, flag, GPU_VERTBUF_DATA_DIRTY, resize_data(), vertex_alloc, and vertex_len.
|
protectedpure virtual |
Implemented in blender::gpu::GLVertBuf.
Referenced by resize().
|
inline |
Definition at line 73 of file gpu_vertex_buffer_private.hh.
References BLI_assert, and vertex_alloc.
Referenced by blender::gpu::GLVertBuf::acquire_data(), and blender::gpu::GLVertBuf::resize_data().
|
inline |
Definition at line 79 of file gpu_vertex_buffer_private.hh.
References BLI_assert, and vertex_len.
Referenced by blender::gpu::GLVertBuf::bind(), and blender::gpu::GLVertBuf::duplicate_data().
Implemented in blender::gpu::GLVertBuf.
| void blender::gpu::VertBuf::upload | ( | void | ) |
Definition at line 110 of file gpu_vertex_buffer.cc.
References upload_data().
|
protectedpure virtual |
Implemented in blender::gpu::GLVertBuf.
Referenced by upload().
NULL indicates data in VRAM (unmapped)
Definition at line 48 of file gpu_vertex_buffer_private.hh.
Referenced by blender::gpu::GLVertBuf::acquire_data(), allocate(), blender::gpu::GLVertBuf::bind(), blender::gpu::GLVertBuf::duplicate_data(), blender::gpu::GLVertBuf::release_data(), blender::gpu::GLVertBuf::resize_data(), and blender::gpu::GLVertBuf::update_sub().
| GPUVertBufStatus blender::gpu::VertBuf::flag = GPU_VERTBUF_INVALID |
Status flag.
Definition at line 46 of file gpu_vertex_buffer_private.hh.
Referenced by allocate(), blender::gpu::GLVertBuf::bind(), clear(), init(), resize(), and ~VertBuf().
| GPUVertFormat blender::gpu::VertBuf::format = {} |
Definition at line 40 of file gpu_vertex_buffer_private.hh.
Referenced by blender::gpu::GLVertArray::update_bindings().
|
static |
Definition at line 38 of file gpu_vertex_buffer_private.hh.
Referenced by blender::gpu::GLVertBuf::bind(), blender::gpu::GLVertBuf::duplicate_data(), GPU_vertbuf_get_memory_usage(), and blender::gpu::GLVertBuf::release_data().
|
protected |
Usage hint for GL optimization.
Definition at line 52 of file gpu_vertex_buffer_private.hh.
Referenced by blender::gpu::GLVertBuf::bind(), blender::gpu::GLVertBuf::duplicate_data(), and init().
| uint blender::gpu::VertBuf::vertex_alloc = 0 |
Number of verts data.
Definition at line 44 of file gpu_vertex_buffer_private.hh.
Referenced by allocate(), resize(), and size_alloc_get().
| uint blender::gpu::VertBuf::vertex_len = 0 |
Number of verts we want to draw.
Definition at line 42 of file gpu_vertex_buffer_private.hh.
Referenced by allocate(), resize(), size_used_get(), and blender::gpu::GLVertArray::update_bindings().