|
以下代码:
struct CUSTOMVERTEX
{
D3DXVECTOR3 position;
D3DXVECTOR3 normal;
};
CUSTOMVERTEX cvVertices[] =
{
{D3DXVECTOR3(-5.0f, 5.0f, -5.0f), D3DXVECTOR3(0.0f, 0.0f, 0.0f),}, {D3DXVECTOR3(-5.0f, 5.0f, 5.0f), D3DXVECTOR3(0.0f, 0.0f, 0.0f),},
{D3DXVECTOR3(5.0f, 5.0f, -5.0f), D3DXVECTOR3(0.0f, 0.0f, 0.0f),},{D3DXVECTOR3(5.0f, 5.0f, 5.0f), D3DXVECTOR3(0.0f, 0.0f, 0.0f),},
};
却报错说:tutorial\DXProject3error C2440: 'initializing' : cannot convert from 'struct D3DXVECTOR3' to 'struct CUSTOMVERTEX'
但我所赋的值的数据格式的确符合我定义的格式呀。请各位指教。
|
|