From 5d647cf9a6159afd2933da594b9c79ad93d3cd9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Picca=20Fr=C3=A9d=C3=A9ric-Emmanuel?= Date: Mon, 23 Dec 2019 13:45:09 +0100 Subject: New upstream version 0.12.0~b0+dfsg --- silx/gui/_glutils/OpenGLWidget.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'silx/gui/_glutils') diff --git a/silx/gui/_glutils/OpenGLWidget.py b/silx/gui/_glutils/OpenGLWidget.py index 7f600a0..c5ece9c 100644 --- a/silx/gui/_glutils/OpenGLWidget.py +++ b/silx/gui/_glutils/OpenGLWidget.py @@ -1,7 +1,7 @@ # coding: utf-8 # /*########################################################################## # -# Copyright (c) 2017 European Synchrotron Radiation Facility +# Copyright (c) 2017-2019 European Synchrotron Radiation Facility # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal @@ -30,7 +30,7 @@ across Qt<=5.3 QtOpenGL.QGLWidget and QOpenGLWidget. __authors__ = ["T. Vincent"] __license__ = "MIT" -__date__ = "26/07/2017" +__date__ = "22/11/2019" import logging @@ -192,7 +192,12 @@ else: # Check OpenGL version if self.getOpenGLVersion() >= self.getRequestedOpenGLVersion(): - version = gl.glGetString(gl.GL_VERSION) + try: + gl.glGetError() # clear any previous error (if any) + version = gl.glGetString(gl.GL_VERSION) + except: + version = None + if version: self.__isValid = True else: -- cgit v1.2.3