|
Blender V4.3
|
#include <gpu_uniform_buffer_private.hh>
Inherited by blender::gpu::GLUniformBuf, blender::gpu::MTLUniformBuf, and blender::gpu::VKUniformBuffer.
Public Member Functions | |
| UniformBuf (size_t size, const char *name) | |
| virtual | ~UniformBuf () |
| virtual void | update (const void *data)=0 |
| virtual void | clear_to_zero ()=0 |
| virtual void | bind (int slot)=0 |
| virtual void | bind_as_ssbo (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 28 of file gpu_uniform_buffer_private.hh.
| blender::gpu::UniformBuf::UniformBuf | ( | size_t | size, |
| const char * | name ) |
Definition at line 31 of file gpu_uniform_buffer.cc.
References BLI_assert, name_, size(), size_in_bytes_, and STRNCPY.
|
virtual |
Definition at line 41 of file gpu_uniform_buffer.cc.
References data_, and MEM_SAFE_FREE.
|
inline |
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 50 of file gpu_uniform_buffer_private.hh.
Referenced by GPU_uniformbuf_create_from_list().
|
pure virtual |
Implemented in blender::gpu::GLUniformBuf, blender::gpu::MTLUniformBuf, and blender::gpu::VKUniformBuffer.
|
pure virtual |
Implemented in blender::gpu::GLUniformBuf, blender::gpu::MTLUniformBuf, and blender::gpu::VKUniformBuffer.
|
pure virtual |
Implemented in blender::gpu::GLUniformBuf, blender::gpu::MTLUniformBuf, and blender::gpu::VKUniformBuffer.
|
pure virtual |
Implemented in blender::gpu::GLUniformBuf, blender::gpu::MTLUniformBuf, and blender::gpu::VKUniformBuffer.
|
pure virtual |
Implemented in blender::gpu::GLUniformBuf, blender::gpu::MTLUniformBuf, and blender::gpu::VKUniformBuffer.
Referenced by GPU_uniformbuf_create_ex().
|
protected |
Continuous memory block to copy to GPU. This data is owned by the UniformBuf.
Definition at line 33 of file gpu_uniform_buffer_private.hh.
Referenced by attach_data(), blender::gpu::GLUniformBuf::bind(), blender::gpu::MTLUniformBuf::bind(), blender::gpu::GLUniformBuf::bind_as_ssbo(), blender::gpu::MTLUniformBuf::bind_as_ssbo(), blender::gpu::VKUniformBuffer::ensure_updated(), and ~UniformBuf().
|
protected |
Debugging name
Definition at line 35 of file gpu_uniform_buffer_private.hh.
Referenced by blender::gpu::GLUniformBuf::bind(), blender::gpu::MTLUniformBuf::get_name(), UniformBuf(), and blender::gpu::MTLUniformBuf::update().
|
protected |
Data size in bytes.
Definition at line 31 of file gpu_uniform_buffer_private.hh.
Referenced by blender::gpu::MTLUniformBuf::bind_as_ssbo(), blender::gpu::MTLUniformBuf::clear_to_zero(), blender::gpu::MTLUniformBuf::get_size(), blender::gpu::VKUniformBuffer::size_in_bytes(), UniformBuf(), blender::gpu::GLUniformBuf::update(), blender::gpu::MTLUniformBuf::update(), and blender::gpu::VKUniformBuffer::update().