PDA

View Full Version : Colors and Texturing



lud2k
04-28-2006, 04:54 PM
Hello,

Is there a way to replace a color by another one without changing the image data. is there a function to replace the current color palette or to replace the white color (for exemple) by a red color ?

Thanks,
Ludovic.

zeoverlord
04-28-2006, 05:52 PM
Not directly, but you could write a shader that does that for you.

lud2k
04-28-2006, 06:09 PM
A long time ago, i remember having done a world with a "bumpmap" (bitmap black/white). by using color3f(), the bumpmap was automatically changing to the color given in color3f().

I'm trying to do it again but with no succes :-(.
Is there a specific glEnable() to call or something to configure to do this ? (or maybe i've activated something which doen't work with it ?)
(could it works with transparent .tga ?)

zeoverlord
04-28-2006, 08:55 PM
It is perhaps possible to fake it.
1. draw the original texture
2. draw a grayscale texture with alpha (for making out the things not to change) ontop of it that contains all the details to be changed, allso use glColor4f() to control the color.