lesson 17
In Lesson 17, it looks like you push the Projection Matrix, push the Modelview Matrix, and then pop the Projection Matrix, and then pop the Modelview Matrix. Shouldn't you pop the Modelview Matrix before the Projection Matrix? What am I missing?
Lesson 17 contains the following code:
glMatrixMode(GL_PROJECTION); // Select The Projection Matrix
glPushMatrix(); // Store The Projection Matrix
glLoadIdentity(); // Reset The Projection Matrix
glOrtho(0,640,0,480,-1,1); // Set Up An Ortho Screen
glMatrixMode(GL_MODELVIEW); // Select The Modelview Matrix
glPushMatrix(); // Store The Modelview Matrix
glLoadIdentity(); // Reset The Modelview Matrix
glTranslated(x,y,0); // Position The Text (0,0 - Bottom Left)
glListBase(base-32+(128*set)); // Choose The Font Set (0 or 1)
glCallLists(strlen(string),GL_UNSIGNED_BYTE,string);// Write The Text To The Screen
glMatrixMode(GL_PROJECTION); // Select The Projection Matrix
glPopMatrix(); // Restore The Old Projection Matrix
glMatrixMode(GL_MODELVIEW); // Select The Modelview Matrix
glPopMatrix(); // Restore The Old Projection Matrix
Mike C.http://www.coolgroups.com/zoomer/http://www.coolgroups.com/ez/
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement