Quote:Original post by majek
Thanks Steve you were right, it was changing the window style when I reset the device. is there anything you dont know? :)
Here is my new dilema... My Direct3D class stores a bool p_FullScreen. When ToggleFullScreen() is called its really just calling SetFullScreen(!p_FullScreen)
The BeforeResetDevice() function depends on p_FullScreen to reset the PresentParams, so if I reset the device before toggling fullscreen mode, p_FullScreen will be FALSE, returning the wrong result.
Why not pass a parameter to BeforeResetDevice() to indicate if it's going into fullscreen mode or not? Then your p_FullScreen variable can mean "Is the app
currently in fullscreen mode?", and this'll allow you to use BeforeResetDevice() to reset the device without toggling fullscreen mode (E.g. to change resolution).
Quote:Original post by majek
My next question for Steve is... Should I just get rid of the Window::SetFullScreen() function? Since D3D changes the window style for me there's really no point in changing it manually.
It's probably a good idea to change it - AFAIK D3D doesn't change the window style back when going windowed -> fullscreen -> windowed, so you end up with a WS_POPUP style window if you don't change the window style. And it doesn't hurt to make your code symmetrical so the window style is set when going to fullscreen mode too.