Image Transitions...

Hi everybody!

Hi i was just wondering how i could do some image transitions, such as fade out… or slide… now the idea that i had was i texturized 2 images beside each other and i wanted to move the camera using ortho2d

void update(int value) {
_xview += 2.0f;
if (_xview > 480) {
_xview -= 30;
}
gluOrtho2D(0.0, _xview, 0.0 , height);
glutPostRedisplay();
glutTimerFunc(20, update, 0);
}

but for some reason (I’m pretty sure its a stupid mistake) this doesn’t work. so any sort of help would be appreciated :slight_smile: and also ideas for other image transitions too. :slight_smile: thnx!

I’d suggest to not move the camera but the textured quads you use to draw the images, that way two or more of them can move in independent directions.

but for some reason this doesn’t work.

Please put yourself in the position of everyone else reading the above: how can we know what “it doesn’t work” means?

Your gluOrtho2D call makes the view frustum wider, if you want it to move it to the left/right it should look more like this:


gluOrtho2D(xpos, xpos + width, 0, height);

what i meant by it doesn’t work was, that it wont move gluortho2d. i get the same page… thanks for the help :slight_smile: greatly appreciate it :slight_smile:

You might find it easier to do this the other way round; that is move the quads displaying the texture (array) across the view port (the camera).

i tried moving the quads and got it to work :slight_smile: thanx! any ideas on other types of image transitions? :slight_smile: