Archived

This topic is now archived and is closed to further replies.

henryx

Inactive Direct3D Wndow

Recommended Posts

henryx    128
I have a Direct3D application in a window which becomes inactive when it looses focus. I effectively stop the game loop until the application gets focus again. However, the down side to this is that when other windows are dragged over the inactive window the window contents are lost and smeared with the application(s) that is pulled over it. I suppose I could keep refreshing the application by keeping the DrawFrame() function running but there is probably a better way of doing this possibly by capturing the WM_PAINT message and doing something with that. Any suggestions would be appreciated. Thanks henry

Share this post


Link to post
Share on other sites
kamrann    122
in your game loop, you will be rendering your scene to a d3d surface, then presenting that surface to the screen I assume. the way I would do it would be to always respond to WM_PAINT by simply doing the present part again - there should be no need to re-render the scene. try doing this either all the time, or only when inactive - i''m not sure which would be best.

Cameron

Share this post


Link to post
Share on other sites