Пример #1
0
 def clear(self):
     '''Clear the window with background color'''
     # XXX FIXME use late binding
     from kivy.graphics.opengl import glClearColor, glClear, \
         GL_COLOR_BUFFER_BIT, GL_DEPTH_BUFFER_BIT
     cc = self._clearcolor
     if cc is not None:
         glClearColor(*cc)
         glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT)
Пример #2
0
    def clear(self):
        """Clear the window with the background color"""
        # XXX FIXME use late binding
        from kivy.graphics.opengl import (
            glClearColor,
            glClear,
            GL_COLOR_BUFFER_BIT,
            GL_DEPTH_BUFFER_BIT,
            GL_STENCIL_BUFFER_BIT,
        )

        cc = self._clearcolor
        if cc is not None:
            glClearColor(*cc)
            glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT)