resetting the display
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
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.
Don't destroy the device! Check TestCooperativeLevel() for D3DEER_DEVICENOTRESET (or something like that) and call IDirect3DDevice9::Reset() then.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement