D3DVERTEXBUFFERDESC

The D3DVERTEXBUFFERDESC structure describes the properties of a vertex buffer object. This structure is used with the IDirect3D3::CreateVertexBuffer and IDirect3DVertexBuffer::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 if 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_OPTIMIZED
The vertex buffer contains 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 that will be rendered by using software devices (MMX and RGB devices).
D3DVBCAPS_WRITEONLY
Hints to the system that the application will only write 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.

Remarks

Software devices—MMX and RGB devices—cannot render from a video memory (local or non-local) vertex buffer. 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.

QuickInfo

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

See Also

Vertex Buffer Descriptions, Vertex Buffers