hajimehoshi / ebiten

Ebitengine - A dead simple 2D game engine for Go
https://ebitengine.org
Apache License 2.0
11.01k stars 660 forks source link

Port to Raspberry Pi (Zero) with Dispmanx #760

Open hajimehoshi opened 5 years ago

hajimehoshi commented 5 years ago

Probably improving performance would be challenging

hajimehoshi commented 5 years ago

Ugh, I'm now quite busy to do this. Let me defer this.

hajimehoshi commented 4 years ago

https://jan.newmarch.name/LinuxSound/Diversions/RaspberryPiOpenGL/

hajimehoshi commented 4 years ago

Would OpenGL ES work Raspberry Pi Zero W? It's worth investigating...

rytrose commented 3 years ago

Hi! I believe this thread answers my question, but is ebiten able to run on a Pi Zero W? (I think the answer is no, or maybe not yet?)

hajimehoshi commented 3 years ago

I think yes with OpenGL, but not very efficiently.

rytrose commented 3 years ago

Hm, okay. Are there any more instructions about setting up ebiten for Raspberry Pi? I followed the Install > Linux > Debian / Ubuntu instructions, but all ebiten programs (examples and my own) fail with the following:

$ libGL error: No matching fbConfigs or visuals found
$ libGL error: failed to load driver: swrast

I've tried on both a Pi Zero W and a Pi 4B.

If there's a better place to direct this question, please let me know! Thanks for any help you can provide, and for the great library!

hajimehoshi commented 3 years ago

That's odd. At least, Ebiten should work with Raspberry Pi 4. @gravestench do you have any insights?

gravestench commented 3 years ago

@hajimehoshi I'm not sure, last I tested with pi4 and I did not see issues like these. @rytrose My only hunch is that maybe golang from package manager is old, you may want to install prebuilt golang for arm64 from the golang web site (i think current version is 1.15.7). Otherwise, build+install from source. Again, just a hunch, and i don't have my pi4 handy for testing any of this.

Ryan-Rose-Bose commented 3 years ago

After digging into it a bit, I'm fairly confident it was user error 🙃. I was trying to first use X11 forwarding over SSH and didn't realize the implications of OpenGL and that process, and then I had the same issue when first using an HDMI display, but that resolved itself on reboot.

hajimehoshi commented 3 years ago

https://www.raspberrypi.org/forums/viewtopic.php?t=148656

We might have to use OpenGL ES instead of OpenGL?