I saw someone inquiring about this as well in another thread a bit back so and I was interested in this as well. I basically wanted my application such that if it's not in the foreground and not minimized, it continued to render the scene. So, I investigated this and saw that currently, the D3D7 setup *IS* set to toggle rendering when minimized (a good thing), but also toggled rendering when loosing focus. For my case, I easily disabled the toggle in the focus loss case. However, D3D9 and OpenGL did not toggle rendering anywhere except in the loss of focus case. I had to add this manually.
To do so, I basically used the following chunk of code in the WM_SIZE cases within the two rendered plugins and disabled the focus toggle in all three render plugins.
Code: Select all
if ((wParam == SIZE_MAXIMIZED) || (wParam == SIZE_RESTORED))
win->mActive = true;
else if (wParam == SIZE_MINIMIZED)
win->mActive = false;
as seen in this test pic, it works fine:
