generating tex coords


I’m pretty new to OpenGL so just have patients with me please. I have implemeted a roam engine in our current terrain engine, I have spent so much time at the algoritms that I haven’t had the chance to learn OpenGL that good. But I was woundering if you some way could let gl calculate the texture coords for you. I need that because calculating them on my own takes to long time because the triangles change their state and size all the time.
I hope you get it, it’s still early in the morning and I haven’t had my coffe yet.

Thanks Kristian


Take a look at the texture mapping chapter at…ullhtml;lang=sv
There you should find glTexGen.


Great, thanks!

But do you know how the function works. How it generats the coords. Does it just wrap the texture from lowest position (0,0) to the highest(1,1)?