PDA

View Full Version : Fullscreen?



cOg
02-10-2000, 12:54 AM
Hi!
How do i do fullscreen rendering? I use CreateWindow now, but i cant find out how to make it fullscreen. Is it ChangeDisplaySettings i should use? If so, should it be before or after the CreateWindow?

Thanks for your time!

Gorg
02-10-2000, 06:31 AM
you use changedisplaysettings.

If you look at msdn.com, you can see the definition of the function.

changedisplaysettings takes a DEVMODE and a couple of flags.

for fullscreen, you pass CDS_FULLSCREEN

You can change the display setting before or after you create the window, it doesn't really matter. It depends when you start rendering stuff.

if after the first resize, you draw the window, then change the display settings before you call updateWindow or some objects will be rendered in the old resolution and then be switched to the new one. This look kind of ugly.

DJSnow
02-11-2000, 03:40 PM
Yes, the above mentioned way ist correct !
But there is an other way too !
You can use CreatWindowEX, change the
resolution to the maximum desktop-resolution,
display your window without a titlebar.
This should work to, i have a source-code-demo which is doing it this way !
But,mmh where is it...
Send me your email-adress, and i will post it
to your account.
Or i send you se URL, let me see where it is on my harddisk.

cOg
02-12-2000, 04:18 AM
Is it a "fake" fullscreen mode if i do like this? : CreateWindow("OpenGL", title,WS_POPUP,x, y, width, height, NULL, NULL, hInstance, NULL);
??
Is it a good way to do a fullscreen mode?

02-12-2000, 05:39 AM
The second method I think would be too slow, depending on your current windows resolution and your application. Running an openGl program in 1024x768 (for example) would be pretty slow if it's animated, unless you had some pretty good hardware. Anyway, that's my opinion, and I'm new at this, so take it or leave it.

Gorg
02-12-2000, 05:41 AM
I never tried that way but it should be ok cOg. One thing you could test that could be annoying is moving your mouse cursor to the bottom of the screen and see if the taskbar show up.

DJSnow
02-13-2000, 11:10 PM
The Taskbar doesnīt move up with my way, if you point with the mouse on it. Itīs no fake-fullscrenn: it only takes the actual resolution. There are many OpenGL-appz which are using the current X/Y-size & colordepth of your desktop-settings. Unfortunately, i havenīt found the source on my harddisk-i must check the web. Be patient...

Mike The Spike
02-13-2000, 11:48 PM
Simply check the desktop resolution, if it's too big, then set it to a smaller value.
Record that value, and when creating you're main window, pass it as the width and height.
Then simply call "GetWindowDC()" to get a handle to the *Entire* main window, including title bar, and start drawing away!


Mike The Spike

cOg
02-14-2000, 12:02 AM
Thanks guys for your time!