05-31-2006, 02:19 AM
First ,I defined the Orthographic Projection
gluOrtho2D (0.0 ,(GLdouble)w, 0.0,(GLdouble)h);
glViewport (0, 0, (GLsizei) w, (GLsizei) h);
and a window of size 500*500. At last, a unit equals the size of a pixel.But when the window
become bigger,the unit become bigger too .
What i want to get is whenever the size of the window is changed ,a unit always corresponds to
a pixel.any suggestion is appreciative!
gluOrtho2D (0.0 ,(GLdouble)w, 0.0,(GLdouble)h);
glViewport (0, 0, (GLsizei) w, (GLsizei) h);
and a window of size 500*500. At last, a unit equals the size of a pixel.But when the window
become bigger,the unit become bigger too .
What i want to get is whenever the size of the window is changed ,a unit always corresponds to
a pixel.any suggestion is appreciative!