View Full Version : GLSL vertex shader code to do glTexGen() equivalent?

Jon Mc Jon
11-08-2006, 06:29 PM
Ok, read over the entries here and done some searching on the web, have not got anywhere.

Can somebody please point me to some GLSL vertex shader code to do the equivalent of glTexGen() ?

Ie. generate texture coordinates automatically.

Best Regs

Jon Mc Jon
11-08-2006, 06:30 PM
I should expand on that, I only just learned that that functionality is replaced by GLSL.
I have deactivated my vertex shader experimentally and glTexGen works nicely with my fragment shader, but I can just feel it - I am going to need vertex shader functionality down the track. :)


11-08-2006, 06:50 PM

This is what you want. It will give you GLSL shader code for any of the fixed pipeline functionality.


Jon Mc Jon
11-08-2006, 08:03 PM
Hey thanks, nice looking app!
Its win32 though, I'm developing on Linux though I could try and see if it will run in vmware without spitting the dummy. :)

11-08-2006, 08:56 PM
Well the source code is given also so you can look through that to get the shader code you want (Assuming you cant get it running any other way).

Jon Mc Jon
11-08-2006, 09:12 PM
Great, thanks!

Jon Mc Jon
11-09-2006, 08:19 PM
Are there any fixed-functionality-replacement GLSL shader sites online, by any chance? I can't find any via websearching.

Also - what of the "Orange Book", is it chock full of them?