Reputation: 2408
I have a 3D Java Application that needs to run on a clients laptop which runs Windows with Nvidia Optimus (Intel and Nvidia GPUs). On default, it will always run 3D applications on the discrete intel card. I've read https://developer.download.nvidia.com/devzone/devcenter/gamegraphics/files/OptimusRenderingPolicies.pdf Nvidia's optimus guide and the only real option is to export a variable called NvOptimusEnablement like this in C/C++:
extern "C" { _declspec(dllexport) DWORD NvOptimusEnablement = 0x00000001; }
but there's no option to do that in Java. Interstingly, doing this in Linux is extremely easy, you simple export an environment variable called DRI_PRIME=1.
I know I could just right click on an applicaton an execute with Nvidia GPU, but that is too involved, I'd prefer it just be plug and play.
So is there a way to enable optimus on java, more specifically LWJGL?
I also found this entry in lwjgl github, but its very old and doesn't really answer the question:
https://github.com/LWJGL/lwjgl3/issues/330
Upvotes: 0
Views: 94