Exemplo n.º 1
0
  def __init__(self):
    """Initializes OpenGL ES, sets the vertex and color arrays and pointers, 
and selects the shading mode."""
    # It's best to set these before creating the GL Canvas
    self.iFrame=0
    self.exitflag = False
    
    self.render=0
    
    pygame.init()
    self.screen = pygame.display.set_mode( (800,480), FULLSCREEN )
    egl.create(pygame.display.get_wm_info()['window'])
    self.initgl()
    self.render=1
Exemplo n.º 2
0
  def __init__(self):
    """Initializes OpenGL ES, sets the vertex and color arrays and pointers, 
and selects the shading mode."""
    
    # It's best to set these before creating the GL Canvas
    self.iDrawingMode=self.ETriangles
    self.iFrame=0
    self.exitflag = False
    self.render=0
    self.canvas = None
    
    pygame.init()
    self.screen = pygame.display.set_mode( (800,480), FULLSCREEN )
    egl.create(pygame.display.get_wm_info()['window'])
    
    self.initgl()
    self.SmoothShading()
Exemplo n.º 3
0
 def __init__(self):
   # It's best to set these before creating the GL Canvas
   self.frames = 0
   self.exitflag = False
   self.render=0
   self.canvas = None
   self.angle = 0.0
   self.tStart = self.t0 = time.time()
   self.view_rotx=20.0
   self.view_roty=30.0
   self.view_rotz=0.0
   
   # Attributes for an antialiased canvas
   #egl_attrs = {EGL_SAMPLE_BUFFERS:1, EGL_SAMPLES:4}
   
   #appuifw.app.screen = 'full'
   try:
       pygame.init()
       self.screen = pygame.display.set_mode( (800,480), FULLSCREEN )
       egl.create(pygame.display.get_wm_info()['window'])
   except Exception,e:
       self.set_exit()
       return