摘要:
主要代码如下:1 顶点结构struct CUSTOMVERTEX{FLOAT x, y, z;DWORD color;};#define D3DFVF_CUSTOMVERTEX (D3DFVF_XYZ|D3DFVF_DIFFUSE) //顶点格式2 顶点buf创建,填充CUSTOMVERTEX vertices[] ={{ 1.0f, 3.0f, 0.0f, 0xffff0000, },{ 2.0f, 1.0f, 0.0f, 0xff00ff00, }, { 1.5f, 0.2f, 0.0f, 0xff0000ff, },};//创建顶点缓冲区if( FAILED( g_pd3dDevice- 阅读全文