resetting the display

Started by
2 comments, last by eal 19 years, 4 months ago
hey, i'm trying to get my d3d program to resume if it gets minimized. i'm following the steps below: IDirect3D8 *D3D8OBJ; 1) test if "D3DERR_DEVICELOST" is returned by by "Present()" 2) if so, destroy D3D8OBJ 3) move into a loop until "TestCooperativeLevel()" returns "D3DERR_DEVICELOST" 4) then make a call to "Reset()" so uh... any ideas why it doesn't resume? the program also doesn't minimize at all unless its running at a different resolution than the desktop
Advertisement
You don't actually destroy the Direct3D object. Release all device dependent objects (vertex buffer, index buffer, textures) before resetting the device. Then you'll have to reload those objects.
Programming is easy, thinking is hard.
Don't destroy the device! Check TestCooperativeLevel() for D3DEER_DEVICENOTRESET (or something like that) and call IDirect3DDevice9::Reset() then.
thanks for the help! (i also found i wasn't running through the message loop while it was minimized). Does anyone know why a program wouldn't minimize if the destop was running at the same resolution as the program?

This topic is closed to new replies.

Advertisement