RenderWare::IndexBuffer struct

A buffer that contains all the indices (so triangles) data.

For more information, check the official Direct3D 9 documentation:

Public static variables

static const uint32_t TYPE

Constructors, destructors, conversion operators

IndexBuffer()

Public functions

void ReleaseDirectX()
Releases the DirectX buffer.
void CreateDirectX()
Creates the DirectX buffer. This will set the 'pDXBuffer' field.
void LockDirectXData()
Sends the buffer data into the DirectX object.

Public variables

IDirect3DIndexBuffer9* pDXBuffer
Applications use the methods of the IDirect3DIndexBuffer9 interface to manipulate an index buffer resource.
size_t startIndex
The first index (not triangle, index) that will be rendered.
size_t indicesCount
Number of indices to render. The number of vertices used is a function of the indices count and the primitive type.
DWORD usage
Usage can be 0, which indicates no usage value.
D3DFORMAT format
Member of the D3DFORMAT enumerated type, describing the format of the index buffer. By default it's D3DFMT_INDEX16.
D3DPRIMITIVETYPE primitiveType
Member of the D3DPRIMITIVETYPE enumerated type, describing the type of primitive to render.
void* pIndexData
The raw data of the indices. If format is D3DFMT_INDEX16, this is a uint16_t array. If format is D3DFMT_INDEX32, this is a uint32_t array.

Variable documentation

DWORD RenderWare::IndexBuffer::usage

Usage can be 0, which indicates no usage value.

However, if usage is desired, use a combination of one or more D3DUSAGE constants. By default it's D3DUSAGE_WRITEONLY

D3DPRIMITIVETYPE RenderWare::IndexBuffer::primitiveType

Member of the D3DPRIMITIVETYPE enumerated type, describing the type of primitive to render.

By default it's D3DPT_TRIANGLELIST.