The problem is, I want to sometimes say that I want to draw a sprite at a specific % of transparency during runtime. For example, the further away from the ground you are, the less opaque the shadow sprite will become (it already shrinks in size as well). I've looked all over and people keep talking about color keying and alpha mapping, but that's not what I need! I need something like this:
// Setting the transparency of EVERYTHING I draw after this point is what I need // Select the sprite to be drawn select_texture(texture); // Place it glBegin glQuad ... ... glEnd // Reset transparency back to normal
I just need to know how to set the blending mode so that the entire scene I draw is as transparent as I want it to be. My game has enemies, and you fight them. The enemies are already loaded so that every green pixel will not be drawn (sometimes it has a full-blown alpha map as .BMP supports alpha maps). That's fine, but when I kill an enemy it falls over (or whatever) and then slowly fades away. Perhaps the enemy is a floating fireball and already has a flare alpha map on itself, but it will still slowly fade away when destroyed. Or it's a slime that you can see through in some parts and not in others, but it still slowly fades away when destroyed.
I'm not going to modify the individual pixels of the sprite to be effected- that's too slow to do runtime and I've already loaded the texture with it's mask by the time I want to apply an entire single transparency value to it.