Jump to content

  • Log In with Google      Sign In   
  • Create Account

Interested in a FREE copy of HTML5 game maker Construct 2?

We'll be giving away three Personal Edition licences in next Tuesday's GDNet Direct email newsletter!

Sign up from the right-hand sidebar on our homepage and read Tuesday's newsletter for details!


We're also offering banner ads on our site from just $5! 1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


D3D quads


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1 Teflaun   Members   -  Reputation: 122

Like
Likes
Like

Posted 20 December 1999 - 04:04 AM

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


Sponsor:

#2 NuFAN   Members   -  Reputation: 122

Like
Likes
Like

Posted 20 December 1999 - 04:04 AM

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





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS