def swap_buffers(self):
        """
        Swap buffers, set viewport, trigger events and increment frame counter
        """
        self.widget.swapBuffers()
        self.set_default_viewport()
        self.app.processEvents()
        self.frames += 1
def swap_buffers ( self ) : self . widget . swapBuffers ( ) self . set_default_viewport ( ) self . app . processEvents ( ) self . frames += 1
Swap buffers, set viewport, trigger events and increment frame counter