PDA

View Full Version : Get supported resolution...



H.Stony
05-15-2005, 02:48 AM
how do i get the supported display resolutions? Like glGetString(GL_VERSION)...a function which returns all supported resolutions. 800x600:32.....1024x768:32
i need it on Win, Mac

thanks

MickeyMouse
05-15-2005, 03:05 AM
OpenGL doesn't give you this info. This is how I had it done under Win32:

cVoid cWin32MainWindow::listGraphicModes()
{
LOG << "<i>Available graphic modes:\n";

::DEVMODE mode;
for (cInt i = 0; ::EnumDisplaySettings(NULL, i, &amp;mode); i++)
if (::ChangeDisplaySettings(&amp;mode, CDS_TEST) == DISP_CHANGE_SUCCESSFUL)
LOG << cString("%3d", i) << " [" <<
cString("%3d", mode.dmPelsWidth) << " x " <<
cString("%3d", mode.dmPelsHeight) << " x " <<
cString("%2d", mode.dmBitsPerPel) << "]\n";
}

H.Stony
05-15-2005, 03:09 AM
i found this program and it shows you every possible resolution. i dont think the program tests every resoultion.