Original Post
I''ve been using NeHe''s OpenGL tutorials to write an engine, and I''ve strayed far from the base code.
Recently I''ve been adding some high level texture structures and some font stuff, and the fact that he uses KillGlWindow() and then a subsequent call to CreateGLWindow() in order to switch from Fullscreen to Windowed mode is both quite annoying and it frankly seems like a hack.
So, I wrote my own routine to just resize the current window using SetWindowLong(), and everything went smoothly until I switched from Fullscreen back to Windowed - The windows beneath my current window were blacked out, and remained so even after the program exited and ran KillGLWindow(). I fixed this by calling ChangeDisplaySettings(NULL, CDS_FULLSCREEN) right before modifying the size of the window. I call the routine with
(NULL, 0) as arguments right afterwards, but if I don''t do CDS_FULLSCREEN beforehand, when it changes back to windowed mode, everything else is black. Any idea why this happens?
Thanks in advance.