S_PRESENT_OCCLUDED, correct handling?

Started by
-1 comments, last by TarmoRhox 13 years, 8 months ago
Hello!

I have Direct3D9Ex device in my program which doesn't perform any draw call but simply converts D3D10 Surface to Direct3D9 (WPF D3DImage) using shared surfaces mechanism and DXGI. But when I'm presing "Windows+L" (locking my workstation) and return bask to desktop, it simply stops to convert. For some time I'm recieving S_PRESENT_OCCLUDED as an HRESULT of CheckDeviceState(NULL), but after a while it starts to return S_OK but nothing is changing. According to documentation, it is nor Device Lost and DeviceEx is rather stable from this point of view but I still don't know, how to handle this situation correctly.

SImply rerendering of image (after recieving S+OK) doesn't help but if I will continue rerender Image for each frame, after a whilr picture will apperar again. But I can't do rerendering for each frame every time (Program is attended to make rerendering only if necessary).

Is there a way to catch a moment when rerendering will succeded?

Any suggestion?

Thank you!

This topic is closed to new replies.

Advertisement