CUDA + DX10 Buffer links

Source: Internet
Author: User

Today, with the Cuda example, a rotated polygon is drawn in a CU file.

1. In the CU Riga Dxmath header file will be error, not resolved, and finally wrote a few math functions

2. When binding the VertexBuffer and Cudaresource in CPP files,

hr = Pd3ddevice->createbuffer (&BD, NULL, &g_pboxvertexbuffer);

Where the DESC BD does not have a BD set. miscflags= 0; And then it can't be drawn.

D3d10_buffer_desc BD;BD. Usage = d3d10_usage_default;bd. Bytewidth = sizeof (vertexstructcuda) * all_box_vertex_nums;bd. Bindflags = d3d10_bind_vertex_buffer;bd. cpuaccessflags = 0;    Bd. Miscflags      = 0;//unexpectedly because this did not draw out hr = Pd3ddevice->createbuffer (&BD, NULL, &g_pboxvertexbuffer); if (FAILED (HR)) return HR;

  

3. Note that IndexBuffer and VertexBuffer Desc are pointing to the same one before they can be drawn.

CUDA + DX10 Buffer links

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.