Google Angle macOS: Black screen issue
I Compiled latest Angle version on macOS and linked with RSGL. Examples run without an error but display only a black screen.
Has Angle been tested on macOS, and is there official support for Angle?
Thanks
I've not tested with Angle and I'm not sure how to. I currently run macOS on a VM.
This behavior makes sense because RSGL_gl.h has no Angle-specific code, which I think is required.
I believe I've identified the cause of the problem. When compiled with default settings, RGFW uses system OpenGL. However, to use RGFW with Angle, I need to use EGL instead of system OpenGL. The issue is that on macOS, RGFW only supports system OpenGL.
When I have time, I'll test it on Windows and Linux and report back. I think Angle might work for Windows and Linux because raylib, which also only supports OpenGL, can use Metal or DX11 through Angle. My guess is that RGFW will work with Angle on Windows and Linux.
#ifdef RGFW_EGL
#if defined(__APPLE__)
#warning EGL is not supported for Cocoa, switching back to the native opengl api
#undef RGFW_EGL
#endif
#endif
https://medium.com/@grplyler/building-and-linking-googles-angle-with-raylib-on-macos-67b07cd380a3
I figured that EGL was not supported on macOS after searching for the binaries. I have no idea why but it seems super difficult to find bindings for EGL on every platform but Linux. Could you make a separate issues on RGFW regarding EGL support for macOS so I don't forget to get to it?
The article says how to get EGL bindings for macOS! :)
Update: RGFW's EGL support for macOS is now a WIP
it seems super difficult to find bindings for EGL on every platform but Linux.
A few years ago I contributed to https://github.com/McNopper/EGL making it comply to EGL 1.5, works on Windows (impl with WGL), Linux (impl with X11) and behaves as a passthrough on platforms where EGL is present. Me and @devshgraphicsprogramming were running it on chromebook on ANGLE.
Maybe it will be of use for you as well @ColleagueRiley :) List of features is in contribution PR: https://github.com/McNopper/EGL/pull/13
edit: the passthrough wasnt pushed into original repo, it's on my fork: https://github.com/Crisspl/EGL/commit/227767f8dfcdb5e276e70591f8abdb7a587f766e Sorry, dont remember much apparently
From what I've seen special code has to be added to RGFW for it to comply with Angle. It's definitely something I would like to try but it's not a high priority considering it would be cooler if RSGL had native Vulkan, DirectX and metal support.
Thanks for sharing, I'll look into the repo later. I found EGL bindings in windows a while back on mesa's page I think. I believe a lot of people prefer to steal the EGL binary from Google chrome.