PyQt and GPU
I am new to Qt and from the documentation I couldn't understand whether the OpenGL used by pyqtgraph uses the GPU to do the painting or not.
I have a created a 3D model for my company but sometimes it gets really slow when I add more things to it. I am using pyqtgraph.opengl to do the 3D designs. When I use my design, I can see that the available CPUs are being used 100% which for me it doesn't make sense.
Shouldn't the painting and mouse dragging being handled by the GPU? It seems that the CPU is doing everything...
Can someone clear this out for me? Do i have to redirect the paintGL to the GPU somehow?
Hi and welcome to devnet,
PyQtGraph is not an official module of Qt nor PyQt. From a quick look at the related web site, it uses PyQt4 and the graphics view framework which is not hardware accelerated by default. You can use a QGLWidget as viewport to accelerate the drawing though.
Hello SGaist and thank you for the response!
PyQtGraph actually uses a wrapper of QGLWidget to do the 3D painting and this is the one I am using right now. I must use Python to do my Qt application so is there a way that I can do hardware acceleration for the drawing using Python?
I found only some solutions that included PyOpenCL and PyCUDA but they are mostly used for acceleration of mathematical functions.
You have an example here.
Thank you very much for your help!