Results 1 to 8 of 8

Thread: using GPU with Qt applications

  1. #1
    Join Date
    Mar 2010
    Posts
    86
    Thanks
    11
    Thanked 7 Times in 4 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default using GPU with Qt applications

    Does anyone know if Qt offers support for using the GPU on newer graphics cards? Maybe for use with the QPainter, QGraphicsView/QGraphicsScene, and/or QPhono classes? If their isn't, is this on the table for Qt's next versions graphical driver?

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: using GPU with Qt applications

    Using GPU for what? For graphics? Sure, there are a bunch of classes in Qt for that, starting with QGLWidget.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: using GPU with Qt applications

    Have a look at Qt3D
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  4. #4
    Join Date
    Mar 2010
    Posts
    86
    Thanks
    11
    Thanked 7 Times in 4 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: using GPU with Qt applications

    I already have these books:

    The Book of Qt4 The Art of Building Qt Applications
    C GUI Programming with Qt4 2nd Edition
    Advanced Qt Programming

    I found this link after I posted this thread http://labs.qt.nokia.com/2010/04/07/...pencl-with-qt/ and it seems to have what I am looking for. I had just noticed that a custom QPainter class that I wrote is eating up massive CPU usage. It does draw 1000's of small items, repeatedly, very quickly to the MainWindow Widget. And it does this amazingly compared to other current languages. But, it really costs on the CPU. It looks like the OpenCL will let me do this even faster... I have done 3D graphics in Visual C++ w/ OpenGL and Java, but haven't gotten to that in Qt yet. My real question, is then, if I can open up the GPU with OpenCL can I also use the read/write and image buffers on the GPU & Graphics Card RAM to chop it up into smaller work groups with a regular image for the specific purpose of using QConcurrent and uploading large .jpg images through a network connection much faster? Or is the GPU only used for displaying graphics?

  5. #5
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: using GPU with Qt applications

    OpenCL will not help you with drawing, at least not directly. It can help you with calculating stuff. If you are after drawing speed then you are after OpenGL and not OpenCL.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  6. #6
    Join Date
    Mar 2010
    Posts
    86
    Thanks
    11
    Thanked 7 Times in 4 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: using GPU with Qt applications

    well I have the drawing speed just fine with QPainter class. I was hoping to just move the processing load of drawing to the screen over to the GPU instead of the CPU. I can run 3 instances of the program on a Quad Core, 8 GIG system and max out all 4 cores. If OpenGL can let me draw without using so much CPU, then that would be great. So the GPU is only for floating point graphical math and not also just graphics calls? I stalled out with Qt graphics in QGraphicsViews & Scenes. So then, this whole thread is silly and I apologize for those that are reading this...

  7. #7
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: using GPU with Qt applications

    You can use the GPU for any kind of calculations that make sense to parallelize according to rules dictated by OpenCL (with 'C'). Apart from that you can use OpenGL (with 'G') to have hardware acceleration of drawing things. Of course you can use the GPU for both.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  8. #8
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: using GPU with Qt applications

    As a side not, you can use OpenGL with GLSL shaders for both.
    In the shaders you do your math, if you have any.
    But doing general purpose calculations in GLSL needs a different kind of thinking then usual...
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

Similar Threads

  1. What to use for web applications?
    By szisziszilvi in forum Newbie
    Replies: 1
    Last Post: 7th April 2011, 07:25
  2. Qt applications and USB
    By pocketchange in forum Newbie
    Replies: 2
    Last Post: 11th March 2011, 05:16
  3. Benchmarking applications
    By aegis in forum Qt Programming
    Replies: 1
    Last Post: 11th August 2007, 12:49
  4. what's the matter with my qt applications?
    By xylosper in forum Qt Programming
    Replies: 4
    Last Post: 12th June 2007, 17:25
  5. Deploying QT applications
    By SteM in forum Installation and Deployment
    Replies: 3
    Last Post: 6th June 2007, 10:08

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.