14. Vertex and Index Buffer
14.1 Vertex Buffer
$app vbuffer numOfVertices sizeVertices usage fvf pool
$app vbuffer command creates a new vertex buffer with the parameters number of vertices and the vertice size.
Usage can be a value of {writeonly, dynamic, donotclip, npatches, points, rtpatches, softwareprocessing}. The writeonly specifies that the vbuffer is for write purpose. The dynamic allows vertex buffer to use dynamic memory. Do not use dyanmic and managed together.
The fvf is the FVF dword value in DX8. When it is 0 the vbuffer is created as a dynamic buffer.
Pool describes how to place resource in memory. It can be one of {default, managed, systemmem, scratch}. Default is usually means the video memory. Managed specifies that the vetext buffer could be in the main memory or video memory for optimization. Systemmem is the memory that can not be accessiable from a 3D device.
- $vbuffer lock and $vbuffer unlock command pair are used to lock and unlock the vertex buffer for its access.
14.2 Index Buffer
$app ibuffer nNumOfFaceSize usage format pool
$app ibuffer command creates a new index buffer with the number of surface faces.
Usage can be a value of {writeonly, dynamic, donotclip, npatches, points, rtpatches, softwareprocessing}. The writeonly specifies that the vbuffer is for write purpose. The dynamic allows vertex buffer to use dynamic memory. Do not use dyanmic and managed together.
Format can be index16 or index32. index16 specifies that the index is a 16-bit integer. index32 is for 32-bit integer.
Pool describes how to place resource in memory. It can be one of {default, managed, systemmem, scratch}. Default is usually means the video memory. Managed specifies that the vetext buffer could be in the main memory or video memory for optimization. Systemmem is the memory that can not be accessiable from a 3D device.
- $ibuffer lock and $ibuffer unlock command pair are used to lock and unlock the index buffer.
|