Class GeometricPrimitive<T>
- Namespace
 - Stride.Graphics.GeometricPrimitives
 
- Assembly
 - Stride.Graphics.dll
 
A geometric primitive used to draw a simple model built from a set of vertices and indices.
public class GeometricPrimitive<T> : ComponentBase, IDisposable, IComponent, IReferencable, ICollectorHolder where T : unmanaged, IVertex
  Type Parameters
T
- Inheritance
 - 
      objectGeometricPrimitive<T>
 
- Implements
 
- Derived
 
- Inherited Members
 
- Extension Methods
 
Constructors
GeometricPrimitive(GraphicsDevice, GeometricMeshData<T>)
Initializes a new instance of the GeometricPrimitive<T> class.
public GeometricPrimitive(GraphicsDevice graphicsDevice, GeometricMeshData<T> geometryMesh)
  Parameters
graphicsDeviceGraphicsDeviceThe graphics device.
geometryMeshGeometricMeshData<T>The geometry mesh.
Exceptions
- InvalidOperationException
 Cannot generate more than 65535 indices on feature level HW <= 9.3
Fields
GraphicsDevice
The default graphics device.
protected readonly GraphicsDevice GraphicsDevice
  Field Value
IndexBuffer
The index buffer used by this geometric primitive.
public readonly Buffer IndexBuffer
  Field Value
IsIndex32Bits
True if the index buffer is a 32 bit index buffer.
public readonly bool IsIndex32Bits
  Field Value
PipelineState
The pipeline state.
public readonly MutablePipelineState PipelineState
  Field Value
VertexBuffer
The vertex buffer used by this geometric primitive.
public readonly Buffer VertexBuffer
  Field Value
VertexBufferBinding
The input layout used by this geometric primitive (shared for all geometric primitive).
protected readonly VertexBufferBinding VertexBufferBinding
  Field Value
Methods
Draw(GraphicsContext, EffectInstance)
Draws this GeometricPrimitive.
public void Draw(GraphicsContext graphicsContext, EffectInstance effectInstance)
  Parameters
graphicsContextGraphicsContexteffectInstanceEffectInstance