PDA

View Full Version : enable nvidia graphics card for QT applications



prkhr4u
25th February 2014, 10:01
I have made an application in QT which deals with images and videos and I want to process it through my Nvidia graphics card.
I have installed the nvidia drivers,but I do not know how to use my graphics processor for the QT Application.
Can someone me tell how to use this functionality?

P.s: using ubuntu 12.04 64 bit

wysota
25th February 2014, 10:34
What do you mean by "process through a graphics card"?

aamer4yu
25th February 2014, 11:26
If your meaning is limited to rendering images / video via graphics card, I guess you can use QtOpenGL.

But if you want to do processing using card, I dont think there is support for that,, although there was a project names QtOpenCL.

Hope this helps :)

prkhr4u
26th February 2014, 03:43
By "process", I mean to render images and videos through a graphics card.
I went through QtOpenGL , it looks like I have to implement all its libraries,many changes in my existing way. Isn't there any easy way out?
In windows MFC ,I developed a similar application and I had to just right click the executable and select "run with graphics processor" and it does the required work.
Is any such option available here??

wysota
26th February 2014, 07:10
Qt4 or Qt5? By the way, do you know what this "run with graphics processor" function really does? The option is not related to your "MFC application" but to your system's graphics card drivers.

anda_skoa
26th February 2014, 10:48
As far as I know the "run with graphics processor" is available only on systems that have two GPUs, one integrated and one separate.
It allows to force the rendering to go through the separate one, usually an AMD or Nvidia one, while the integrated is usually Intel.

It does nothing to the program itself, unless the program or its libraries perform capability detection and have different rendering paths.

Cheers,
_

prkhr4u
28th February 2014, 03:00
I am using Qt4.I have two GPU's,one integrated intel and one seperate NVIDIA GPU.
So As I see this,I need to implement the OpenGL libraries in QT through QtOpenGL.
Looks like a lot of changes are required in my existing code.

wysota
28th February 2014, 07:35
You don't have to do anything. Just run your application with -graphicssystem opengl switch. However be aware this won't magically make your faster GPU process the application, it will just make the application use OpenGL calls for rendering. As everyone here said before, the option you speak of is implemented by your graphics card drivers. Both your Intel and your NVidia chips are able to process OpenGL calls.