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)?
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
Segmentation Fault: I am an error in which a running program attempts to access memory not allocated to it and core dumps with a segmentation violation error. This is often caused by improper usage of pointers, attempts to access a non-existent or read-only physical memory address, re-use of memory if freed within the same scope, de-referencing a null pointer, or (in C) inadvertently using a non-pointer variable as a pointer.