newbee questions about GLortho
Hi... i''m new in OpenGL
I''m trying to do a simple 2D math equation editor...
It must have the posibility of doing ZOOMs
I thinks it must be done changing coords of GLOrtho2D...
but I''m not sure... I don''t know so well the structure that must be done... load which matrix, etc :S
Some one can help me ?? thanxs
I think you can use glPixelZoom()... Look it up in the red book, or somewhere else... It should be exactly what youre looking for!
March 31, 2003 10:43 PM
First of all, there is no glOrtho2D().
However, there are glOrtho() and gluOrtho2D().
gluOrtho2D() is the same thing as calling glOrtho() with near=0 and far=1.
However, there are glOrtho() and gluOrtho2D().
gluOrtho2D() is the same thing as calling glOrtho() with near=0 and far=1.
glMatrixMode( GL_PROJECTION );glLoadIdentity();glOrtho( GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble near, GLdouble far );// make the values of left-right and top-bottom farther away// from eachother to zoom out// (e.g. left = bottom = -100.0; right = top = 100.0)// closer values will zoom in// (e.g. left = bottom = -1.0; right = top = 1.0)// don''t forget to go back to the modelview matrix when you are done:glMatrixMode( GL_MODELVIEW );glLoadIdentity();
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement