|
发表于 2004-3-12 13:55:00
|
显示全部楼层
Re:d3d程序无法正确显示
g_pD3DDevice->SetVertexShader(D3DFVF_CUSTOMVERTEX);
g_pD3DDevice->SetStreamSource(0, g_pVertexBuffer, sizeof(CUSTOMVERTEX));
#define D3DFVF_CUSTOMVERTEX (D3DFVF_XYZ|D3DFVF_DIFFUSE)
struct CUSTOMVERTEX
{
FLOAT x, y, z;
FLOAT nx, ny,nz;
// FLOAT tu, tv;
};
Direct3D8: (ERROR) :Stream 0 stride should match the stride, implied by the current vertex shader
意思是说你的顶点流(Stream)和你声明的格式(vertex shader)不匹配
|
|