Workaround for keeping window running 100% when unfocused

Hi guys, I’m new to the forums and still new to opengl in general, but I was working on a side-project of mine and after a bit of googling around I couldn’t seem to find an answer that satisfied me.

I wanted to check in with the forums to see if anyone knows of a way – or if GLFW supports keeping a window running at full-power, even when unfocused?

My project involves reading the frontbuffer of a game, doing some work on it and then re-displaying it to my main monitor for me to look at, however, to move in-game I had to be tabbed into that game, meaning my GLFW window loses focus and fps drops by about half.

If there aren’t any workarounds, I’ll just have to deal with it for now, I’ve tried running the game windowed/windowed-borderless but that didn’t change anything.

Many thanks for any input guys,

This isn’t related to GLFW, and in my experience I see no difference in performance between focussed and un-focussed apps.

There a possibility that the issue here is related to the other application you have running requiring more GPU or CPU time.

1 Like

Thanks for that advice, when I was timing my code before it appeared that the swap buffers() call was taking double the time when I was tabbed in-game compared to out of game, I assumed that meant my app was losing CPU time as a windows/opengl resource-saving measure. But thanks to you I realised that my game was leaving my CPU without any idle time, after putting an fps cap on it has now freed up more time for my app to run.

Thank you :slight_smile: