-
FullScreen ?
i am making a opengl program and was wondering how would i make it full screen. When i put this code in the compiler says its wrong:
Code:
DEVMODE devModeScreen;
memset(&devModeScreen,0,sizeof(devModeScreen));
devModeScreen.dmSize = sizeof(devModeScreen);
devModeScreen.dmPelsWidth = screenWidth;
devModeScreen.dmpelsHeight = screenHeight;
devModeScreen.dmBitsPerPel = screenBpp;
devModeScreen.dmFields = DM_PELSWIDTH | DM_PELSHEIGHT | DM_BITSPERPEL;
if (ChangeDisplaySettings(&devModeScreen, CDS_FULLSCREEN) != DISP_CHANGE_SUCCESSFUL)
fullscreen = false;
-
I've never written any OpenGL code before but I did notice an inconsistency on yoru code:
Code:
devModeScreen.dmpelsHeight = screenHeight;
probably ought to be:
Code:
devModeScreen.dmPelsHeight = screenHeight;
-
Just as a quick request, next time you have a problem with compilation if you could post the compiler errors as well it makes it a bit easier since most of the time it's something obvious.
Check out http://nehe.gamedev.net for some helpful tips for OpenGL :)