Advertisement

Making a console menu half way transparent?

Started by December 10, 2004 11:31 AM
4 comments, last by nife 19 years, 11 months ago
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
Alpha Blending?
Advertisement
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
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
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.
Oops sorry, yeah I forgot that part.. sorry about that..
Killers don't end up in jailThey end up on a high-score!

This topic is closed to new replies.

Advertisement