Gentoo (Linux) / e16 - Error - GLX context

Started by Haquejiel, March 23, 2005, 08:03:59

Previous topic - Next topic

Haquejiel

(Apologies for the rather long title: I was trying to be descriptive).

I'm not entirely sure of what information is needed, but here is my setup (to the best of my knowledge):

I am running the Linux distribution "Gentoo" with kernel version "2.6.11" (marked as "2.6.11-gentoo-r4" in my directories). My videocard is an SiS 650. I am running Enlightenment (e16) for a window interface over Xorg (X11).

Anyway, I follow some directions through various topics on here to install and run LWJGL programs - I'm in the process of trying to learn to program with them (again, this time in Linux).

My development IDE is Netbeans IDE 4.0, and my JRE/JDK is Blackdown-1.4.2-01.
Java programs run normally and smoothly (and I even managed to get some simple ones to compile to gcj). I'm using Netbeans' project system to deploy LWJGL programs as describe in this topic:

Quotehttp://lwjgl.org/forum/viewtopic.php?t=953

I copied Lesson01 from the lwjgl wiki (the NeHe port) to a new file in my project and compiled it after making several corrections (such as DisplayMode mode being declared as DisplayMode? mode and therefore throwing some compiling-time problems). To the best of my knowledge, OpenGL does, indeed, exist and is installed on my system (my kernel loads glx on loading, I assume it's related).

When I run Lesson01, I see a box appear across my screen, flicker a few times, stop, flicker, then die. My terminal, which is running inside the windowing system (e16, as stated) delivers this lovely message:

org.lwjgl.LWJGLException: Could not create a direct GLX context
    at org.lwjgl.opengl.LinuxDisplay.nCreateContext(Native Method)
    at org.lwjgl.opengl.LinuxDisplay.createContext(LinuxDisplay.java:176)
    at org.lwjgl.opengl.Display.create(Display.java:530)
    at org.lwjgl.opengl.Display.create(Display.java:507)
    at Lesson01.createWindow(Lesson01.java:125)
    at Lesson01.init(Lesson01.java:153)
    at Lesson01.run(Lesson01.java:63)
    at Lesson01.main(Lesson01.java:53)


I Google'd the phrase "could not create a direct glx context" and the only reference I found was to a conversation in IRC (a log, presumably) with Matzon, who mentioned something about hidden switches (presumably this person's problem was that they were rendering through software, rather than hardware). I have no idea how to access said switches.

That withstanding, is there any other information anyone needs to help me?  :D

EDIT: Fixed some formatiing in the error code block listed above. =D

Matzon

it's in the lwjgl_hidden_switches.txt document, or:
Quoteorg.lwjgl.opengl.Display.allowSoftwareOpenGL
Whether to allow creation of a software only opengl context

Haquejiel

I hunted around until I realized lwjgl_hidden_switches.txt was in the CVS tree. Whoops!

If that option allows software rendering, does it prevent hardware?

In other words, what exactly is my problem? In other words, is my computer incapable of hardware rendering or is something forcing it to render through software?

Matzon

My guess is that your SIS chipset is incapable of hardware opengl or simply sucks.

LWJGL always wants hardware accelleration and quits if it can't get it. Unless you supply the specified flag.

I am fairly sure the document is supplied in the distribution ?

Try running glxgears or some other linux ogl app and see what speed your get.

Haquejiel

Well, the chipset does suck - kind of. It is completely missing hardware T&L (meaning I can't run any game made after 2001 or so, but anything before boogies).

I ran glxgears. Here is what I got:
906 frames in 5.0 seconds = 181.200 FPS
819 frames in 5.0 seconds = 163.800 FPS
1213 frames in 5.0 seconds = 242.600 FPS
1064 frames in 5.0 seconds = 212.800 FPS
1330 frames in 5.0 seconds = 266.000 FPS
1197 frames in 5.0 seconds = 239.400 FPS
1197 frames in 5.0 seconds = 239.400 FPS
1197 frames in 5.0 seconds = 239.400 FPS
1330 frames in 5.0 seconds = 266.000 FPS


I closed down my browser and a few other apps, cleared off the background and gave it a slightly higher priority. It spiked at about 1520 (304 FPS).

I have no idea how good this is.

How do I add that flag to my programs? Import it?

Haquejiel

Well, I did some tests and considerable amounts of research, and I've concluded that, combined with my kernel, my videocard's DRI abilities are moot (oh the joys of crappy chipsets). I'm too lazy to write my own drivers, and if I switch to the 2.4 kernel it's going to break several other things.

So I'll just have to ignore the significant lack of direct rendering.

That withstanding, how do I enable LWJGL's software rendering with that hidden flag?

Matzon

java -classpath <whatever> -Dorg.lwjgl.opengl.Display.allowSoftwareOpenGL=true ....

steuu

QuoteWell, I did some tests and considerable amounts of research, and I've concluded that, combined with my kernel, my videocard's DRI abilities are moot (oh the joys of crappy chipsets). I'm too lazy to write my own drivers, and if I switch to the 2.4 kernel it's going to break several other things.

I've got the same your problem... could you tell me where have you found the information about kernel/videocard  problems...

Or someone have some hint?? I can use the direct rendering for other application, even jogl works,as the space invaders launched  with javaWebstart

Tnx in advance
SteUU


Configuration:

Debian Sarge
kernel  2.6.11.6
Ati Mobility Radeon
glxgears ~330 fps  DirectRender Yes