diff --git a/pyqtgraph/opengl/GLViewWidget.py b/pyqtgraph/opengl/GLViewWidget.py index 71768b6a..e80ae57b 100644 --- a/pyqtgraph/opengl/GLViewWidget.py +++ b/pyqtgraph/opengl/GLViewWidget.py @@ -155,9 +155,7 @@ class GLViewWidget(QtWidgets.QOpenGLWidget): def setProjection(self, region=None): m = self.projectionMatrix(region) glMatrixMode(GL_PROJECTION) - glLoadIdentity() - a = np.array(m.copyDataTo()).reshape((4,4)) - glMultMatrixf(a.transpose()) + glLoadMatrixf(m.data()) def projectionMatrix(self, region=None): if region is None: @@ -183,11 +181,9 @@ class GLViewWidget(QtWidgets.QOpenGLWidget): return tr def setModelview(self): - glMatrixMode(GL_MODELVIEW) - glLoadIdentity() m = self.viewMatrix() - a = np.array(m.copyDataTo()).reshape((4,4)) - glMultMatrixf(a.transpose()) + glMatrixMode(GL_MODELVIEW) + glLoadMatrixf(m.data()) def viewMatrix(self): tr = QtGui.QMatrix4x4()