Advertisement

DirectX for exclusive Fullscreenmode does not work

Started by July 25, 2003 03:06 AM
16 comments, last by SGrottel 21 years, 7 months ago
As Wildfire suggested, use the ''ChangeDisplaySettings'' API function.
It doesn''t require DX or OGL and it''s not very complicated either.

Niko Suni

BUT !!! ChangeDisplaySettings does not generate an exclusive Fullscreen mode! You can switch the Application using Alt+Tab
Advertisement
Its not that big a deal... you can alt+tab most games these days, im pretty sure.

EDIT: Just tried with Quake3 - switches from windows back to game and vice versa just fine.

[edited by - Juggers on July 25, 2003 6:04:54 AM]
Right, but IF you have an exclusive Mode and you switch the application (what is possible) your 3D-DirectX-OpenGL-Application minimizes and suspends.
Hm... so if I get you right, you want your OpenGL application to suspend when it's minimized?
That's not really a problem, if you have a decent Win32 wrapper class. Your window receives a message once it's minimized, in the background, whatever. As soon as you get that message, set an active-variable to false.
Now, all you have to do in your mainloop is:

mainloop{  if (window.active)  {    // do whatever you want to do  }  else     Sleep(1);}


This way your (fullscreen) app will keep running while it's on top and suspend while it's not. And Win32 fullscreen is just as exclusive as DirectX fullscreen. It just doesn't block the Alt-Tab key-combination (bet there's a way to do that too...)

Exclusive has nothing to do with supsending your application. It only says you're the only one with access to a certain resource, which you do.

[edited by - Wildfire on July 25, 2003 9:04:10 AM]
How do I set my laser printer on stun?
Noo waay, use SDL or glut to create the window for OpenGL. By using DX to do that you loose a very important part of OpenGL - PORTABILITY! It deosn''t really make sense... SDL is very nice and easy, so is glut.


darkone
Registered Linux User #317188
darkoneRegistered Linux User #317188
Advertisement
Just have to handle the WM_ACTIVATE message when the Low-word of wParam is WA_INACTIVE. Perhaps making the your window active again (using SetActiveWindow or SetForegroundWindow), and in that way, you can't switch from it (or it will look like).

"In the middle of difficulty lies opportunity"
- Albert Einstein

[edited by - theoffset on July 25, 2003 11:17:54 PM]
"In the middle of difficulty lies opportunity" - Albert Einstein
Hello,

Tanx to all of you, but I was able to solve that problem now by myself. I will continue using DirectX and OpenGL together, because I like this combination.

This topic is closed to new replies.

Advertisement