metalangle icon indicating copy to clipboard operation
metalangle copied to clipboard

Would it be better to change MGLXXX to EGLXXX?

Open wxdut opened this issue 2 years ago • 1 comments

Hi, Le Hoang Quyen, thank you so much for developing MetalANGLE.

I'm a iOS developer. I wonder why not change EGLKit class name from MGLXXX to EGLXXX? That is, keep the class name exactly the same as the library class name. So we don't have to modify the existing code, just replace the standard GLKit framework with MetalANGLE.

Thank you again. Looking forward to your reply!!

wxdut avatar Jun 23 '22 11:06 wxdut

Do you mean why not using the same class prefix as Apple’s GLKit classes’ names? E.g EAGL?

well, it’s a bit complicated. Even if you don’t link against GLKit framework, Xcode still secretly link your app with it for unknown reasons, so it would cause naming conflicts.

Furthermore, the way a default framebuffer is created is not exactly the same between MGL and EAGL ones. Hence the former is not an exact drop-in replacement for the latter. Pls see https://github.com/kakashidinho/metalangle/blob/master/src/libANGLE/renderer/metal/DevSetup.md#porting-from-apples-eagl--glkit-to-mglkit

kakashidinho avatar Jun 27 '22 06:06 kakashidinho