Changing the rendering device (windows)

Started by
3 comments, last by JvdWulp 8 years, 7 months ago

Hi Guys,

I was wondering how to change the rendering device since it is easy to do in direct x and for some reason my laptop always defaults to the intel gpu instead of the nvidia one.

- Jaap

Advertisement

From this thread: http://www.gamedev.net/topic/670562-cant-run-gl-nv-path-rendering-extension-demos/


Edit: This was caused my Nvidia's Optimus software for laptops. The solution is super simple, just export a flag on windows. Just add this to your main file with window.h and it will work great.

extern "C"
{
_declspec(dllexport) DWORD NvOptimusEnablement = 0x00000001;
}

Thanks, but that is not what I am looking for. With direct x you can specify what device to use. But from what I can see so far there is no such thing for open gl. :(

That is incorrect, you can not normally specify what device you want to use from DirectX on Optimus laptops. Depending on your settings in the Nvidia control panel an app will use the Intel or the Nvidia one, and it can be overridden either way.

I hear DirectX 12 and the upcoming Vulkan changes this, but not any earlier versions, the driver handles that. If your battery is low for example the driver can make an app use the integrated instead of the discrete GPU.

What you are referring to can be done in DirectX when having two separate discrete graphics cards, which unfortunately is not in standard WGL, and Nvidia only exposes it in Quadro drivers, through https://www.opengl.org/registry/specs/NV/gpu_affinity.txt

Thanks

This topic is closed to new replies.

Advertisement