UPBGE / upbge

UPBGE, the best integrated game engine in Blender
https://upbge.org
Other
1.39k stars 177 forks source link

No available Apple Silicon download #1849

Open Michael-Z-Freeman opened 9 months ago

Michael-Z-Freeman commented 9 months ago

Hi,

I thought there was an older but still usable Apple Silicon version of UPBGE ? I'm sure I downloaded it before but I can't find it now.

Can I compile from source for Apple Silicon ? I have some experience with solving build problems so may be able to help with this.

Michael

lordloki commented 9 months ago

Hi,

The Silicon build is here: https://mega.nz/folder/t9EEFSaS#JPiOPSInCZyU-SW_-rhEOQ

Currently I'm trying to cross-compile (from an intel mac) to get an apple silicon build but no success at this moment. I can help you with the build if you want.

Michael-Z-Freeman commented 9 months ago

Hi,

The Silicon build is here: https://mega.nz/folder/t9EEFSaS#JPiOPSInCZyU-SW_-rhEOQ

Currently I'm trying to cross-compile (from an intel mac) to get an apple silicon build but no success at this moment. I can help you with the build if you want.

Great. I'm on an Apple Silicon device (M1). Where are the build instructions ?

Michael-Z-Freeman commented 8 months ago

OK. I built Blender first using https://wiki.blender.org/wiki/Building_Blender/Mac ... Successful build. Seems to work OK but don't know how stable it is. It's also Alpha (4.1.0).

Did the same for UPBGE and it built OK. However hitting "P" on the default cube project crashes it. This is likely because its 4.1.0 Alpha ? If so how do I build a stable UPBGE ?

UPBGE Blender Crash Report Default Project.txt UPBGE Apple Silicon MacOS Crash Report Default Project.txt

UPBGE 4 1 0 Alpha Apple Silicon Build Splash Screen UPBGE executable Apple Silicon type CLI Blender executable Apple Silicon type CLI Blender 4 1 0 Alpha Apple Silicon Build Splash Screen
lordloki commented 8 months ago

Currently, blender 4.1 alpha or upbge 0.41 alpha for MacOS uses Metal for the viewport. The crash comes from the upbge reasterizer when it tries to uses opengl . image

I'm trying to remove all the Opengl calls for macos to start testing metal port. I will inform you to make tests. Thanks for your feedback.

Michael-Z-Freeman commented 8 months ago

Currently, blender 4.1 alpha or upbge 0.41 alpha for MacOS uses Metal for the viewport. The crash comes from the upbge reasterizer when it tries to uses opengl . image

I'm trying to remove all the Opengl calls for macos to start testing metal port. I will inform you to make tests. Thanks for your feedback.

Ah. Thanks.

Can the viewport renderer be temporarily switched away from Metal for the moment back to OpenGL either within Blender itself (I can't see an option for this) or with command line build option ?

gratoo commented 5 months ago

Any luck on this? I'd like to help if possible. Where should I start looking to understand and solve that issue?

Michael-Z-Freeman commented 5 months ago

Any luck on this? I'd like to help if possible. Where should I start looking to understand and solve that issue?

Blender upstream has an Apple Silicon download. Of course that Blender does not have the game engine anymore. So UPBGE OpenGL calls are coming from the game engine which of course was never fixed for Apple Silicon because it was removed from Blender main years ago. I wonder if a wrapper is available such as we see with DXVK ( https://github.com/doitsujin/dxvk ) that can translate from OpenGL to Metal ?

https://github.com/openglonmetal/MGL ? ... "This is a start for porting OpenGL 4.6 on top of Metal".

https://github.com/kakashidinho/metalangle ? ... "MetalANGLE - OpenGL ES to Apple Metal API Translation Layer".

https://www.reddit.com/r/opengl/comments/qtxgph/its_alive_opengl_45_on_mac_os_metal/ ? ... "It's alive OpenGL 4.5 on Mac OS Metal".

gratoo commented 4 months ago

Thanks Michael.

By the way I built the game engine from the upbge-v0.36-release branch on a Intel Mac and I ran into the exact same issue. It crashes at the exact same place in GetNumLights() in RAS_OpenGLRasterizer.cpp.

I'm trying to re-build the official upbge-0.36.1-macOS-x86_64.dmg from the source which runs fine on my Intel and M1 Mac. Do you guys know what I'm missing?

Michael-Z-Freeman commented 4 months ago

Thanks Michael.

By the way I built the game engine from the upbge-v0.36-release branch on a Intel Mac and I ran into the exact same issue. It crashes at the exact same place in GetNumLights() in RAS_OpenGLRasterizer.cpp.

I'm trying to re-build the official upbge-0.36.1-macOS-x86_64.dmg from the source which runs fine on my Intel and M1 Mac. Do you guys know what I'm missing?

UPBGE uses EEVEE right ? EEVEE works in latest Blender using macOS Metal. So UPBGE needs to hook into the EEVEE Metal calls not OpenGL. Not as easy as it sounds I guess.