Draw in direct3d

Source: Internet
Author: User

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/> );

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.