kakashidinho / metalangle

MetalANGLE: OpenGL ES to Metal API translation layer
Other
460 stars 64 forks source link

Possible to combine MetalANGLE with GLKit? #65

Closed Berstanio closed 3 years ago

Berstanio commented 3 years ago

I wonder whether it is possible to use MetalANGLE to translate the gl calls to metal calls but still use the GLKit. As I understand the GLKit it is just used for providing a display layer which just fetches the data with gl calls (which also gets translated?) but I can be totally wrong. I tried it and it failed. But the reason it failed was strange. I tried to call gl::GetString with 0x1F02 (GL_VERSION) and it returned null but this shouldn't be affected by GLKit right? Does I have a misunderstanding here?

kakashidinho commented 3 years ago

No, you cannot use MetalANGLE with GLKit. All OpenGL calls need an active GL context to manage the states and resources. In GLKit cases, the context is provided by GLKit and MetalANGLE cannot use that context because it is Apple’s close source code. If you want to mix your view (UIView/NSView etc) with MetalANGLE you can certainly do it without GLKit.

Berstanio commented 3 years ago

Ahh okay thanks for clarification!