D3DVERTEXBUFFER_DESC
Describes a vertex buffer.
Type D3DVERTEXBUFFER_DESC
format As CONST_D3DFORMAT
FVF As Long
Pool As CONST_D3DPOOL
size As Long
type As CONST_D3DRESOURCETYPE
Usage As Long
End Type
Members
- format
- A member of the CONST_D3DFORMAT enumeration, describing the surface format of the vertex buffer data.
- FVF
- A combination of flexible vertex format flags that describes the vertex format of the vertices in this buffer.
- Pool
- A member of the CONST_D3DPOOL enumeration, specifying the class of memory allocated for this vertex buffer.
- size
- The size of the vertex buffer, in bytes
- type
- A member of the CONST_D3DRESOURCETYPE enumeration, identifying this resource as a vertex buffer.
- Usage
- A combination of one or more of the following flags defined by the CONST_D3DUSAGEFLAGS enumeration, specifying the usage for this resource.
- D3DUSAGE_DONOTCLIP
- Set to indicate that the vertex buffer content will never require clipping.
- D3DUSAGE_DYNAMIC
- Set to indicate that the vertex buffer requires dynamic memory use. This is useful for drivers because it enables them to decide where to place the buffer. In general, static vertex buffers are placed in video memory and dynamic vertex buffers are placed in AGP memory. Note that there is no separate static use; if you do not specify D3DUSAGE_DYNAMIC the vertex buffer is made static. D3DUSAGE_DYNAMIC is strictly enforced through the D3DLOCK_DISCARD and D3DLOCK_NOOVERWRITE locking flags. As a result, D3DLOCK_DISCARD and D3DLOCK_NOOVERWRITE are only valid on vertex buffers created with D3DUSAGE_DYNAMIC; they are not valid flags on static vertex buffers.
For more information about using dynamic vertex buffers, see Using Dynamic Vertex and Index Buffers.
Note that D3DUSAGE_DYNAMIC cannot be specified on managed vertex buffers. For more information, see Managing Resources.
- D3DUSAGE_HOSURFACES
- Set to indicate when the vertex buffer is to be used for drawing high-order primitives.
- D3DUSAGE_RTPATCHES
- Set to indicate when the vertex buffer is to be used for drawing high-order primitives.
- D3DUSAGE_NPATCHES
- Set to indicate when the vertex buffer is to be used for drawing N patches.
- D3DUSAGE_POINTS
- Set to indicate when the vertex buffer is to be used for drawing point sprites or indexed point lists.
- D3DUSAGE_SOFTWAREPROCESSING
- Set to indicate that the vertex buffer is to be used with software vertex processing.
- D3DUSAGE_WRITEONLY
- Informs the system that the application writes only 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.
See Also
Direct3DVertexBuffer8.GetDesc