Switching from Windows to Fullscreen

This is a discussion on Switching from Windows to Fullscreen within the Game Programming forums, part of the General Programming Boards category; In my dx8 engine, im trying to switch between windowed and fullscreen mode by resetting the device. The code base ...

Switching from Windows to Fullscreen

In my dx8 engine, im trying to switch between windowed and fullscreen mode by resetting the device. The code base for the windowed<>fullscreen is from the directx8 sdk, but it wont work! Any other ideas? The switching must be made with the device resetting.
Oh, when I clal ToggleFullscreen, the device stops rendering. (Im not using the DXTimer MS uses.)

When you switch between full-screen and windowed mode, you simply do through a call to IDirect3DDevice8::Reset() supplying - typically - the presentation parameters used in creating the device in the 1st time, only with the Windowed flag changed ( unless one or more of the display mode properties aren't supported in the other operation mode [ fullscreen - windowed] )

When you do reset the device, you have to take care of your resources. If you have any D3DPOOL_DEFAULT resources, make sure you release them BEFORE you reset the device, and then restore them AFTER you reset the device.

About the "The device stops rendering" :
What was the device rendering in the 1st place, and how does it look after it stopped rendering ( i.e. is the screen cleared with the color you specified or not ).

The debug run-time is your friend, and the Debugger is evev a closer friend. Enable the former & max the Direct3D warning setting ( from the control panel applet ) , and run your sample in the debugger and Direct3D will tell you why your rendering fails in a very sweet detailed error message.