Skip to main content

Enumerating Display Modes in Linux

Submitted by dom on

I'm writing an OpenGL application for Win32 and Linux. I use WGL on Win32 and GLX on X-Windows to handle OpenGL rendering contexts.

In Win32 I use EnumDisplaySettings( ) and ChangeDisplaySettings( ) respectively to handle full screen mode switching at various display modes. I'm wondering if there are eqivalent routies for enumerating display modes in Linux for full screen rendering?

I don't want to use GLUT, because it is not suitable from my application.

Submitted by dom on Mon, 19/04/04 - 9:55 AMPermalink

i thought about using SDL, but i don't want to use another library that just wraps around X-windows.

How do I render with DRI?

Submitted by Shplorb on Wed, 21/04/04 - 8:09 PMPermalink

You don't have to use SDL - just have a look at the source to see how they do it.

Submitted by rx on Sun, 16/05/04 - 10:25 AMPermalink

hello

hope this might help
http://www.xfree86.org/4.4.0/XF86VidModeModModeLine.3.html
this site has some documentation about calls to the X server

Bool XF86VidModeGetAllModeLines(
Display *display,
int screen,
int *modecount_return,
XF86VidModeModeInfo ***modesinfo);

this is function u wanna call to get the display modes from the x server.

chao
rx

Submitted by dom on Fri, 28/05/04 - 11:01 AMPermalink

Thanks for your reply RX. :) I'll check it out.

Posted by dom on

I'm writing an OpenGL application for Win32 and Linux. I use WGL on Win32 and GLX on X-Windows to handle OpenGL rendering contexts.

In Win32 I use EnumDisplaySettings( ) and ChangeDisplaySettings( ) respectively to handle full screen mode switching at various display modes. I'm wondering if there are eqivalent routies for enumerating display modes in Linux for full screen rendering?

I don't want to use GLUT, because it is not suitable from my application.


Submitted by dom on Mon, 19/04/04 - 9:55 AMPermalink

i thought about using SDL, but i don't want to use another library that just wraps around X-windows.

How do I render with DRI?

Submitted by Shplorb on Wed, 21/04/04 - 8:09 PMPermalink

You don't have to use SDL - just have a look at the source to see how they do it.

Submitted by rx on Sun, 16/05/04 - 10:25 AMPermalink

hello

hope this might help
http://www.xfree86.org/4.4.0/XF86VidModeModModeLine.3.html
this site has some documentation about calls to the X server

Bool XF86VidModeGetAllModeLines(
Display *display,
int screen,
int *modecount_return,
XF86VidModeModeInfo ***modesinfo);

this is function u wanna call to get the display modes from the x server.

chao
rx

Submitted by dom on Fri, 28/05/04 - 11:01 AMPermalink

Thanks for your reply RX. :) I'll check it out.