OpenGL.error.GLError

24 views
Skip to first unread message

Вадим Евгеньевич

unread,
Oct 8, 2019, 7:49:46 AM10/8/19
to pyqtgraph
I'm trying to apply 3D.
Here is an example of my code:
"""
from pyqtgraph.Qt import QtCore, QtGui
import pyqtgraph.opengl as gl
import sys

class Terrain(object):
    def __init__(self):
        """
        Initialize the graphics window and mesh
        """

        # setup the view window
        self.app = QtGui.QApplication(sys.argv)
        self.w = gl.GLViewWidget()
        self.w.show()
        self.w.setWindowTitle('Terrain')
        self.w.setCameraPosition(distance=30, elevation=8)

    def start(self):
        """
        get the graphics window open and setup
        """
        if (sys.flags.interactive != 1) or not hasattr(QtCore, 'PYQT_VERSION'):
            QtGui.QApplication.instance().exec_()
    

if __name__ == '__main__':
    t = Terrain()
    t.start()
"""

But in the end I get an error:
"""
OpenGL.error.GLError: GLError( err = 1282, description = b'\xed\xe5\xe4\xee\xef\xf3\xf1\xf2\xe8\xec\xe0\xff \xee\xef\xe5\xf0\xe0\xf6\xe8\xff', baseOperation = glViewport, cArguments = (0, 0, 160, 160)
)
"""
Has anyone encountered such a problem? If so, how to solve it?
Reply all
Reply to author
Forward
0 new messages