PDA

View Full Version : Color masking/changing of textures



jfern
05-01-2007, 02:26 PM
Hi,

I have several images that have black background, and then white images. I want to be able to change the color of the white part based upon different variables in my program. The only way I have figured out how to do this is to use glColorMask() and the problem with this is that the color that replaces the white is not constant because it is dependent upon what is drawn under it.

is there any simple way to change the white in the texture to a color of choice?

Thanks!
-Josh

k_szczech
05-02-2007, 05:12 AM
Simply use glColorMask but first draw the color you want behind it.
I would probably use textured quad whth alpha test enabled and non-textured quad behind.