PDA

View Full Version : Keep textures parameters in GLSL?



Voloskaya
09-30-2010, 04:08 AM
Hi everyone,
I'm actually porting an old D3D engine to OpenGL. This engine is doing all the multitexturing things (like modulating textures) by itself without using any shaders with gltexenvf etc...
Everything worked perfectly so far.
I would like now to implement shaders, but i am wondering if there is a way to keep all the multitexturing operations OpenGL side, or if i have to get rid of this and redo everything in the pixel shader?
I hope to be clear enough!
Thx.

Alfonse Reinheart
09-30-2010, 11:58 AM
This engine is doing all the multitexturing things (like modulating textures) by itself without using any shaders with gltexenvf etc...

glTexEnv does not set texture parameters. It sets texture environment values. glTexParameter sets texture parameters.


I would like now to implement shaders, but i am wondering if there is a way to keep all the multitexturing operations OpenGL side, or if i have to get rid of this and redo everything in the pixel shader?

Actual texture parameters (filtering state, etc) are still used. glTexEnv settings are overridden by shaders. Which is most of the point in using them.

Voloskaya
10-01-2010, 01:27 AM
Yep sorry, i was indeed talking about environment values.
I hoped to avoid having to do this twice as i have to keep it OpenGL side as well for very low configurations not supporting shaders. But i guess i have no choice!
Anyway thanks a lot Alfonse.