Fullscreen mode

BwB: Personally I never even heard of opengl and DX being interoperable. I doubt very much that its supported, but its my assumption that they work together because they both work at the same privilege level, but mixing D3D and OpenGL would probably cause problems. Its something I stumbled across on a rainy day. I had a load of code so I thought what if, only took an hour! I have a suspetion that if only works on NT4, but thats still useful. I haven’t tried acelerated hardware with it. Has any one tried it on 95/98/2000/ME?
Admittedly I get a very odd SQL error when I try and run the binaries on 98, and it won’t compile. Hmmm, maybe your right

If anyone want the code for it, a very simple DevStudio project I’'ll email it to them.

[This message has been edited by Leo (edited 03-08-2001).]

Using DX is not something new it is even in the FAQ: http://www.opengl.org/developers/faqs/technical/mswindows.htm#mswi0060

BwB, I think some manufacturers like nvidia is using DX to initialize the display so you will have a lot of fragging to do!

Using the NeHe code does not work on all systems because:

  • In KillGLWindow is the display settings changed before killing the window. That will crash on some systems.
  • the topmost flag is not set so the second time you enter fullscreen is the taskbar not hidden. Perhaps this is also depending on the system.
  • the error message talks about not supported modes if ChangeDisplaySettings fails, the problem is instead that the program can not change to the new mode.

I think the GLUT code is good but it will still crash! I can hear if the display settings is changed and if glutEnterGameMode does that will the app crash after some successful changes. One example that lets you switch windowed - fullscreen with glutGameMode is here: http://sites.netscape.net/ptrpck/glut10.zip
If you put your desktop in 16 bit color mode should the program really change the display settings. I can enter fullscreen mode about 6 times before the crash. That may sounds like a lot but it is really random depending on compiler and all kind of weird stuff

The big problem is not setting any unsupported modes but the switching itself. It seems to give random crashes depending on the phases of the moon…

The only really safe way is to first enter fullscreen without any changes of the display settings and allow the user select settings before really changing them. If the program then can not do the changes is it easy to tell the user that a manual change is required.
If the program crash will a user at least know what the settings are and can do manual changes.