Hresult idirect3ddevice9: creatvertexbuffer (<br/> uintlength, // number of bytes allocated to the cache. To make the vertex cache enough to store eight vertices, set this parameter to 8 * sizeof (vertex), where vertex is the structure of the vertex defined. <Br/> dwordusage, // specify some additional attributes about how to use cache. This value can be 0 (indicating that no additional attribute is required) or one or some combination of the following tags <br/> // d3dusage_dynamic sets the cache as a dynamic cache. <Br/> // d3dusage_points this tag specifies that the cache will be used to store vertex elements. <Br/> // d3dusage_softwareprocessing specifies the software vertex calculation method. <Br/> // d3dusage_writeonly specifies that the application uses the write-only mode for caching ". In this way, the driver can store the cache in the memory address that is most suitable for writing <br/> // operations. Note: An error occurs when you perform read operations on the cache created using this tag. <Br/> dwordfvf, // flexible vertex format stored in the vertex cache. <Br/> d3dpoolpool // memory pool for caching. <Br/> idirect3dvertecbuffer9 ** ppvertexbuffer, // receives the pointer of the created vertex cache. <Br/> handle * psharedhandle // This value is set to 0. <br/>); <br/> hresult idirect3ddevice9: creatindexbuffer (<br/> uintlength, <br/> dwordusage, <br/> d3dformatformat, // specify the index size. The value d3dfmt_index16 indicates a 16-bit index, and the value d3dfmt_index32 indicates a 32-bit index. Note that not all graphics devices support 32-bit indexing. <Br/> d3dpoolpool, <br/> idirect3dindexbuffer9 ** ppindexbuffer, // receives the created index cache pointer. <Br/> handle * pw.handle <br/> );