Archived

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

Texture Coordinates

This topic is 6359 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 anyone please explain more about texture coordinates from Tutorial #6? I''m not sure why only 2 coordinates are used and why only the values 0.0, 0.5, and 1.0 can be used. Thanks. |-|A[k3R$Z R \/\/|-|AT |V|Ak3 t|-|3 \/\/0R|_D g0 R0|_||\|D!!

Share this post


Link to post
Share on other sites
It's not true that you can only use 0.0, 0.5 and 1.0!
You can use EVERY number between 0.0 and 1.0.

ie. 0.1, 0.23423, 0.148934738957893465 or 0.24 are all good values.

There are 2 texture coordinates because texture maps only have 2 axes: S and T.

* S is the horizontal texture coordinate.
* T is the vertical texture coordinate.


(0.0).......................S......................(1.0)
...---------------------------------------
...|*****************************|
...|*****************************|
...|*****************************|
...|*****************************|
...|*****************************|
...|*****************************|
T.|***********(0.5, 0.5)***********|
...|*****************************|
...|*****************************|
...|*****************************|
...|*****************************|
...|*****************************|
...|*****************************|
...---------------------------------------
(0.1)...............................................(1.1)


Edited by - richardve on July 13, 2000 7:16:05 PM

Share this post


Link to post
Share on other sites
I think I understand now. The way I take it thus far is as follows:

Whatever point in the texture you pick using glTexCoord2f() will be mapped to the coordinates of the next glVertex3f() used, right? Basically, the 1x1 dimension of the texture applies only to the coordinate system of the texture itself and not to that of the GL_MODELVIEW matrix, correct?

Thanks for your help.

|-|A[k3R$Z R \/\/|-|AT |V|Ak3 t|-|3 \/\/0R|_D g0 R0|_||\|D!!

Share this post


Link to post
Share on other sites