LWJGL Forum

Programming => Lightweight Java Gaming Library => Topic started by: Whistler on December 03, 2004, 04:59:10

Title: lwjgl "could not create a direct GLX context"
Post by: Whistler on December 03, 2004, 04:59:10
I wanted to try lwjgl, ran into a problem, however.

All applications (the space invaders demo, for example, or the nehe lessions) fail with following error message:

org.lwjgl.LWJGLException: Could not create a direct GLX context


OpenGL in general seems to work; I can run glxgears and also play Quake
III, so I don't know why lwjgl complains.

Do you have any idea?

Running on Ubuntu Linux (Hoary), Java VM: Sun 1.5
Title: lwjgl "could not create a direct GLX context"
Post by: elias on December 03, 2004, 06:14:27
Could try a run of 'glxinfo' and tell me if it says that the context is direct?

- elias
Title: lwjgl "could not create a direct GLX context"
Post by: Whistler on December 03, 2004, 06:43:54
As it seems, direct rendering is not possible. I'll try to enable direct rendering. Meanwhile; is it possible to force lwjgl to use indirect rendering?

glxinfo:
direct rendering: No
Title: lwjgl "could not create a direct GLX context"
Post by: Whistler on December 03, 2004, 08:59:08
I'm still having trouble getting dri running.

The X server says:
(II) I810(0): direct rendering: Enabled

whereas glxgears reports:
direct rendering: No

libGL seems to use the correct driver and is also able to open /dev/dri/card0.

Is there a way to use lwjgl with indirect rendering?
Title: lwjgl "could not create a direct GLX context"
Post by: elias on December 03, 2004, 09:11:20
Yes, use -Dorg.lwjgl.opengl.Window.allowSoftwareOpenGL=true when running lwjgl applications.

- elias
Title: lwjgl "could not create a direct GLX context"
Post by: Whistler on December 03, 2004, 09:32:46
Ah, yes.

Thank you very much.

I think the troube was caused by version conflicts. I mixed up Debian and Ubuntu packages from Unstable and Hoary.

It runs now, though I'll use software rendering. DRI is quite a bit unstable with XOrg, at least right now.

Thanks again.
Title: Property name changed
Post by: theBohemian on July 01, 2005, 13:54:25
For all who came here by some search engine:
The property in question is now named org.lwjgl.opengl.Display.allowSoftwareOpenGL

That means you have to add this line to get lwjgl programs to run with indirect rendering:

-Dorg.lwjgl.opengl.Display.allowSoftwareOpenGL=true