Blender
V3.3
|
#include <gpu_uniform_buffer_private.hh>
Public Member Functions | |
UniformBuf (size_t size, const char *name) | |
virtual | ~UniformBuf () |
virtual void | update (const void *data)=0 |
virtual void | bind (int slot)=0 |
virtual void | unbind ()=0 |
void | attach_data (void *data) |
Protected Attributes | |
size_t | size_in_bytes_ |
void * | data_ = nullptr |
char | name_ [DEBUG_NAME_LEN] |
Implementation of Uniform Buffers. Base class which is then specialized for each implementation (GL, VK, ...).
Definition at line 27 of file gpu_uniform_buffer_private.hh.
blender::gpu::UniformBuf::UniformBuf | ( | size_t | size, |
const char * | name | ||
) |
Definition at line 28 of file gpu_uniform_buffer.cc.
References BLI_assert, BLI_strncpy(), name_, size(), and size_in_bytes_.
|
virtual |
Definition at line 38 of file gpu_uniform_buffer.cc.
References data_, and MEM_SAFE_FREE.
Used to defer data upload at drawing time. This is useful if the thread has no context bound. This transfers ownership to this UniformBuf.
Definition at line 47 of file gpu_uniform_buffer_private.hh.
Referenced by GPU_uniformbuf_create_from_list().
|
pure virtual |
Implemented in blender::gpu::GLUniformBuf, and blender::gpu::MTLUniformBuf.
|
pure virtual |
Implemented in blender::gpu::GLUniformBuf, and blender::gpu::MTLUniformBuf.
Implemented in blender::gpu::GLUniformBuf, and blender::gpu::MTLUniformBuf.
Referenced by GPU_uniformbuf_create_ex().
|
protected |
Continuous memory block to copy to GPU. This data is owned by the UniformBuf.
Definition at line 32 of file gpu_uniform_buffer_private.hh.
Referenced by attach_data(), blender::gpu::MTLUniformBuf::bind(), blender::gpu::GLUniformBuf::bind(), and ~UniformBuf().
|
protected |
Debugging name
Definition at line 34 of file gpu_uniform_buffer_private.hh.
Referenced by blender::gpu::GLUniformBuf::bind(), blender::gpu::MTLUniformBuf::get_name(), and UniformBuf().
|
protected |
Data size in bytes.
Definition at line 30 of file gpu_uniform_buffer_private.hh.
Referenced by blender::gpu::MTLUniformBuf::get_size(), UniformBuf(), blender::gpu::MTLUniformBuf::update(), and blender::gpu::GLUniformBuf::update().