I have a problem when openGLWidget (on PyQt5 Qdialog form) significantly slowing down for pan or rotate when it displaying more then 2-3 thousand lines (or thousand polygons) plotted in 3D space.
Is there any technique to make it work smoothly (change refresh rate or anything what is applicable) or it's just how openGLWidget performs, that it is not capable to hold a big amount of independent lines?
For note, I have very powerful PC with powerful discrete graphic card, so computer performance is not a case.
Just for example (cut from a context code) I'm plotting lines in this way:
import pyqtgraph.opengl as gl
from pyqtgraph.Qt import QtWidgets
import numpy as np
self.app = QtWidgets.QApplication(sys.argv)
self.w = gl.GLViewWidget()
pl_line = ([(1, 1, 1), (2, 2, 2)]) # [Start coordinates(X,Y,Z), End coordinates (X,Y,Z)]
pl_line = np.array(pl_line)
newline = gl.GLLinePlotItem(pos=pl_line, color=red, width=1, antialias=False) # Regular line plotting
self.w.addItem(newline)
self.w.show()
self.app.exec()
So, when I have even 500 lines on the 3D plot it's still smooth, but once I going beyond that up to 2 thousand of lines it's FPS drops to 3-5 FPS when I'm rotating the plot scene.