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 ...