Advertisement
Guest User

r3n

a guest
Apr 6th, 2009
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.58 KB | None | 0 0
  1.     glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
  2.  
  3.     glPushMatrix();
  4.     glLoadIdentity();
  5.  
  6.     // ... do some translation ...
  7.  
  8.     drawCube();
  9.  
  10.     glPopMatrix();
  11.  
  12.     glPushMatrix();
  13.     glLoadIdentity();
  14.  
  15.     // ... do some translation ...
  16.  
  17.     glBegin(GL_QUADS);
  18.  
  19.     // Use a dark gray background and set transparency.
  20.     glColor4f(1.0, 1.0, 1.0, .5);
  21.  
  22.     glVertex3f(-1.0, +1.0, 0.0); // top left
  23.     glVertex3f(-1.0, -1.0, 0.0); // bottom left
  24.     glVertex3f(+1.0, -1.0, 0.0); // bottom right
  25.     glVertex3f(+1.0, +1.0, 0.0); // top right
  26.     glEnd();
  27.  
  28.     glPopMatrix();
  29.  
  30.     // ... swap the buffers ...
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement