Class UniformBuffer<T>
Namespace: ValveResourceFormat.Renderer.Buffers
Assembly: Renderer.dll
Uniform buffer object that stores shader-accessible structured data on the GPU.
public class UniformBuffer<T> : Buffer, IDisposable where T : notnull, new()Type Parameters
T
The struct type to store in the buffer.
Inheritance
object ← Buffer ← UniformBuffer<T>
Implements
Inherited Members
Buffer.Target, Buffer.Handle, Buffer.BindingPoint, Buffer.Name, Buffer.Size, Buffer.BindBufferBase(), Buffer.SetBlockBinding(Shader), Buffer.Delete()
Constructors
UniformBuffer(int)
Initializes a new uniform buffer at the given binding point index.
public UniformBuffer(int bindingPoint)Parameters
bindingPoint int
The UBO binding point index.
UniformBuffer(ReservedBufferSlots)
Initializes a new uniform buffer at the given reserved slot.
public UniformBuffer(ReservedBufferSlots slot)Parameters
slot ReservedBufferSlots
The reserved buffer slot to bind to.
Properties
Data
Gets or sets the structured data stored in this uniform buffer, uploading to the GPU on set.
public T Data { get; set; }Property Value
T
Methods
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()Dispose(bool)
Releases the pinned CPU buffer handle held by this buffer.
protected virtual void Dispose(bool disposing)Parameters
disposing bool
Update()
Marshals into the intermediate CPU buffer and uploads it to the GPU.
public void Update()
