diff --git a/pyqtgraph/widgets/RawImageWidget.py b/pyqtgraph/widgets/RawImageWidget.py index 98cee889..a5a62691 100644 --- a/pyqtgraph/widgets/RawImageWidget.py +++ b/pyqtgraph/widgets/RawImageWidget.py @@ -134,6 +134,8 @@ if HAVE_OPENGL: glDisable(GL_TEXTURE_2D) def paintGL(self): + glClear(GL_COLOR_BUFFER_BIT) + if self.image is None: if self.opts is None: return @@ -144,9 +146,6 @@ if HAVE_OPENGL: if not self.uploaded: self.uploadTexture() - dpr = self.devicePixelRatio() - vp = (0, 0, int(self.width() * dpr), int(self.height() * dpr)) - glViewport(*vp) glEnable(GL_TEXTURE_2D) glBindTexture(GL_TEXTURE_2D, self.texture) glColor4f(1, 1, 1, 1)