[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 23:44:22 CEST 2016


I'm guessing ActiveX may have more options to select the proper card but I
may be wrong on this. I'm also curious about this, we are supporting Intel
GPU but since we have an heavy CAD application, we always switch the card
to the AMD/NVidia one. I would love an option or way to select this before
the first OpenGL context is created too, that would be a lovely features.
Not sure if other platforms allow this??? I known macOS can switch video
card, but I think it's transparent to the user or application (maybe that's
explain the old OpenGL version they are using!).

I'm pretty sure it must be possible under Linux, but I never try it or did
it.

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

> Wow, it seems complicated. I prefer a transparent solution for users, I
> think that it will be relatively easy to find an OpenGL feature to filter
> the cards (but I need to get a such configuration before :-().
>
> I thought that it could be similar than scanning screen or something like
> that. I am expecting that we could select the right card during the window
> or the opengl context creation.
> I am curious on how video games are doing to be always launched on the
> right card.
>
>
> 2016-06-22 21:25 GMT+02:00 Jérôme Godbout <jerome at bodycad.com>:
>
>> 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
>>>
>>>
>>
>
>
> --
> Xavier
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20160622/36a0a77e/attachment.html>


More information about the Interest mailing list