Skip to content

Commit

Permalink
Try to clear OpenGL errors generated outside of Friture code
Browse files Browse the repository at this point in the history
  • Loading branch information
tlecomte committed Dec 25, 2016
1 parent 49e56dd commit e0d734c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions friture/plotting/glCanvasWidget.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,12 @@ def updateGrid(self):
self.gridNeedsUpdating = False

def paintGL(self):
# try to clear the errors that are produced outside of this code - for example Qt errors
error = GL.glGetError()
while error != GL.GL_NO_ERROR:
print("Clearing an OpenGL error that occured outside of Friture code", error)
error = GL.glGetError()

self.setupViewport(self.width(), self.height())

# Clear The Screen And The Depth Buffer
Expand Down

0 comments on commit e0d734c

Please sign in to comment.