Original Post
Hi,
I have a very weird when I try to show a texture on a surface create by a series of vertex. Only one color of my texture is show on the entire surface. I think it might have something to do with my coordinate or with with the type of vertex I''m using. Let me know what you think.
(This is my list of vertex, my customVertex are using Position,Normal,Diffuse,Specular & 1 set of Texture Coord)
////
CUSTOMVERTEX* pListVertex;
pListVertex = new CUSTOMVERTEX[4];
pListVertex[0].position = D3DXVECTOR3(-1.0f,1.0f,0.0f);
pListVertex[0].normal = D3DXVECTOR3(0.0f,0.0f,-1.0f);
pListVertex[0].diffuse = D3DXCOLOR (0.1f,0.1f,0.1f,0.1f);
pListVertex[0].specular = D3DXCOLOR (0.1f,0.1f,0.1f,0.1f);
pListVertex[0].u = 0.0f;
pListVertex[0].v = 0.0f;
pListVertex[1].position = D3DXVECTOR3(1.0f,1.0f,0.0f);
pListVertex[1].normal = D3DXVECTOR3(0.0f,0.0f,-1.0f);
pListVertex[1].diffuse = D3DXCOLOR (0.1f,0.1f,0.1f,0.1f);
pListVertex[1].specular = D3DXCOLOR (0.1f,0.1f,0.1f,0.1f);
pListVertex[1].u = 1.0f;
pListVertex[1].v = 0.0f;
pListVertex[2].position = D3DXVECTOR3(-1.0f,-1.0f,0.0f);
pListVertex[2].normal = D3DXVECTOR3(0.0f,0.0f,-1.0f);
pListVertex[2].diffuse = D3DXCOLOR (0.1f,0.1f,0.1f,0.1f);
pListVertex[2].specular = D3DXCOLOR (0.1f,0.1f,0.1f,0.1f);
pListVertex[2].u = 0.0f;
pListVertex[2].v = 1.0f;
pListVertex[3].position = D3DXVECTOR3(1.0f,-1.0f,0.0f);
pListVertex[3].normal = D3DXVECTOR3(0.0f,0.0f,-1.0f);
pListVertex[3].diffuse = D3DXCOLOR (0.1f,0.1f,0.1f,0.1f);
pListVertex[3].specular = D3DXCOLOR (0.1f,0.1f,0.1f,0.1f);
pListVertex[3].u = 1.0f;
pListVertex[3].v = 1.0f;
////
I''m also using normal material and normal lighting. I''ve read the docs but they barely mention the usage of Light + Material + Texture.
Does anyone have any idea of what could be the problem ?
Nick