Making a console menu half way transparent?
Hello,
I have a console, but I was wondering how you make parts half way transparent.
Like a certain color pixel, and all the pixels that are that color are half way transparent. (When I say half way transparent I mean, I don't want it to be completely invisible.)
Any help would be much appreciated!
Thanks,
Blades
Enable alpha blending, then use a TGA with alpha background as a texture, you can adjust the alpha level in each section of the image if you wish.
Luck!
Guimo
Luck!
Guimo
Why a TGA (which is not what he wanted btw)? Just blend to hole console to, say 50%...
glEnable(GL_BLEND);
glBlendFunc(GL_ONE, GL_ONE);
glColor4ub(255, 255, 255, 200);
// Draw semitransparent stuff here
glEnable(GL_BLEND);
glBlendFunc(GL_ONE, GL_ONE);
glColor4ub(255, 255, 255, 200);
// Draw semitransparent stuff here
Killers don't end up in jailThey end up on a high-score!
Quote: Original post by nife
Why a TGA (which is not what he wanted btw)? Just blend to hole console to, say 50%...
glEnable(GL_BLEND);
glBlendFunc(GL_ONE, GL_ONE);
glColor4ub(255, 255, 255, 200);
// Draw semitransparent stuff here
Actually, he asked for pixels with a certain color to be semi-transparant, which the others replied to in a good way. Alpha Blending is the key you're looking for BLades.
Published Games: EJay Clubworld (PS2) | Futurama (XBOX/PS2)
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement