bindGeometry method
Bind a surface's geometry (vertex/index buffers) and draw.
Implementation
void bindGeometry(Surface surface) {
_renderPass
..bindVertexBuffer(
GpuBufferView(
surface.resource,
offsetInBytes: 0,
lengthInBytes: surface.verticesBytes,
),
surface.vertexCount,
)
..bindIndexBuffer(
GpuBufferView(
surface.resource,
offsetInBytes: surface.verticesBytes,
lengthInBytes: surface.indicesBytes,
),
GpuIndexType.uint16,
surface.indexCount,
)
..draw();
}