'Process the drawing event.'

def processPaintEvent(self, event):

    self.canvas.SetCurrent(self.context)
    if (not self.gl_broken):
        try:
            self.OnInitGL()
            self.OnDraw()
        except pyglet.gl.lib.GLException:
            self.gl_broken = True
            logging.error(((_('OpenGL    failed,    disabling    it:') + '\n') + traceback.format_exc()))
    event.Skip()
