struct
render::GpuUniformBuffer
Base class for all uniform buffers.
Public
Methods
~GpuUniformBuffer
Initialize
Destroy
GetSize
Returns the size of the uniform buffer, in bytes.
CreateBuffer
Allocates a new buffer that can store all the members defined in this uniform buffer.
For buffers that are modified every frame prefer using AllocateTransient() instead.
CreateBuffer
Allocates a new buffer that can store all the members defined in this uniform buffer.
The buffer will have multiple sub-allocations, so it may store multiple instances of the data (e.g. one for each different objects). For buffers that are modified every frame prefer using AllocateTransient() instead.
AllocateTransient
Allocates a transient uniform buffer suballocation from the internal pool.
The transient allocation will remain valid for RenderThread::kMaximumFramesInFlight frames, after which it may be reused for other allocations. You should use this for uniform buffers that are updated every frame.
Note that transient buffer allocations might be larger than size returned by GetSize(), due to alignment requirements.