I have a problem with Nvidia Optimus and Windows Desktop Duplication API.
By default application is starting on discrete GPU, and from that GPU I don’t have access to Desktop Duplication. Even more - I cannot use integrated GPU because it doesn’t have outputs. And more - I cannot use GDI with DirectX texture with GDI support to grab screenshots.
When I’ve switched application to integrated GPU it is working, but NVAPI is not working every time and sometimes application is starting on discrete GPU.
Nvidia can make it working from discrete GPU (GpU with output)?