Platform SDK: DirectX

D3DVERTEXBUFFERDESC

The D3DVERTEXBUFFERDESC structure describes the properties of a vertex buffer object. This structure is used with the IDirect3D7::CreateVertexBuffer and IDirect3DVertexBuffer7::GetVertexBufferDesc methods.

typedef struct _D3DVERTEXBUFFERDESC {
    DWORD dwSize;
    DWORD dwCaps;
    DWORD dwFVF;
    DWORD dwNumVertices;
} D3DVERTEXBUFFERDESC, *LPD3DVERTEXBUFFERDESC;

Members

dwSize
Size of this structure, in bytes. This member must be initialized before the structure is used.
dwCaps
Capability flags that describe the vertex buffer and identify whether the vertex buffer can contain optimized vertex data. This parameter can be any combination of the following flags:
(none)
The vertex buffer should be created in whatever memory the driver chooses, to allow efficient read operations.
D3DVBCAPS_DONOTCLIP
The vertex buffer cannot contain clipping information.
D3DVBCAPS_OPTIMIZED
The vertex buffer can contain optimized vertex data. (This flag is not used when creating a new vertex buffer.)
D3DVBCAPS_SYSTEMMEMORY
The vertex buffer should be created in system memory. Use this capability for vertex buffers to be rendered by using a software device (MMX or RGB device) or a HAL Device (IID_IDirect3DHALDevice).
D3DVBCAPS_WRITEONLY
Informs the system that the application only writes to the vertex buffer. Using this flag enables the driver to choose the best memory location for efficient write operations and rendering. Attempts to read from a vertex buffer that is created with this capability can result in degraded performance.
dwFVF
A combination of flexible vertex format flags that describes the vertex format of the vertices in this buffer.
dwNumVertices
The maximum number of vertices that this vertex buffer can contain. The maximum number of vertices allowed is D3DMAXNUMVERTICES (0xFFFF).

Remarks

Software devices—MMX and RGB devices—cannot render from a video memory (local or nonlocal) vertex buffer. If you want to render a vertex buffer, using a software device, the vertex buffer must exist in system memory. Hardware devices can render from system memory or video memory vertex buffers.

Requirements

  Windows NT/2000: Requires Windows 2000.
  Windows 95/98: Requires Windows 95 or later. Available as a redistributable for Windows 95.
  Version: Requires DirectX 6.0 or later.
  Header: Declared in d3dtypes.h.

See Also

Vertex Buffer Descriptions, Vertex Buffers