[gameprogrammer] Re: issues with Calculating texture coordinates

if you just want to stretch the texture over the triangle in the
simplest, most basic way, just type something like

glTexCoord2f(0,0); // (0,0) is the top-left corner of texture
glVertex3f(0,0,-10);

glTexCoord2f(1,0); // (1,0) is the top-right corner of texture
glVertex3f(0,1,-10);

glTexCoord3f(1,1); // (1,1) is the bottom-right corner of texture
glVertex3f(1,1,-10);

good luck

/Olof


On 6/1/06, Gautam Narain <gautam_n_@xxxxxxxxxxx> wrote:
Hi Scott,

All I am trying to do is given a triangle in world coordinates -> <0, 0,
-10>, <0, 1, -10>, <1, 1, -10> calculate the texture coordinate using a
128x128 texture.

Thanks
Gautam




--------------------- To unsubscribe go to http://gameprogrammer.com/mailinglist.html





--

--~--~---------~--~----~------------~-------~--~----~
-~----------~----~----~----~------~----~------~--~---


--------------------- To unsubscribe go to http://gameprogrammer.com/mailinglist.html


Other related posts: