There is no portable way to do what you ask, but this document describes how to get "high-performance graphics rendering" to use systems with NVIDIA Optimus technology:
http://developer.download.nvidia.com/devzone/devcenter/gamegraphics/files/OptimusRenderingPolicies.pdf
In particular, refer to the section "Global variable NvOptimusEnablement (new in the driver) Release 302), which says:
Release 302, Optimus , - , . NvOptimusEnablement. . LSB DWORD . 0x00000001 . 0x00000000 , .
:
extern "C" {
_declspec(dllexport) DWORD NvOptimusEnablement = 0x00000001;
}
- WGL_nv_gpu_affinity, WGL , , Intel/NVIDIA:
http://developer.download.nvidia.com/opengl/specs/WGL_nv_gpu_affinity.txt
share