lwjgl "could not create a direct GLX context"

Started by Whistler, December 03, 2004, 04:59:10

Previous topic - Next topic

Whistler

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

elias

Could try a run of 'glxinfo' and tell me if it says that the context is direct?

- elias

Whistler

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

Whistler

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?

elias

Yes, use -Dorg.lwjgl.opengl.Window.allowSoftwareOpenGL=true when running lwjgl applications.

- elias

Whistler

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.

theBohemian

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