OpenGL under Linux without X Windows?

Hi all,

Is X Windows really necessary to do OpenGL under Linux?

I really can’t stand X and am mainly a command-line user.

If I could just invoke an OpenGL program and have it go full-screen that would be much better.


I think there’s another post somewhere about this, it requires another library.

I’m afraid it’s not possible, at least not if you want full hardware acceleration for modern cards. Of course you can use Mesa software rendering on a framebuffer device.

I also seem to recall there are some possibilities to get hardware acceleration. But the problem is you won’t get drivers from the hardware vendors…

Perhaps slightly off-topic, but have you looked into Ratpoison? X itself is not so bad, once you get rid of the unnecessary bloat :wink:

Hi, I found the post. It’s about the same topic.
OpenGL on Linux without X11

So am I mainly a command-line user, but X gives me multiple command lines plus the ability to use the graphical stuff when I need it.

Perhaps you are confusing X with Windoze-like desktops such as Gnome and KDE? Try using a lightweight window manager such as FVWM2 instead. On startup I simply have three xterm windows on one screen, and a pager/clock in the lower right corner. No GUIness at all :slight_smile:

No. However support for OpenGL without X is still experimental. Some time ago it was working for the Radeon driver. With some effort one could probably get it working again. Recently it has been done for the gallium infrastructure (and tested in the i915 driver). See the posts “[Mesa3d-dev] [PATCH/RFC] Provide a standalone EGL build (on top of drm) for gallium-0.1” and “[Mesa3d-dev] EGL in Mesa” to the mesa3d-dev mailing list for details. At there’s a screenshot of an OpenGL pogram running without X. Note that when there’s no X there’s no GLX, so you have to use EGL (originally introduced for OpenGL ES) instead.


This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.