[Interest] [Windows][opengl] How graphic card is choosen on a portable computer with many?

Jérôme Godbout jerome at bodycad.com
Wed Jun 22 21:25:20 CEST 2016


I don't think you can select this before the aplication is launch, it's
Windows and the video driver that choose that for you. You could however,
have a small launcher or a checker on application launch with the OpenGL
card used (maybe inspect the QSurface format or anything that could point
to if the wanted OpenGL features is available).

you can execute the following batch script to get the video card
///////// VideoCardIdentifier.bat
*@echo off*
*for /F "tokens=* skip=1" %%n in ('WMIC path Win32_VideoController get Name
^| findstr "."') do set GPU_NAME=%%n*
*echo %GPU_NAME%*
///////// END VideoCardIdentifier.bat

should output something like that:
*AMD Radeon R9 200 Series*

use a regex to parse the output to detect the available card type.

You could show an error dialog and stop at this point and tell the
requirement to your user. I would point. depending on the nvidia or AMD
card detected, you could try to launch the proper panel and display the
instruction to change it or give a link to do it.


On Wed, Jun 22, 2016 at 12:35 PM, Xavier Bigand <flamaros.xavier at gmail.com>
wrote:

> Hi,
>
> Some of users can't launch our application because there computer have 2
> graphic cards. To fix the issue they have to force the card made for gaming
> to be used with our software.
> Our application is made with Qt and QML, but we have our custom 3D engine
> that do not work on intel integrated GPU. One particularity of our engine
> is that it doesn't request a draw every time dislike games.
>
>
> Is there a way for us to make the application able to discover the best
> graphic card and force his usage?
>
>
> --
> Xavier
>
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20160622/ac67f0e4/attachment.html>


More information about the Interest mailing list