Dear All,
U can access the Redbook Chapter 12 (Selection) online at: http://fly.cc.fer.hr/~unreal/theredbook/chapter12.html
The selection example 12-2 has following code:
glPushMatrix ();
glMatrixMode (GL_PROJECTION);
glLoadIdentity ();
glOrtho (0.0, 5.0, 0.0, 5.0, 0.0, 10.0);
glMatrixMode (GL_MODELVIEW);
glLoadIdentity ();
//code for drawing objects
glPopMatrix ();
glFlush ();
My question is: If both GL_PROJECTION and GL_MODELVIEW are loaded with identity matrix
why the code is inside a glPush and glPop Matrix pair
Hope this question is understandable,
- Chetan