Picture fading
How would I make a picture fade in for like 5 seconds then fade out and continue on?
~Sethric
The thing I did when I wanted to create fade effects was change the color of the scene using glColor. Since my scene was plain white color, I would just dim the color. Instead of having
glColor(1.0f, 1.0f, 1.0f);
You would lower each value.
glColor(0.9f, 0.9f, 0.9f);
and the lower you go, the more faded it looks. Until you get to zero, which is total darkness.
- DarkNebula
glColor(1.0f, 1.0f, 1.0f);
You would lower each value.
glColor(0.9f, 0.9f, 0.9f);
and the lower you go, the more faded it looks. Until you get to zero, which is total darkness.
- DarkNebula
You can put a timer in there to control how long it takes to fade in and out too. Fading in is just pushing the numbers back up as you might of guessed :D
- DarkNebula
- DarkNebula
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement