Reputation: 2031
So, on 64-bit Ubuntu I'm developing with LWJGL, but code that worked perfectly well on Windows (and Mac, though I've tested that much less) is having issues on my new machine.
Basically, if I attempt to init fullscreen mode, the application ends up in a window instead of taking over the view, an performance is very slow (about 1/2 to 1/3 of what it should be).
Funnily enough, rarely (about 5% of the time) everything works perfectly and performance is good.
After doing some research on Google, it seems like this is due to issues with the X Windowing system. I found an article here that suggests calling XInitThreads() in the application before setting anything else up. Unfortunately, how do I make the call?
I realize that I can use
Process p = Runtime.getRuntime().exec("The system command goes here");
to execute system commands, but I don't know the command to use.
Upvotes: 0
Views: 440
Reputation: 100051
Unfortunately, you can't solve your problem with exec
. The process -- in this case, the JVM process -- has to make that call. The link you reference is describing the unfortunate fact that the JVM does not make it. It is very unlikely that you can introduce this for yourself.
Talking to the X API is a fundamental activity of the JVM: it's how AWT is implemented in this environment. Since the JVM is already using X to talk to the display, you can't just introduce one little extra call. The necessary place to put that call is in the middle of the X init code in the JVM.
OpenJDK is open source. You could make your own version, but I can't recommend that.
Upvotes: 1