generating tex coords

Hi!

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

Hello!

Take a look at the texture mapping chapter at http://heron.cc.ukans.edu/ebt-bin/nph-dw…ullhtml;lang=sv
There you should find glTexGen.

Osku

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)?