D3DTLVERTEX
can someone tell me what''s wrong with this:
D3DTLVERTEX plane[4];
plane[0] = D3DTLVERTEX( D3DVECTOR( -150, 0, -150 ), 0.5f, 0xffffffff, 0, 0.0f, 0.0f );
plane[1] = D3DTLVERTEX( D3DVECTOR( 150, 0, -150 ), 0.5f, 0xffffffff, 0, 0.0f, 0.0f );
plane[2] = D3DTLVERTEX( D3DVECTOR( -150, 0, 150 ), 0.5f, 0xffffffff, 0, 0.0f, 0.0f );
plane[3] = D3DTLVERTEX( D3DVECTOR( 150, 0, 150 ), 0.5f, 0xffffffff, 0, 0.0f, 0.0f );
pd3dDevice->DrawPrimitive( D3DPT_TRIANGLESTRIP, D3DFVF_TLVERTEX, plane, 4, 0 );
it just doesn''t render anything...
You have them in the wrong order.
Try this:
Try this:
plane[0] = D3DTLVERTEX( D3DVECTOR( -150, 0, 150 ), 0.5f, 0xffffffff, 0, 0.0f, 0.0f );plane[1] = D3DTLVERTEX( D3DVECTOR( 150, 0, 150 ), 0.5f, 0xffffffff, 0, 0.0f, 0.0f );plane[2] = D3DTLVERTEX( D3DVECTOR( -150, 0, -150 ), 0.5f, 0xffffffff, 0, 0.0f, 0.0f );plane[3] = D3DTLVERTEX( D3DVECTOR( 150, 0, -150 ), 0.5f, 0xffffffff, 0, 0.0f, 0.0f );
the order should be like this :
O 3
1 2
where the above numbers are the index for yur array. Btw, U need to specify correct texture coordinates too
O 3
1 2
where the above numbers are the index for yur array. Btw, U need to specify correct texture coordinates too
Shouldn''t you be setting the x and y coordinates, and leaving the z coordinate as 0?
*** Triality ***
*** Triality ***
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement