Class DrawCall
Namespace: ValveResourceFormat.Renderer
Assembly: Renderer.dll
Single GPU draw operation with geometry, material, and render state.
public class DrawCallInheritance
Properties
BaseVertex
Gets or sets the base vertex offset applied to all indices.
public int BaseVertex { get; set; }Property Value
DrawBounds
Gets or sets the optional bounding box used for draw-level culling.
public AABB? DrawBounds { get; set; }Property Value
AABB?
FirstMeshlet
Gets or sets the index of the first meshlet for this draw call.
public int FirstMeshlet { get; set; }Property Value
IndexBuffer
Gets or sets the index buffer binding for this draw call.
public IndexDrawBuffer IndexBuffer { get; set; }Property Value
IndexCount
Gets or sets the number of indices to draw.
public int IndexCount { get; set; }Property Value
IndexSizeInBytes
Gets the size in bytes of a single index element.
public int IndexSizeInBytes { get; }Property Value
IndexType
Gets or sets the data type of each element in the index buffer.
public DrawElementsType IndexType { get; set; }Property Value
DrawElementsType
Material
Gets or sets the render material applied to this draw call.
public required RenderMaterial Material { get; set; }Property Value
MeshBuffers
Gets the GPU mesh buffer cache that owns the buffers for this draw call.
public required GPUMeshBufferCache MeshBuffers { get; init; }Property Value
MeshId
Gets or sets the mesh identifier used for picking.
public int MeshId { get; set; }Property Value
MeshName
Gets or sets the name of the mesh this draw call belongs to.
public string MeshName { get; set; }Property Value
NumMeshlets
Gets or sets the number of meshlets in this draw call.
public int NumMeshlets { get; set; }Property Value
PrimitiveType
Gets or sets the OpenGL primitive type for this draw call.
public PrimitiveType PrimitiveType { get; set; }Property Value
PrimitiveType
StartIndex
Gets or sets the byte offset into the index buffer where drawing begins.
public nint StartIndex { get; set; }Property Value
TintColor
Gets or sets the per-draw-call tint color multiplier.
public Vector4 TintColor { get; set; }Property Value
VertexArrayObject
Gets or sets the OpenGL vertex array object handle, or -1 if not yet created.
public int VertexArrayObject { get; set; }Property Value
VertexBuffers
Gets the vertex buffer bindings used by this draw call.
public required VertexDrawBuffer[] VertexBuffers { get; init; }Property Value
VertexCount
Gets or sets the number of vertices in the draw call.
public uint VertexCount { get; set; }Property Value
VertexIdOffset
Gets or sets the vertex ID offset used for morph target lookup.
public int VertexIdOffset { get; set; }Property Value
Methods
DeleteVertexArrayObject()
Deletes the OpenGL VAO for this draw call.
public void DeleteVertexArrayObject()SetNewMaterial(RenderMaterial)
Replaces the material and rebuilds the vertex array object if the shader is ready.
public void SetNewMaterial(RenderMaterial newMaterial)Parameters
newMaterial RenderMaterial
The new material to assign.
UpdateVertexArrayObject()
Creates or refreshes the vertex array object for the current material shader.
public int UpdateVertexArrayObject()Returns
The OpenGL VAO handle.

