Archived

This topic is now archived and is closed to further replies.

303

D3DTLVERTEX

Recommended Posts

303    122
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...

Share this post


Link to post
Share on other sites
Mr Cucumber    122
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 );

Share this post


Link to post
Share on other sites
Guest Anonymous Poster   
Guest Anonymous Poster
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

Share this post


Link to post
Share on other sites