Release LWJGL


hi, Gears is working for me, but Blocks That Matter not as of yet:


$ java -jar BTM.jar
...
Exception in thread "main" java.lang.UnsatisfiedLinkError: /mnt/utmp/java/lib/liblwjgl.so: libjawt.so: cannot open shared object file: No such file or directory

$ LD_LIBRARY_PATH=/mnt/utmp/java/jdk/jre/lib/arm java -jar BTM.jar
...
Exception in thread "main" java.lang.UnsatisfiedLinkError: org.lwjgl.opengl.GLContext.nLoadOpenGLLibrary()V


Do I need to hack this to use a GLESContext instead, or something like that?  Can we fix that in lwjgl?  I don't have the source code for this game.
 
Last edited by a moderator:
That's what happens when it assumes the context is org.lwjgl.opengl.GLContext, typically by importing org.lwjgl.opengl.* and then making GLContext specific calls. Minecraft does the same thing. In theory it's easy to fix by changing the source to import org.lwjgl.opengles.GLContext (which is a drop in replacement which makes proper GLES calls instead), but in the absence of source there isn't a lot that can be done. Of course, they shouldn't really be making GLContext calls at all, but I can't really argue against them: when making anything of any complexity, it's hard enough thinking of cross platform considerations without having to think about cross-api considerations.

This is probably going to happen more often than I had originally hoped. I'll keep my thoughts on this and see if I can't come up with a solution next week. Moving this weekend, no time for hacking.
 
In theory it's easy to fix by changing the source
Can we fix it by changing org.lwjgl.opengl.GLContext to simply inherit from org.lwjgl.opengles.GLContext (and nothing else) in our build?  This would be much better than having to hack every game (which is difficult without source code!)

I will try this if you can you point me to your latest source code?  (I would like to mirror this source code in git on my server also.)  Even better than just source code would be a tgz with the source and object / class files, so I can run make and it will only rebuild what I changed.  Can you provide that?
 
Can we fix it by changing org.lwjgl.opengl.GLContext to simply inherit from org.lwjgl.opengles.GLContext (and nothing else) in our build?  This would be much better than having to hack every game (which is difficult without source code!)
I remember trying that and there was some other problems that popped up. You should just be able to git pull the source yourself if you want to try to build it.
 
What about using linuxbochs' libGL.so? Would that help here? When it's finished that is. That should make the original org.lwjgl.opengl.GLContext work, right?
 
Last edited by a moderator:
No one ever answered my question, would linuxbochs' OpenGL wrapper work with this? I'd try it myself but I've no idea how.
 
Back
Top