openglonmetal / MGL

OpenGL 4.6 on Metal
Apache License 2.0
781 stars 30 forks source link

MGL as an EGL platform? #52

Closed i509VCB closed 2 years ago

i509VCB commented 2 years ago

This issue could probably be summarized as: why did MGL choose to write their own GL platform instead of adapting something else, such as EGL.

And then ramble how EGL could be implemented.

The rationale for providing an MGL platform for EGL would allow app developers to reuse their EGL toolkit support if Linux or EGL on Windows is already supported.

I believe the approach to take for EGL would be to write an extension to provide a new EGL platform and a way to create an EGLSurface from something like a CAMetalLayer.

I understand that EGL is no small task to implement. There are also issues like the bureaucracy if the idea goes beyond experimentation if an MGL EGL platform were to be added to the EGL registry.

darkaegisagain commented 2 years ago

MGL was written to expose OpenGL 4.6 functionality on top of Metal, I had no intention of supporting EGL as this was for the desktop and not an embedded device.

It was cleaner to ignore backwards compatible interfaces and just implement OGL 4.6 and above… typical OGL applications only use between 10-20 interface calls in a cyclic update manner so it would be better to to have all the function calls that are not implemented not even available for linking in my opinion.

I hope that helps.

Mike

On Aug 21, 2022, at 6:14 PM, i509VCB @.***> wrote:

This issue could probably be summarized as: why did MGL choose to write their own GL platform instead of adapting something else, such as EGL.

And then ramble how EGL could be implemented.

The rationale for providing an MGL platform for EGL would allow app developers to reuse their EGL toolkit support if Linux or EGL on Windows is already supported.

I believe the approach to take for EGL would be to write an extension to provide a new EGL platform and a way to create an EGLSurface from something like a CAMetalLayer.

I understand that EGL is no small task to implement. There are also issues like the bureaucracy if the idea goes beyond experimentation if an MGL EGL platform were to be added to the EGL registry.

— Reply to this email directly, view it on GitHub https://github.com/openglonmetal/MGL/issues/52, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACOKD3YYRCSDIPFIE7EYKTLV2LIANANCNFSM57F4A6GA. You are receiving this because you are subscribed to this thread.

i509VCB commented 2 years ago

Okay, thanks for the explanation.