• Advertisement

Archived

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

D3D quads

This topic is 6607 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

Using two D3D triangles to make a quad, what is the size of the quad in 3D space that a 64x64 tile would be? 64?

D3DLVERTEX v[4];
v[0] = D3DLVERTEX(D3DVECTOR(-32, 32,500),D3DRGB(1.0,1.0,1.0),D3DRGB(0,0,0),0,0);
v[1] = D3DLVERTEX(D3DVECTOR( 32, 32,500),D3DRGB(1.0,1.0,1.0),D3DRGB(0,0,0),1,0);
v[2] = D3DLVERTEX(D3DVECTOR(-32,-32,500),D3DRGB(1.0,1.0,1.0),D3DRGB(0,0,0),0,1);
v[3] = D3DLVERTEX(D3DVECTOR( 32,-32,500),D3DRGB(1.0,1.0,1.0),D3DRGB(0,0,0),1,1);

Share this post


Link to post
Share on other sites
Advertisement
Hi,
it only depends on you. You might set the camera far away from the triangles, so they would be smaller. But my suggestion would be using D3DTLVERTEX, because then you use untransformed and unlit vertices and simply use the screen coords for the verts. So, you want it to be 64x64 ? Then simply use
code:

D3DVECTOR no1 = (0, 0, 0);
D3DVECTOR no2 = (0, 64, 0);
D3DVECTOR no3 = (64, 64, 0);
D3DVECTOR no4 = (64, 0, 0);

And that's it. The texture should exactly fit onto the quad.

CU

------------------
Skullpture Entertainment
#40842461

Share this post


Link to post
Share on other sites

  • Advertisement