• Advertisement

Archived

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

D3DTLVERTEX

This topic is 6394 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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
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 );

Share this post


Link to post
Share on other sites
that doesn''t help... and i did have D3DCULL_NONE as a culling mode already.

Share this post


Link to post
Share on other sites
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
Shouldn''t you be setting the x and y coordinates, and leaving the z coordinate as 0?

*** Triality ***

Share this post


Link to post
Share on other sites

  • Advertisement