Implementation
of
the
IPrimitiveRenderer
interface
that
uses
a
Direct3D
9
IDirect3DDevice9
COM
object.
sealed class
|
DirectX9PrimitiveRenderer
|
implements
|
IPrimitiveRenderer
|
Creates a new instance of DirectX9PrimitiveRenderer.
public
constructor
|
DirectX9PrimitiveRenderer
(IntPtr device)
|
||
params
|
device
|
The
IDirect3DDevice9*
COM
pointer. |
Draws primitives.
public
method
|
DrawPrimitives
(Primitive primitive,
int32 firstVertex,
int32 vertexCount)
|
||
params
|
primitive
|
The type of primitive to draw. | |
firstVertex
|
[>=0]
|
First vertex to draw. | |
vertexCount
|
[>=0]
|
The number of vertices to draw (not ! primitive count). | |
implements
|
IPrimitiveRenderer.DrawPrimitives
|
Remarks:
The vertices are stored in an IVertexBuffer object. The application is responsible for setting the proper render states.
Draws indexed primitives.
public
method
|
DrawPrimitivesIndexed
(Primitive primitive,
int32 firstIndex,
int32 indexCount,
int32 baseIndex = 0)
|
||
params
|
primitive
|
The type of primitive to draw. | |
firstIndex
|
[>=0]
|
First vertex index to draw. | |
indexCount
|
[>=0]
|
The number of vertex indices to draw (not ! primitive count). | |
baseIndex
|
[>=0]
|
Optional base index value. The base index will be added to each vertex index during rendering. | |
implements
|
IPrimitiveRenderer.DrawPrimitivesIndexed
|
Remarks:
The vertex indices of the primitive are stored in an IIndexBuffer object, the vertices are stored in an IVertexBuffer object. The application is responsible for setting the proper render states.
Exactly indexCount indices will read from the index buffer, starting at the buffer index firstIndex (not ! byte offset).