Release LWJGL


WizardStan

Mega GP Mania
Joined
May 24, 2008
Messages
16,731
Phase 1: Compile library, collect other necessary libraries


Phase 2: Tweak Java source a little, build JAR


Phase 3: Build examples (extract all three packages to a directory, execute "test.sh Gears". "test.sh FullScreenWindowedTest" will also work but it's not as interesting as gears. Or maybe you like squares.)


Phase 4: Run Minecraft


Okay, phase 4 needs a little bit more work. I got it to create an OpenGLES context but it makes some assumptions that it really shouldn't. Somewhere in the code it tries to get the the device capabilities and just assumes that it has an OpenGL context which causes trouble. I'm not sure when (if ever) I'll have a chance to look into that. In the simple world it would require decompiling some of the Minecraft classes and just replacing instances of "ContextGL" with "ContextGLES" (or perhaps even with simply "Context"). Nothing Notch does is simple. :p


In the meantime, here's lwjgl for ARM. If any Java devs have a hankering for some 3D work, this is everything you need. Just don't do anything that assumes you have an OpenGL context, and whatever you write will run on desktops (with regular OpenGL) or on the Pandora with OpenGLES. I spent way longer on this than I really should have and I expect someone to use it, capisce? :p


Note that it is very easy to screw up the FullScreenWindowedTest if you flip back and forth between fullscreen and windowed. Not that it makes a difference, the "windowed" mode is still full screen, but whatever. Alt-Tab back to your terminal and ctrl-C kill it if it gets messed up.
 
Thanks WizardStan. Getting LWJGL working was on my todo list. Great work.
 
I wouldn't be counting my creepers before they've exploded, there's still a lot of unknowns when it comes to Minecraft. It successfully created an GLES context, but then it assumed it was a regular OpenGL context and crashed, instead of using the basic Context interface like it should. Even if I manage to dig through the obfuscated code and fix that, there's probably something else behind it. I was going to wait, but my next couple weeks are pretty hectic and I wanted to get this much out before I forgot, see if someone else might have plans. It's a pretty good library, we can definitely benefit from it.
 
With Optifine, Minecraft can be tweaked pretty well to run on slow systems. Maybe there is hope to run it on the Pandora at playable speed. :) But first, it has to run at all of course.


I'm still sad that Notch does not use his Pandora anymore. He was upset because he've got an early Pandora back then, when the OS was pretty bad and not much software was available. Now I'm sure, he would have fun with his Pandora but contacting him ansd asking fort this is nearly impossible. Notch is just to famous. :D
 
Saw a photo of notch again today and thought that we could be twins. Eventuelle thought he is older than me and has quite a bit more weight. ;)


Edit: Sorry for offtopic
 
Last edited by a moderator:
Great Stan :) an LWJGL build for Pandora , maybe could help some java developers to port some apps/games.


Thank's ;)
 
Once I've worked through Minecraft to see if there are any tweaks to the library that will help, I intend to repackage the java.pnd with it. That'll be a few weeks though, maybe January.
 
Hmm, nothing I've tried has complained about it being missing though admittedly I've only tried the demos and Minecraft (which has its own problems).

compile_native is supposed to build all native libraries but it isn't doing jinput for some reason. I'll figure this out, please stand by.
 
Ok, I've built jinput. I'll create a new java.pnd and include lwjgl, jinput, jutil, and anything else that may come up between now and then.
 
awesome!
 
Last edited by a moderator:
Java programs are compiled to java bytecode, and run on JVM virtual machine.

Unlike machine code, java bytecode is portable between different systems.

So I'm hoping it might "just work" with the java.pnd, lwjgl, jinput and such.

It doesn't seem to depend on any other compiled libs.

Possible trouble: it might need a greater screen resolution, and it might be too slow.
 
Last edited by a moderator:
Yeah, I know you can run programs "as is" as long as they are built on java, but I was certainly referring to the fact that you would have to be able to adapt the resolution and all. I'm pretty sure they made the resolution 800*600 as minimum or maybe even higher. And regarding speed, it could be an issue too, but it depends a lot on how fast the Java VM is on Pandora compared to other platforms. I have never done any comparison so far so I am not sure how it fares. 
 
Last edited by a moderator:
Update your java.pnd, see if it runs. The basic examples I try work, but that doesn't mean much.

If you get any errors let me know and I'll see what I can do.
 
Back
Top