D3DTLVERTEX

Started by
3 comments, last by 303 23 years, 9 months ago
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...
Advertisement
You have them in the wrong order.
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 );    
that doesn''t help... and i did have D3DCULL_NONE as a culling mode already.
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
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