PDA

View Full Version : OpenGL under Linux without X Windows?



Yarmy
09-21-2008, 09:42 AM
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.

Thanks.

chris2718
09-21-2008, 12:10 PM
I think there's another post somewhere about this, it requires another library.

Overmind
09-21-2008, 02:03 PM
Is X Windows really necessary to do OpenGL under Linux?

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...


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.

Perhaps slightly off-topic, but have you looked into Ratpoison (http://ratpoison.sourceforge.net/)? X itself is not so bad, once you get rid of the unnecessary bloat ;)

chris2718
09-21-2008, 04:45 PM
Hi, I found the post. It's about the same topic.
OpenGL on Linux without X11 (http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=showflat&Board=4&Number=241554&Searchpage=1&Main=47499&Words=fullscreen&topic=0&Search=true#Post241554)

jamesqf
09-21-2008, 11:07 PM
I really can't stand X and am mainly a command-line user.

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 :-)

PkK
10-10-2008, 03:18 AM
Hi all,
Is X Windows really necessary to do OpenGL under Linux?


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 http://people.freedesktop.org/~krh/eglgears.png 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.

Philipp