Jump to content
  • Advertisement
Sign in to follow this  

Need Help With fading

This topic is 4225 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

HI, I need help with fading. For example I have two quads: one quad is black(quad A) another with image(quad B). I want to know how make quad A transparent and change the level of it transpersnts. Plz help.

Share this post

Link to post
Share on other sites
enable blending for quad a, and then just change its alpha value over time. its been a while since ive used opengl blending but it think this is all you have to do

//setup the blend func to use

//render quadB behind quadA

//turn on blending
//render quadA infront of quadb
//if you're doing glcolor to set quadA you can easily change the alpha
glcolor4f(0.0f, 0.0f, 0.0f, quadA.transparancy);

just remember that when doing blending you always have to render objects from back to front, or else it wont look right.

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!