Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
- glPushMatrix();
- glLoadIdentity();
- // ... do some translation ...
- drawCube();
- glPopMatrix();
- glPushMatrix();
- glLoadIdentity();
- // ... do some translation ...
- glBegin(GL_QUADS);
- // Use a dark gray background and set transparency.
- glColor4f(1.0, 1.0, 1.0, .5);
- glVertex3f(-1.0, +1.0, 0.0); // top left
- glVertex3f(-1.0, -1.0, 0.0); // bottom left
- glVertex3f(+1.0, -1.0, 0.0); // bottom right
- glVertex3f(+1.0, +1.0, 0.0); // top right
- glEnd();
- glPopMatrix();
- // ... swap the buffers ...
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement