Advertisement
Guest User

Untitled

a guest
Oct 20th, 2011
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.01 KB | None | 0 0
  1.     GL.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT)
  2.     GL.glLoadIdentity()
  3.     GL.glPushMatrix()
  4.     GL.glLoadIdentity()
  5.     GL.glViewport(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT)
  6.     GL.glMatrixMode(GL.GL_PROJECTION)
  7.     GL.glLoadIdentity()
  8.     GL.glPushMatrix()
  9.     GL.glOrtho(0, SCREEN_WIDTH, 0, SCREEN_HEIGHT, 1, -1)
  10.     GL.glMatrixMode(GL.GL_MODELVIEW)
  11.     GL.glLoadIdentity()
  12.     GL.glTranslatef(.1, .1, .1)
  13.    
  14.     GL.glColor4f(1, 1, 1, .6)
  15.     GL.glBegin(GL.GL_QUADS)
  16.     GL.glVertex3f(-1, 0, -1)
  17.     GL.glVertex3f(1, 0, -1)
  18.     GL.glVertex3f(1, 0, 1)
  19.     GL.glVertex3f(-1, 0, 1)
  20.     GL.glVertex3f(0, -1, -1)
  21.     GL.glVertex3f(0, 1, -1)
  22.     GL.glVertex3f(0, 1, 1)
  23.     GL.glVertex3f(0, -1, 1)
  24.     GL.glVertex3f(-1, -1, 0)
  25.     GL.glVertex3f(1, -1, 0)
  26.     GL.glVertex3f(1, 1, 0)
  27.     GL.glVertex3f(-1, 1, 0)
  28.     GL.glEnd()
  29.  
  30.     pygame.display.flip()
  31.     GL.glMatrixMode(GL.GL_PROJECTION)
  32.     GL.glPopMatrix()
  33.     GL.glMatrixMode(GL.GL_MODELVIEW)
  34.     GL.glPopMatrix()
  35.     print "Flip!"
  36.  
  37.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement