Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. PyQt and GPU

PyQt and GPU

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 2 Posters 5.3k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    philubus
    wrote on last edited by
    #1

    Hello everyone,

    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?

    Thanks!

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      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.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1
      • P Offline
        P Offline
        philubus
        wrote on last edited by
        #3

        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.

        Thanks!

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          You have an example here.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • P Offline
            P Offline
            philubus
            wrote on last edited by
            #5

            Thank you very much for your help!

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved