Switching between windowed and full-screen

Anyone had problems changing a OpenGL window on the fly from normal windowed to fullscreen in Windows (I’m using W2K)? I don’t mean changing screen resolutions, just changing the style of the window from WS_OVERLAPPED to WS_POPUP with the appropriate SetWindowPos dimensions. Works fine or only slightly quirky on some systems (GeForce3/DetXP), and completely blows the O/S on others (misc ATI). Is this a technique that others have used (meaning I’m probably seeing driver problems), or is this just not allowed/recommended? Thanks!

have a look on the nehe site at the basic code he impliments - allows you to do it.

For one, I’m already switching between full-screen and windowed on the fly. It just doesn’t seem reliable on some driver/card combinations.

I’ve been to NeHe - looks to me like the window is created and destroyed when switching between windowed and full-screen - it’s not performed on the fly. That’s easy, and not at all what I’m trying to do.

why dont you want to do this? its completely seemless, and would most likely get rid of all the reliability issues.

what are you doing that you cant destroy a window and create an identical one in full screen mode?

When im switching to fullscreen mode on my TNT2 card, the v-sync is enabled and backbuffer is not copied but flipped. That situation does not happen (by default v-sync is off, buffer is copied) in windowed mode. These settings are associated with created context, so after you create context you cannot change style of the window without errors. YOU MUST DESTROY AND CREATE CONTEXT AGAIN.

Sorry For Bas English.

That’s the same behavior I see on my GeForce3 with the Detonator XP drivers. Thanks for the tips, folks - the switch on the fly stuff is coming out of my progs.