|
|
从DX SDK的TUTORIAL里可以看到
// Turn off D3D lighting, since we are providing our own vertex colors
g_pd3dDevice->SetRenderState( D3DRS_LIGHTING, FALSE );
这里为什么要将灯光关掉?我试过打开后就显示不出3D图形,这里的
struct CUSTOMVERTEX
{
FLOAT x, y, z; // The untransformed, 3D position for the vertex
DWORD color; // The vertex color
};
// Our custom FVF, which describes our custom vertex structure
#define D3DFVF_CUSTOMVERTEX (D3DFVF_XYZ|D3DFVF_DIFFUSE)
如果我把color 换成 D3DXVECTOR3 normal,却仍然无法正常显示出来,为什么呢
|
|