RECT rctWindow;
// Get Window Dimensions
GetClientRect(g_window->hWnd,&rctWindow);
// Select The Projection Matrix
glMatrixMode(GL_PROJECTION);
// Store The Projection Matrix
glPushMatrix();
// Reset The Projection Matrix
glLoadIdentity();
// Set Up An Ortho Screen
glOrtho(0, rctWindow.right, 0, rctWindow.bottom, -1, 1);
// Select The Modelview Matrix
glMatrixMode(GL_MODELVIEW);
glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
//---
// DO SOME Ortho shit
//---
// Select The Projection Matrix
glMatrixMode(GL_PROJECTION);
// Restore The Old Projection Matrix
glPopMatrix();
// Select The Modelview Matrix
glMatrixMode(GL_MODELVIEW);
Is all that code needed?
[edited by - Xces on May 23, 2002 2:13:30 PM]
Is ALL this code nescsarry?
Yes.
I would even add a glPushAttrib/glPopAttrib pair.
Documents [ GDNet | MSDN | STL | OpenGL | Formats | RTFM | Asking Smart Questions ]
C++ Stuff [ MinGW | Loki | SDL | Boost. | STLport | FLTK | ACCU Recommended Books ]
[edited by - Fruny on May 23, 2002 2:25:11 PM]
I would even add a glPushAttrib/glPopAttrib pair.
Documents [ GDNet | MSDN | STL | OpenGL | Formats | RTFM | Asking Smart Questions ]
C++ Stuff [ MinGW | Loki | SDL | Boost. | STLport | FLTK | ACCU Recommended Books ]
[edited by - Fruny on May 23, 2002 2:25:11 PM]
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement