Example #1
0
    def on_draw(self):
        with gx_matrix:
            glMultMatrixf(self.transform_gl)

            self.draw()
            self.controls.dispatch_event('on_draw')

            # use stencil for container
            with gx_stencil:
                drawRectangle((0, 0), size=self.size)
                stencilUse()
                self.container.dispatch_event('on_draw')
Example #2
0
    def on_draw(self):
        with gx_matrix:
            glMultMatrixf(self.transform_gl)

            self.draw()
            self.controls.dispatch_event('on_draw')

            # use stencil for container
            with gx_stencil:
                drawRectangle((0, 0), size=self.size)
                stencilUse()
                self.container.dispatch_event('on_draw')
Example #3
0
 def stencil_push(self):
     stencilPush()
     # draw on stencil
     drawRectangle(pos=self.pos, size=self.size)
     # switch drawing to color buffer.
     stencilUse()
Example #4
0
 def stencil_push(self):
     stencilPush()
     # draw on stencil
     drawRectangle(pos=self.pos, size=self.size)
     # switch drawing to color buffer.
     stencilUse()