As Wildfire suggested, use the ''ChangeDisplaySettings'' API function.
It doesn''t require DX or OGL and it''s not very complicated either.
DirectX for exclusive Fullscreenmode does not work
BUT !!! ChangeDisplaySettings does not generate an exclusive Fullscreen mode! You can switch the Application using Alt+Tab
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]
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:
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]
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
darkone
Registered Linux User #317188
darkoneRegistered Linux User #317188
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
[edited by - theoffset on July 25, 2003 11:17:54 PM]
"In the middle of difficulty lies opportunity" - Albert Einstein
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement