|
发表于 2011-11-20 13:11:00
|
显示全部楼层
Re:direct3d 绘制矩形,不显示矩形。
好好检查你的bool Direct3DFrame::Setup()函数,m_ib创建出错了。
// define the triangle of the cube:
WORD* indices = NULL;
m_vb->Lock(0, 0, (void**)&indices, 0);
// front side
indices[0] = 0; indices[1] = 1; indices[2] = 2;
indices[3] = 0; indices[4] = 2; indices[5] = 3;
同时,提醒一下,DX默认裁剪方式是D3DCULL_CCW,逆时针裁剪,画不出来也要注意检查这个 |
|