cuckydev / PSXFunkin

Friday Night Funkin' on the original PlayStation
https://discord.gg/Ehd7jN4N5y
Mozilla Public License 2.0
203 stars 58 forks source link

Add OpenGL ES 2.0 renderer (also fix a build error) #45

Closed Clownacy closed 3 years ago

Clownacy commented 3 years ago

With this, the port runs at full speed on my Raspberry Pi 3B+. Unfortunately, I was only able to test it with the open-source Mesa driver, as the closed-source Broadcom driver does not work in an X session, and this port is unable to run from the terminal. If this port had an SDL2 backend, then it would gain support for running from the terminal for free - it's just something GLFW3 lacks.

I also fixed a build error involving libdl not being linked. Recent versions of glibc merged libdl with libc, removing the need to link it separately, which is why I never encountered this error on Arch Linux. The old version of Raspberry Pi OS I'm currently using lacks this change, allowing the error to manifest.

Your fragment shader also appeared to contain a bug: it compared a float to an integer, which caused the GLSL ES 1.0 compiler to produce an error. I don't know if this is valid GLSL Core 1.50, but I've fixed it in both GLSL versions regardless.