n00b texture mapping problem

Started by
12 comments, last by k0lpA 20 years, 1 month ago
Have you set your D3DRS_CULLMODE renderstate? If not, set it to D3DCULL_NONE. The default is D3DCULL_CCW, which only shows counter-clockwise triangles. Although you said you rearranged your vertices... Worth a try, nonetheless.

App.D3D_device->SetRenderState(D3DRS_CULLMODE, D3DCULL_CCW);

int Agony() { return *((int*)0); } Mwahaha... >8)
"We should have a great fewer disputes in the world if words were taken for what they are, the signs of our ideas only, and not for things themselves." - John Locke
Advertisement
not the problem, culling is off
FIRST, I''d check your sizeof(TexVertex) to make sure that''s returning the size of ONE vertex data and not the size of the whole vertex data.

Also might want to verify that your structure matches your MyVertex flags. I''ve seen some unusal behavior when they don''t (e.g. If you specify the material flag but your structure doesn''t include the appropriate field, etc.)

Only other thing I can see that''s slightly suspect is SetVertexShader. In the DirectX 9 samples they use SetFVF. Might be the same thing, just a thought.

"Good code will come and go, but bad code sticks around."
"Good code will come and go, but bad code sticks around."
sizeof(TexVertex) is 1 vertex data, yup
the MyVertex Flag is ok too since I can see 1 of the triangles with the texture
also : since I changed my vertex texture coordinates, the other triangle seems to have the same colors as the texture but is totaly messed.

This topic is closed to new replies.

Advertisement