lunixbochs / glshim

OpenGL 1.x driver shim for OpenGL ES devices.
https://boards.openpandora.org/topic/11506-glshim/
MIT License
160 stars 32 forks source link

Fun and Games with Minecraft on ARM #38

Closed moocow1452 closed 9 years ago

moocow1452 commented 10 years ago

So I've been trying for a while yet to run a full PC version of Minecraft on a SoC board like the Beaglebone Black or the Raspberry Pi, with the intention of making it into a portable build, so GLShim is an awfully useful project in that regard. I've seen video of it running on an Open Pandora, so I know that certain builds of certain versions of Minecraft can run, but can this functionality be ported to a more generic ARM board, or even allow for GLShim equipped application-ports for Android?

PS: Most recent run on a LWJGL-patched Pi. Same or similar error message ran when I tried to run it on my Beaglebone Black, so that's promising.

[20:11:03 INFO]: Client> [20:11:03] [Client thread/INFO]: LWJGL Version: 2.9.1 [20:11:04 INFO]: Client> # [20:11:04 INFO]: Client> # A fatal error has been detected by the Java Runtime Environment: [20:11:04 INFO]: Client> # [20:11:04 INFO]: Client> # SIGSEGV (0xb) at pc=0x00000000, pid=2488, tid=3057566832 [20:11:04 INFO]: Client> # [20:11:04 INFO]: Client> # JRE version: Java(TM) SE Runtime Environment (7.0_60-b19) (build 1.7.0_60-b19) [20:11:04 INFO]: Client> # Java VM: Java HotSpot(TM) Client VM (24.60-b09 mixed mode linux-arm ) [20:11:04 INFO]: Client> # Problematic frame: [20:11:04 INFO]: Client> # C 0x00000000 [20:11:04 INFO]: Client> # [20:11:04 INFO]: Client> # Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again [20:11:04 INFO]: Client> # [20:11:04 INFO]: Client> # An error report file with more information is saved as: [20:11:04 INFO]: Client> # /home/pi/.minecraft/hs_err_pid2488.log [20:11:04 INFO]: Client> # [20:11:04 INFO]: Client> # If you would like to submit a bug report, please visit: [20:11:04 INFO]: Client> # http://bugreport.sun.com/bugreport/crash.jsp [20:11:04 INFO]: Client> # The crash happened outside the Java Virtual Machine in native code. [20:11:04 INFO]: Client> # See problematic frame for where to report the bug. [20:11:04 INFO]: Client> # [20:11:04 INFO]: Client> glXGetProcAddress: glXGetCurrentContext not found. [20:11:04 INFO]: Client> glXGetProcAddress: glXQueryExtension not found. [20:11:04 INFO]: Client> glXGetProcAddress: glXQueryVersion not found. [20:11:04 INFO]: Client> glXGetProcAddress: glXGetClientString not found. [20:11:04 INFO]: Client> glXGetProcAddress: glXGetFBConfigs not found. [20:11:04 INFO]: Client> glXGetProcAddress: glXChooseFBConfig not found. [20:11:04 INFO]: Client> glXGetProcAddress: glXGetFBConfigAttrib not found. [20:11:04 INFO]: Client> glXGetProcAddress: glXGetVisualFromFBConfig not found. [20:11:04 INFO]: Client> glXGetProcAddress: glXCreateWindow not found. [20:11:04 INFO]: Client> glXGetProcAddress: glXCreateContextAttribsARB not found. [20:11:04 INFO]: Client> glXGetProcAddress: glXEnumerateVideoDevicesNV not found. [20:11:04 INFO]: Client> glXGetProcAddress: glXBindVideoCaptureDeviceNV not found. [20:11:04 ERROR]: Game ended with bad state (exit code 134) [20:11:04 INFO]: Ignoring visibility rule and showing launcher due to a game crash [20:11:04 INFO]: Deleting /home/pi/.minecraft/versions/1.7.10/1.7.10-natives-570003515733

lunixbochs commented 10 years ago

The minecraft video uses ptitseb's glshim fork. It's slow enough on a Pandora - you probably won't get very good framerate on a Pi. Have you seen Minecraft Pi Edition?

glshim is definitely useful for ports to mobile phones/tablets. I have a medium-term goal to come up with some demos there. The hard part isn't actually OpenGL anymore. It's the other pieces: X11, ALSA, etc. It's totally feasible on games already using SDL, which is how the GCW Zero glshim fork works.

(My current project is actually a software GL ES backend for glshim so slow 2D games like Uplink and Aquaria will be much faster. I have Uplink from 2-20fps on a Pandora up to 60-80fps.)

moocow1452 commented 10 years ago

Have you seen Minecraft Pi Edition?

Yeah, but it hasn't been updated in a forever and a half, so I figured I might as well try and get the full PC version running on ARM, since Java is supposed to be able to run everywhere, and fragmentation of Minecraft across the different "editions" make cross-world travel a pain. Also mostly because I have to do something with my time, and video games aren't cutting it as much as they used to.

http://pastebin.com/dXc6hMLA

This is my latest error log from running on the Bone, and again, Pi is similar enough that a fix across one would probably fix the other. Got any idea how to contact ptitseb, insights, or point me in a direction where I can don't have to bug you every time I wanna run something new?

lunixbochs commented 10 years ago

You might have success messaging ptitseb on the OpenPandora forums.

moocow1452 commented 10 years ago

K. After running his build for a bit, I ran into a point where we were both stumped. Error log as follows...

Pastebin.com/ui4GneEK

Any idea what could cause Java to completely crap the bed? On Jul 1, 2014 9:01 PM, "Ryan Hileman" notifications@github.com wrote:

You might have success messaging ptitseb on the OpenPandora forums.

— Reply to this email directly or view it on GitHub https://github.com/lunixbochs/glshim/issues/38#issuecomment-47726683.

lunixbochs commented 10 years ago

That's more of a java question than a glshim question.

You can dig into it further with gdb, valgrind, etc or any java debugging programs.

Also keep in mind Ptitseb's glshim fork has a ton of overall changes so I'm not going to be of much use helping you with it.

kika123 commented 9 years ago

try the full-blown Mesa for VC4 driver.

Epica-Lolz commented 9 years ago

Well, here's the issue with that: The Mesa driver is OpenGL, and typically, most arm machines/boards come with OpenGLES, which is a special version of OpenGL designed for phones/tablets. To compensate for that, they made glshim, which is something that translates OpenGLES to regular OpenGL (Albeit, an older version of OpenGL.)

waddlesplash commented 9 years ago

@moocow1452: Zhuowei Zhang has already done this, it's called Boardwalk, and you can find it in the Play store.

lunixbochs commented 9 years ago

Boardwalk uses glshim. This is a thread about the Raspberry Pi, not Android. There's also a working Pandora version of Minecraft.

lunixbochs commented 9 years ago

You should try again on the latest unstable glshim (which has much better Pi support).