PDA

View Full Version : Changing texture intensity



daviem01
09-06-2001, 10:54 AM
Hello all,

I am working on a project that requires on-the-fly changing of the intensity (brightness/darkness) of textures.

The textures are loaded and stored in RGB format. I do not want them to be transparent at all (they're drawn over a background which shouldn't be visible).

What's the best way to go about this?

Rob The Bloke
09-06-2001, 12:58 PM
updating the texture itself is one of the slowest things you can do. You can get around it (to some extent) by using GL_MODULATE texture mode job.

This way your underlying colour (if not using lighting) or material properties (if using lighting) will be modulated with the texture colour. Changing the material properties and/or colours is considerably quicker.......

zed
09-06-2001, 07:22 PM
turn off lighting use GL_MODULATE
and go
glColor3f(int,int,int);
int = intensity, 1 = full bright

daviem01
09-07-2001, 06:37 AM
Many thanks to you both-- it's working perfectly now! (after disabling GL_LIGHTING and using GL_MODULATE)