Search code examples
c++windowsgpupower-management

How to detect power saving mode of graphic card in windows application?


I have an application using an OpenGL window that works ok, but someone detects that if the graphics performance is configurated as power saving, the screen doesn't show any render, it only show a black screen that could be interpreted as a UI bug.

I was wondering if there is a way to know if my application is running in power saving mode, since that configuration implies to use the less powered machine's gpu I don't know if it is possible to use the winAPI. In example I have a Intel GPU and a Nvidia GPU, so the power saving mode use Intel's GPU.

I want to send a warning message or turn off the power save mode.

The winAPI function GetSystemPowerStatus seems to be related with the battery, so it doesn't work for my purpose.

References


Solution

  • The problem was that I was trying to use texture2D that the Intel GPU doesn't support. I just change it to texture, as recommended in comments