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 RW_TYPE

Constructors, destructors, conversion operators

IndexBuffer()

Public functions

auto ReleaseDirectX() -> void
Releases the DirectX buffer.
auto CreateDirectX() -> void
Creates the DirectX buffer. This will set the 'pDXBuffer' field.
auto LockDirectXData() -> void
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.