Menu

#184 Support for forcing to use dedicated GPUs (NVidia / AMD)

3.x
open
nobody
None
8
2018-05-17
2018-05-14
Marco
No

add an option to flag an application to use NVidia / AMD GPUs on dual GPU laptop:
https://stackoverflow.com/questions/16823372/forcing-machine-to-use-dedicated-graphics-card

Enable dedicated graphics for NVIDIA:

extern "C"
{
__declspec(dllexport) unsigned long NvOptimusEnablement = 0x00000001;
}
Enable dedicated graphics for AMD Radeon:

extern "C"
{
__declspec(dllexport) int AmdPowerXpressRequestHighPerformance = 1;
}

should be straight forward for you, and would save us to wire a own wrapper just because of a missing flag ;-)

THX!!!

Discussion

  • Grzegorz Kowal

    Grzegorz Kowal - 2018-05-16

    Are you using the JNI headers? Because I'm wondering if setting this in the standard headers will have any effect on the java application...

     
  • Marco

    Marco - 2018-05-17

    hi!
    yes;
    <launch4jConfig>
    <headerType>gui</headerType>

    since we have to run as 64bit application....

    I would love to use jni, but I cant right now...
    whats the outlook on 64 bit support?

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.