NVIDIA Optimus card not switching under OpenGL

爱⌒轻易说出口 提交于 2019-12-05 18:45:34

Your graphics card is an NVIDIA Optimus card. This means that it "automatically" chooses between the integrated Intel graphics and the dedicated GPU. The Intel graphics only supports up to 3.1 while the dedicated GPU supports 4.3. Depending on which one is chosen, you'll only have support for up to that version. The only problem with Optimus is that it'll only automatically pick up DirectX, CUDA, C++ AMP, and OpenCL.

This has caused much confusion and frustration.

There are a few solutions to force the dedicated GPU to be used:

  1. The simplest, force your application to use the dedicated GPU via the NVIDIA Control Panel. This is generally a stop-gap solution, as it'll only work on your machine.
  2. Invoke a small bit of (or link to) CUDA or OpenCL at the beginning of your program to get it to trigger the switch to the dedicated card. This adds a dependency to CUDA or OpenCL, however.
  3. Export the global variable _declspec(dllexport) DWORD NvOptimusEnablement = 0x00000001;. This is generally the best solution, however, depending on which language you're using, you may not be able to export global variables.

NVIDIA released a document about doing this: http://developer.download.nvidia.com/devzone/devcenter/gamegraphics/files/OptimusRenderingPolicies.pdf

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!