Class RenderVao
Namespace: ValveResourceFormat.Renderer
Assembly: Renderer.dll
Vertex array state for geometry that is unique per pipeline. Bind sites probe this with the shader about to be used. The VAOs themselves are created and owned by
, keyed by the shader plus the actual GPU buffer handles involved; thisonly memoizes the most recent lookups so repeat draws with the same shader skip the dictionary lookup.
public class RenderVaoInheritance
Constructors
RenderVao(GPUMeshBufferCache, VertexDrawBuffer[], int, VsInputSignature, string?)
Vertex array state for geometry that is unique per pipeline. Bind sites probe this with the shader about to be used. The VAOs themselves are created and owned by
, keyed by the shader plus the actual GPU buffer handles involved; thisonly memoizes the most recent lookups so repeat draws with the same shader skip the dictionary lookup.
public RenderVao(GPUMeshBufferCache meshBuffers, VertexDrawBuffer[] vertexBuffers, int indexBuffer, Material.VsInputSignature inputSignature, string? debugLabel = null)Parameters
meshBuffers GPUMeshBufferCache
The cache that creates and owns the VAOs.
vertexBuffers VertexDrawBuffer[]
Vertex buffer bindings describing the geometry layout.
indexBuffer int
OpenGL handle of the index buffer, or 0 for non-indexed geometry.
inputSignature Material.VsInputSignature
Material input signature mapping buffer semantics to shader attribute names.
debugLabel string?
Optional label applied to newly created VAOs in debug builds.
RenderVao(GPUMeshBufferCache, string?, int, int, RenderInputLayoutField[], int, VsInputSignature)
Initializes vertex array state for geometry in a single vertex buffer.
public RenderVao(GPUMeshBufferCache meshBuffers, string? debugLabel, int vertexBuffer, int stride, VBIB.RenderInputLayoutField[] inputLayoutFields, int indexBuffer = 0, Material.VsInputSignature inputSignature = default)Parameters
meshBuffers GPUMeshBufferCache
The cache that creates and owns the VAOs.
debugLabel string?
Optional label applied to newly created VAOs in debug builds.
vertexBuffer int
OpenGL handle of the vertex buffer.
stride int
Size in bytes of a single vertex.
inputLayoutFields VBIB.RenderInputLayoutField[]
Input layout describing the vertex attributes.
indexBuffer int
OpenGL handle of the index buffer, or 0 for non-indexed geometry.
inputSignature Material.VsInputSignature
Optional material input signature mapping buffer semantics to shader attribute names.
Methods
Delete()
Deletes the cached VAOs built from this state's buffers. Call before deleting a buffer that is not tracked by , so no VAO is left referencing it.
public void Delete()Get(Shader)
Returns the VAO matching the given shader, creating it through the cache on first use.
public int Get(Shader shader)Parameters
shader Shader
The shader the geometry is about to be rendered with.
Returns
The OpenGL VAO handle.

