Vixen
02b45cc4
csharp
public struct MeshDraw

One indexed draw: the buffers to bind and the range to draw from them.

Read the guide page for this →

Remarks

A value type in a RenderDataHolder array, so a mesh feature reads one per object with no indirection. That is why it holds handles rather than a reference to a mesh asset: the arrays are native memory, and what a draw call needs is the handle anyway.

One submesh, not a list. A mesh with three materials is three render objects sharing one pair of buffers, which is what lets each sort into its own place — a single object with a list inside it would have to pick one sort key for three different pipelines, and would be drawn at the wrong depth for two of them.

Fields and properties (10)

  • public BufferHandle VertexBuffer

    The vertex buffer, bound to slot 0.

  • public BufferHandle IndexBuffer

    The index buffer. Invalid for a non-indexed draw.

  • public IndexFormat IndexFormat

    Whether the indices are 16- or 32-bit.

  • public int Count

    How many indices — or vertices, when there is no index buffer — to draw.

  • public int FirstIndex

    The first index into the index buffer.

  • public int VertexOffset

    Added to every index before the vertex is fetched.

  • public int InstanceCount

    How many instances. One for an ordinary draw.

  • public int VertexLayout

    Which vertex layout the buffer uses, as an index into the describer's table.

  • public readonly bool IsDrawable

    Whether this draw has anything to draw.

  • public readonly bool IsIndexed

    Whether it goes through the index buffer.

Used by (33)

  • BindlessFrameTestsVixen.Rendering.Tests
  • ClusteredLightingTestsVixen.Rendering.Tests
  • ClusteredShadingDeviceTestsVixen.Graphics.Golden.Tests
  • CompositorAssetTestsVixen.Rendering.Tests
  • CompositorImageTestsVixen.Graphics.Golden.Tests
  • DepthPrepassTestsVixen.Rendering.Tests
  • DescriptorBindingTestsVixen.Rendering.Tests
  • DrawCompactionTestsVixen.Rendering.Tests
  • ForwardFrameTestsVixen.Rendering.Tests
  • ForwardLightingTestsVixen.Rendering.Tests
  • GeometryBufferVixen.Rendering
  • GeometryBufferTestsVixen.Rendering.Tests
  • GpuVisibilityGroupTestsVixen.Rendering.Tests
  • GraphicsCompositorTestsVixen.Rendering.Tests
  • IrradianceBounceDeviceTestsVixen.Graphics.Golden.Tests
  • IrradianceShadingDeviceTestsVixen.Graphics.Golden.Tests
  • LodTestsVixen.Rendering.Tests
  • MaterialBindingTestsVixen.Rendering.Tests
  • MaterialRecordBufferTestsVixen.Rendering.Tests
  • MaterialTextureIndexTestsVixen.Rendering.Tests
  • MeshExtractionSystemVixen.Rendering
  • MeshExtractionTestsVixen.Rendering.Tests
  • MeshRenderFeatureVixen.Rendering
  • MeshRenderFeatureTestsVixen.Rendering.Tests
  • ParticleRenderFeatureVixen.Rendering
  • ParticleRenderFeatureTestsVixen.Rendering.Tests
  • PunctualShadowTestsVixen.Rendering.Tests
  • SceneLightingTestsVixen.Rendering.Tests
  • ShadowCacheTestsVixen.Rendering.Tests
  • ShadowMapRendererTestsVixen.Rendering.Tests
  • SkinningAndInstancingTestsVixen.Rendering.Tests
  • TransformRecordTestsVixen.Rendering.Tests
  • VirtualGeometryGoldenTestsVixen.Graphics.Golden.Tests