Blender
V3.3
|
#include <gl_vertex_buffer.hh>
Public Member Functions | |
void | bind () |
void | update_sub (uint start, uint len, const void *data) override |
const void * | read () const override |
void * | unmap (const void *mapped_data) const override |
void | wrap_handle (uint64_t handle) override |
![]() | |
VertBuf () | |
virtual | ~VertBuf () |
void | init (const GPUVertFormat *format, GPUUsageType usage) |
void | clear () |
void | allocate (uint vert_len) |
void | resize (uint vert_len) |
void | upload () |
VertBuf * | duplicate () |
size_t | size_alloc_get () const |
size_t | size_used_get () const |
void | reference_add () |
void | reference_remove () |
Protected Member Functions | |
void | acquire_data () override |
void | resize_data () override |
void | release_data () override |
void | upload_data () override |
void | duplicate_data (VertBuf *dst) override |
void | bind_as_ssbo (uint binding) override |
void | bind_as_texture (uint binding) override |
Friends | |
class | GLTexture |
class | GLShader |
class | GLStorageBuf |
Additional Inherited Members | |
![]() | |
GPUVertFormat | format = {} |
uint | vertex_len = 0 |
uint | vertex_alloc = 0 |
GPUVertBufStatus | flag = GPU_VERTBUF_INVALID |
uchar * | data = nullptr |
![]() | |
static size_t | memory_usage = 0 |
![]() | |
GPUUsageType | usage_ = GPU_USAGE_STATIC |
Definition at line 21 of file gl_vertex_buffer.hh.
|
overrideprotectedvirtual |
Implements blender::gpu::VertBuf.
Definition at line 16 of file gl_vertex_buffer.cc.
References blender::gpu::VertBuf::data, GPU_USAGE_DEVICE_ONLY, MEM_mallocN, MEM_SAFE_FREE, blender::gpu::VertBuf::size_alloc_get(), and blender::gpu::VertBuf::usage_.
void blender::gpu::GLVertBuf::bind | ( | ) |
Definition at line 83 of file gl_vertex_buffer.cc.
References BLI_assert, blender::gpu::VertBuf::data, blender::gpu::VertBuf::flag, blender::gpu::GLContext::get(), GPU_USAGE_DEVICE_ONLY, GPU_USAGE_STATIC, GPU_VERTBUF_DATA_DIRTY, GPU_VERTBUF_DATA_UPLOADED, MEM_SAFE_FREE, blender::gpu::VertBuf::memory_usage, blender::gpu::VertBuf::size_used_get(), blender::gpu::to_gl(), and blender::gpu::VertBuf::usage_.
Referenced by bind_as_ssbo(), bind_as_texture(), blender::gpu::GLVertArray::update_bindings(), and upload_data().
Implements blender::gpu::VertBuf.
Definition at line 111 of file gl_vertex_buffer.cc.
References bind(), and BLI_assert.
Implements blender::gpu::VertBuf.
Definition at line 118 of file gl_vertex_buffer.cc.
References bind(), BLI_assert, GPU_texture_bind(), GPU_texture_create_from_vertbuf(), and blender::gpu::wrap().
Implements blender::gpu::VertBuf.
Definition at line 52 of file gl_vertex_buffer.cc.
References BLI_assert, blender::gpu::VertBuf::data, blender::gpu::GLContext::get(), MEM_dupallocN, blender::gpu::VertBuf::memory_usage, src, blender::gpu::to_gl(), and blender::gpu::VertBuf::usage_.
|
overridevirtual |
Implements blender::gpu::VertBuf.
Definition at line 128 of file gl_vertex_buffer.cc.
References BLI_assert, and result.
|
overrideprotectedvirtual |
Implements blender::gpu::VertBuf.
Definition at line 36 of file gl_vertex_buffer.cc.
References blender::gpu::GLContext::buf_free(), blender::gpu::VertBuf::data, GPU_TEXTURE_FREE_SAFE, MEM_SAFE_FREE, and blender::gpu::VertBuf::memory_usage.
|
overrideprotectedvirtual |
Implements blender::gpu::VertBuf.
Definition at line 27 of file gl_vertex_buffer.cc.
References blender::gpu::VertBuf::data, GPU_USAGE_DEVICE_ONLY, MEM_reallocN, blender::gpu::VertBuf::size_alloc_get(), and blender::gpu::VertBuf::usage_.
Implements blender::gpu::VertBuf.
Definition at line 135 of file gl_vertex_buffer.cc.
References MEM_mallocN, and result.
|
overridevirtual |
Implements blender::gpu::VertBuf.
Definition at line 162 of file gl_vertex_buffer.cc.
References blender::gpu::VertBuf::data, and len.
|
overrideprotectedvirtual |
Implements blender::gpu::VertBuf.
Definition at line 78 of file gl_vertex_buffer.cc.
References bind().
Implements blender::gpu::VertBuf.
Definition at line 142 of file gl_vertex_buffer.cc.
References BLI_assert, blender::gpu::VertBuf::flag, and GPU_VERTBUF_DATA_UPLOADED.
|
friend |
Definition at line 23 of file gl_vertex_buffer.hh.
|
friend |
Definition at line 24 of file gl_vertex_buffer.hh.
|
friend |
Definition at line 22 of file gl_vertex_buffer.hh.