PDA

View Full Version : OpenGl auto generated texture coordinates



GameMaker
10-22-2002, 11:21 AM
I got no response in the beginner forum so I am posting it here...

I am using GLTexGen and GL_OBJECT_PLANE so OpenGL will automatically generate texture coordinates for my model. This works.

My question is:

When I translate/rotate the model, do I also need to translate/rotate the planes in order to have the textures stay with the model?

GameMaker
10-23-2002, 05:47 PM
Wow, nobody has any ideas on this? Doesn't anybody use GL_OBJECT_PLANE when autogenerating texture coords?

Relic
10-24-2002, 01:49 AM
Why haven't you tried, it's a 50-50 chance without knowing the spec. http://www.opengl.org/discussion_boards/ubb/wink.gif
No, GL_OBJECT_PLANE and GL_OBJECT_LINEAR are working on (spec cite) "vertex coordinates which are presented to the GL", so called object coordinates. There's no matrix involved in the calculation
g = p1*xo + p2*yo + p3*zo + p4*wo