View Full Version : Fade-in effect

10-13-2011, 05:14 PM
What's the simplest way to fade onto a scene from black?

I tried setting the clear color with a fractional alpha value but it still clears all the pixels to black.

The only way I know of is to create a full-screen texture with the desired alpha and draw it last.


Alfonse Reinheart
10-13-2011, 08:38 PM
Why do you need a texture for that? Can't you just draw a big triangle?

And the buffer clearing commands clear the buffer; they don't actually render stuff. They're like memset, not rendering commands.

10-14-2011, 03:52 AM
I think the simpler solution is to use a different blend func.

I have something working right now with glBlendColor and glBlendFunc( GL_CONSTANT_COLOR, GL_ONE_MINUS_SRC_ALPHA );