Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ...After Drawing 3d Stuff...
- glMatrixMode(GL_PROJECTION);
- glPushMatrix();
- glLoadIdentity();
- glOrtho(0.0, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0, -1.0, 10.0);
- glMatrixMode(GL_MODELVIEW);
- //glPushMatrix(); ----Not sure if I need this
- glLoadIdentity();
- glDisable(GL_CULL_FACE);
- glClear(GL_DEPTH_BUFFER_BIT);
- glBegin(GL_QUADS);
- glColor3f(1.0f, 0.0f, 0.0);
- glVertex2f(0.0, 0.0);
- glVertex2f(10.0, 0.0);
- glVertex2f(10.0, 10.0);
- glVertex2f(0.0, 10.0);
- glEnd();
- // Making sure we can render 3d again
- glMatrixMode(GL_PROJECTION);
- glPopMatrix();
- glMatrixMode(GL_MODELVIEW);
- //glPopMatrix(); ----and this?
- ...Then swap buffers...
Advertisement
Add Comment
Please, Sign In to add comment