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
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
OpenGL doesn’t give you this info. This is how I had it done under Win32:
cVoid cWin32MainWindow::listGraphicModes()
{
LOG << "<i>Available graphic modes:
";
::DEVMODE mode;
for (cInt i = 0; ::EnumDisplaySettings(NULL, i, &mode); i++)
if (::ChangeDisplaySettings(&mode, CDS_TEST) == DISP_CHANGE_SUCCESSFUL)
LOG << cString("%3d", i) << " [" <<
cString("%3d", mode.dmPelsWidth) << " x " <<
cString("%3d", mode.dmPelsHeight) << " x " <<
cString("%2d", mode.dmBitsPerPel) << "]
";
}
i found this program and it shows you every possible resolution. i dont think the program tests every resoultion.