View Full Version : Full-Screen OpenGL App
Does anyone know how should I make a full-screen OpenGL program in windows?
06-14-2003, 10:26 AM
every openGL tutorial on gametutorials.com shows how to use windows code to make a fullscreen gl app
This site has the full basecode for both fullscreen and windowed modes.
Making a fullscreen program is the same as any program. When you create the main app window (I guess I am assuming you use windows) you just tell windows that you want the window to be the same size as the screen.
int nScreenX = GetDeviceCaps(hDesktopDC, HORZRES);
int nScreenY = GetDeviceCaps(hDesktopDC, VERTRES);
This will get you the dimensions of the desktop.
Then make sure their is no title bar by adding WS_POPUP to the dwStyle parameter of the CreateWindow function. Here is how I do it:
hWnd = CreateWindow(lpszAppName,
WS_POPUP |WS_CLIPCHILDREN | WS_CLIPSIBLINGS,
In the gametutorials.com's triangle tutorial, full-screen mode was created with the ChangeDeviseSettings WinAPI function. The MSDN description for this mode of full-screen display was this: "The mode is temporary in nature". In addition the tutorial excutes flikering on my PC (it's a P4 with A SiS 64MB graphics card and Win98). All my drivers are updated.
06-16-2003, 12:33 AM
Now?!Now you stop reading the Microsoft junks about the cool question OpenGL and you start thinking with your own head.Can we see the code for our fullscreen-mode function please?
06-16-2003, 07:40 AM
MKAI, the reason it flickers is because of the way that gametutorials has set it up. They are showing fullscreen modes that will work on anyones computer. The way that gametutorials sets up fullscreen is the most efficent way to do it. You will need to play with the settings yourself.
Ok. I will play with the settings.
Hey Mihail121! take it easy. The SetDeviceSettings is a microsoft function and nothing more than microsoft's documentation can be trustworthy about it.
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.