Module DummyAmanith
[hide private]
[frames] | no frames]

Source Code for Module DummyAmanith

 1  ##################################################################### 
 2  # -*- coding: iso-8859-1 -*-                                        # 
 3  #                                                                   # 
 4  # Frets on Fire                                                     # 
 5  # Copyright (C) 2006 Sami Kyöstilä                                  # 
 6  #                                                                   # 
 7  # This program is free software; you can redistribute it and/or     # 
 8  # modify it under the terms of the GNU General Public License       # 
 9  # as published by the Free Software Foundation; either version 2    # 
10  # of the License, or (at your option) any later version.            # 
11  #                                                                   # 
12  # This program is distributed in the hope that it will be useful,   # 
13  # but WITHOUT ANY WARRANTY; without even the implied warranty of    # 
14  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the     # 
15  # GNU General Public License for more details.                      # 
16  #                                                                   # 
17  # You should have received a copy of the GNU General Public License # 
18  # along with this program; if not, write to the Free Software       # 
19  # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,        # 
20  # MA  02110-1301, USA.                                              # 
21  ##################################################################### 
22   
23  """Mock amanith implementation that does next to nothing.""" 
24   
25  from OpenGL.GL import * 
26   
27  G_LOW_RENDERING_QUALITY    = 0 
28  G_NORMAL_RENDERING_QUALITY = 1 
29  G_HIGH_RENDERING_QUALITY   = 2 
30   
31 -class GKernel:
32 pass
33
34 -class GMatrix33:
35 pass
36
37 -class GOpenGLBoard:
38 - def __init__(*a, **b):
39 pass
40
41 - def SetShadersEnabled(self, foo):
42 pass
43
44 - def SetViewport(self, x, y, w, h):
45 glViewport(int(x), int(y), int(w), int(h))
46
47 - def SetProjection(self, left, right, bottom, top):
48 glMatrixMode(GL_PROJECTION) 49 glLoadIdentity() 50 glOrtho(left, right, bottom, top, -100, 100) 51 glMatrixMode(GL_MODELVIEW)
52
53 - def SetRenderingQuality(self, q):
54 pass
55
56 - def Clear(self, r, g, b, a):
57 glDepthMask(1) 58 glEnable(GL_COLOR_MATERIAL) 59 glClearColor(r, g, b, a) 60 glClear(GL_COLOR_BUFFER_BIT | GL_STENCIL_BUFFER_BIT | GL_DEPTH_BUFFER_BIT)
61