PDA

View Full Version : How to initialize full screen (in Windows)?



04-30-2000, 06:10 AM
I've tried some small codes from 'the book' but it only works in windowed mode. I think there is a function (aux..something) for full screen initialization but I didn't find it. If any one can help me I will apreciate!

Humus
04-30-2000, 07:44 AM
Just make your window the same size as the screen resolution and make it without borders. You may want to change screen res first, that done with ChangeDisplaySettings(&devmode, CDS_FULLSCREEN). To get the screensize you can use GetSystemMetrics().

Bob
04-30-2000, 12:26 PM
With 'the book' i suppose you mean 'the red book'. All examples in the red book is coded using glut, so using ChangeDisplaySettings() might be a not so good idea (even though it might work, haven't said anything about that). You can use a function called glutFullScreen() or something. This, however, is just a maximized window with no borders and other stuff, and not "true" fullscreen.

04-30-2000, 04:06 PM
If you make a maximized window without any border it'll automatically be a true fullscreen mode (unless you have really bad drivers) ... 'cause this is the only way to do fullscreen rendering: make the the window the size of the screen and without borders.

Bob
05-01-2000, 01:19 AM
If you maximize the window, they get the same size as the desktop, and that is not what i define as true fullscreen. What i define as fullscreen is when you change displaysettings to a "new" setting, which is independant of the original desktop (even though it can be the same as the original). I have quite a lot of improvement in speed between a maximized window on the desktop, compared with the same screenresolution and colordepth in true fullscreen.
Which method to use also depends on what you want to do. For a speed-dependant application, using glutFullScreen might be a not so good idea, but it's quite nice for just showing a model/picture or other speed-independant applications.

Humus
05-01-2000, 02:16 AM
Originally posted by Bob:
I have quite a lot of improvement in speed between a maximized window on the desktop, compared with the same screenresolution and colordepth in true fullscreen.

This can only be a indication that your drivers isn't smart enough to realize that you are using the full screen area, so it's probably not swaping buffer but rather copying the backbuffer to the frontbuffer.
This is the only thing that can make any difference between "true" or "false" fullscreen rendering.

Bob
05-01-2000, 03:16 AM
I got latest drivers from nvidia for my TNT card... so I see no reason why my driver should be old, dumb, or whatever.
I go fullscreen using ChangeDisplaySettings, so i really don't care about the problem with slower speed when using a maximized window http://www.opengl.org/discussion_boards/ubb/biggrin.gif

Humus
05-01-2000, 05:46 AM
Wheater you use ChangeDisplaySettings or not shouldn't make any difference, 'cos if you change the resolution to say 800x600 and set your window to 640x480 or whatever, you will also get a windowed mode, but in the lower resolution. The way the drivers can know if it has to copy or if it can just swap buffers is that the windows has no border, is placed at (0,0) and is the size of the screen.
However ... i agree with you that this discussion is rather pointless ...