View Full Version : Changing texture intensity

09-06-2001, 11: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, 01: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.......

09-06-2001, 08:22 PM
turn off lighting use GL_MODULATE
and go
int = intensity, 1 = full bright

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