Sign in to follow this  
Fantastic Jason

Fades

Recommended Posts

Hi clever people, I am writing a little 2d game which uses a tiles map. The tiles are in one texture which was a 24bit Bitmap. I want to display my map, but make it all black so that nothing can be seen, then slowly fade up so that they can all be seen in thier full colour. Not using a palette in case you thought that. Should I use the colour or should I use lights (which I know nothing about?). Thanks in advance for any advice. Jay

Share this post


Link to post
Share on other sites
As you're using a quad with black colour, don't forget to change the blending function with something like..
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);

(I think the default setting is glBlendFunc(GL_SRC_ALPHA, GL_ONE))

Share this post


Link to post
Share on other sites
Just thought I'd add a wee tip. It is faster to disable blending using glBlendFunc(GL_ONE, GL_ZERO) than with glDisable(GL_BLEND). They amount to much the same thing.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this