zooming - with glulookat()?
i've read several posts and tutorials regarding zooming in opengl now and yet i am still not able to get it to work.
what i have: left bottom corner is at (-1, -1), right top corner is at (1, 1), and my code draws some simple GL_POINTS (all of them at z = 0); my canvas dimensions are (1024, 768).
what i want to do: a simple zoom by a defined factor.
currently i'm trying this approach, i have trouble understand which argument values to use though. if i try it like this, i see only the background color after a repaint.
my code right now:
zoom -= 0.1;
gluPerspective (zoom, 1024 / 768, 1, 3);
gluLookAt(0, 0, 0, 0, 0, 0, 0, 1, -1); // eyex, eyey, eyez, centerx, centery, centerz, upx, upy, upz
what is the easiest way achieve this?