I read some tutorials on fullscreen in OpenGL, but I don't get it. Can someone just tell me the simplest way to get into fullscreen mode in windows(OpenGL)?
Printable View
I read some tutorials on fullscreen in OpenGL, but I don't get it. Can someone just tell me the simplest way to get into fullscreen mode in windows(OpenGL)?
Hello,
If I'm correct, isn't it simply called using the ChangeDisplaySettings() function? For instance:You check MSDN for more information:Code:DEVMODE dmScreenSettings;
/* initialize variable */
memset(&dmScreenSettings, 0, sizeof(dmScreenSettings));
/* Specify the size, in bytes, of the DEVMODE structure */
dmScreenSettings.dmSize = sizeof(dmScreenSettings);
/* Specify the width, in pixels, of the visible device surface. */
dmScreenSettings.dmPelsWidth = width;
/* Specify the height, in pixels, of the visible device surface. */
dmScreenSettings.dmPelsHeight = height;
/* Specify in bits per pixel the color resolution of the display device. */
dmScreenSettings.dmBitsPerPel = bits;
/* Specify which of the remaining members in the DEVMODE structure have been initialized. */
dmScreenSettings.dmFields = DM_BITSPERPEL | DM_PELSWIDTH | DM_PELSHEIGHT;
/* Change Display Settings to Fullscreen */
if (ChangeDisplaySettings(&dmScreenSettings, CDS_FULLSCREEN) != DISP_CHANGE_SUCCESSFUL) {
/* Change was not successful */
}
- Stack Overflow
thanks so much man!! ITS WORKING!!!!