Advertisement

Sphere Mapping and Specular Effects

Started by February 21, 2001 02:37 PM
1 comment, last by steveharper101 23 years, 9 months ago
What do S and T coordinates do? Are they similar to X and Y cooordinates but for textures. Also what does glTexGen and glTexEnvi do at a basic level? What does projection mode do ie glMatrixMode(GL_PROJECTON) compared to glMatrixMode(GL_MODELVIEW); I am only a begginer so forgive me if the questions are simple Cheers steve
S and T do indeed map so X and Y (or more commonuly u and v in the texture map)

glTexGen allows you to control how texture coords are generated when you have auto texture generation enabled.

The Modelview matrix is used to convert the local coords of the object into world coords.

The projection matrix is used to convert the world coords into 2D screen coords, using perspective projection, or orthographic projection, depending on how it was set up.

As a note, never move objects around using the projection matrix, always use the modelview one.

- Nutty.

P.S. I have some specular effects using sphere mapping source code on my website it''s www.nutty.org

Advertisement
Thanks for the reply it''s realy made things much clearer. Anyways did U mean S and T are the same as U and V. I have looked at your demo and it looks amazing. How do U use cube mapping in OpenGL to do enviroment mapping. what would you need to change. I know there''s an extension for generating cube maps but don''t know how to use it.

This topic is closed to new replies.

Advertisement