peng3d/window.py
def set2d(self):
        """
        Configures OpenGL to draw in 2D.
        
        Note that wireframe mode is always disabled in 2D-Mode, but can be re-enabled by calling ``glPolygonMode(GL_FRONT_AND_BACK, GL_LINE)``\ .
        """
        # Light
        
        glDisable(GL_LIGHTING)
        
        # To avoid accidental wireframe GUIs and fonts
        glPolygonMode( GL_FRONT_AND_BACK, GL_FILL)
        
        width, height = self.get_size()
        glDisable(GL_DEPTH_TEST)
        glViewport(0, 0, width, height)
        glMatrixMode(GL_PROJECTION)
        glLoadIdentity()
        glOrtho(0, width, 0, height, -1, 1)
        glMatrixMode(GL_MODELVIEW)
        glLoadIdentity()
def set2d(self):
        """
        Configures OpenGL to draw in 2D.
        
        Note that wireframe mode is always disabled in 2D-Mode, but can be re-enabled by calling ``glPolygonMode(GL_FRONT_AND_BACK, GL_LINE)``\ .
        """
        # Light
        
        glDisable(GL_LIGHTING)
        
        # To avoid accidental wireframe GUIs and fonts
        glPolygonMode( GL_FRONT_AND_BACK, GL_FILL)
        
        width, height = self.get_size()
        glDisable(GL_DEPTH_TEST)
        glViewport(0, 0, width, height)
        glMatrixMode(GL_PROJECTION)
        glLoadIdentity()
        glOrtho(0, width, 0, height, -1, 1)
        glMatrixMode(GL_MODELVIEW)
        glLoadIdentity()
def set2d ( self ) : # Light glDisable ( GL_LIGHTING ) # To avoid accidental wireframe GUIs and fonts glPolygonMode ( GL_FRONT_AND_BACK , GL_FILL ) width , height = self . get_size ( ) glDisable ( GL_DEPTH_TEST ) glViewport ( 0 , 0 , width , height ) glMatrixMode ( GL_PROJECTION ) glLoadIdentity ( ) glOrtho ( 0 , width , 0 , height , - 1 , 1 ) glMatrixMode ( GL_MODELVIEW ) glLoadIdentity ( )
Configures OpenGL to draw in 2D.
        
        Note that wireframe mode is always disabled in 2D-Mode, but can be re-enabled by calling ``glPolygonMode(GL_FRONT_AND_BACK, GL_LINE)``\ .
Configures OpenGL to draw in 2D . Note that wireframe mode is always disabled in 2D - Mode but can be re - enabled by calling glPolygonMode ( GL_FRONT_AND_BACK GL_LINE ) \ .