PDA

View Full Version : Getting screen resolutions



Cheps
07-10-2003, 12:12 PM
Hi,

Is there a way to get a list of all possible screen resolutions that can be used, depending on the video card/monitor/OS ? I know how to do it with win32, but I'd like to do it with OpenGL or GLUT so it's portable.

roffe
07-10-2003, 12:48 PM
You cant retrieve this kind of information using OpenGL(or GLUT). Lookup MS GDI functions on MSDN for microsoft OSes.

yaro_dup1
07-11-2003, 01:05 AM
Search MSDN for DEVMODE structure.

Mihail121
07-11-2003, 02:26 AM
DEVMODE screen_settings;
int i = 0;

while(EnumScreenSettings(NULL,i,&screen_settings) != FALSE)
{
printf("%d: %dx%d %d bpp",i,screen_settings.dmPelsWidth,
screen_settings.dmPelsHeight,
screen_settings.dmBitsPerPel);
i++;
}