Пример #1
0
    def _InitGL(self):
        """
        Default _InitGL. This should be overridden by subclasses of GLPanel

        This should not be called. It will be called when the GLPanel recieves
        its first EVT_PAINT event.
        """
        gl.glDisable(gl.GL_DEPTH_TEST)
        gl.glShadeModel(gl.GL_SMOOTH)
Пример #2
0
 def _initgl(self):
     """Initialise OpenGL settings (called once before first draw)"""
     # All drawing is 2d
     gl.glDisable(gl.GL_DEPTH_TEST)
     gl.glDisable(gl.GL_LIGHTING)
     # Shading is not needed
     gl.glShadeModel(gl.GL_FLAT)
     # Anti-aliasing settings
     gl.glHint(gl.GL_LINE_SMOOTH_HINT, gl.GL_NICEST)
     gl.glBlendFunc(gl.GL_SRC_ALPHA, gl.GL_ONE_MINUS_SRC_ALPHA)
     gl.glEnable(gl.GL_LINE_SMOOTH)
     gl.glEnable(gl.GL_BLEND)