grovesNL / glow

GL on Whatever: a set of bindings to run GL anywhere and avoid target-specific code
Apache License 2.0
1.2k stars 130 forks source link

Supported platforms #262

Open implicit-invocation opened 1 year ago

implicit-invocation commented 1 year ago

Can we use this for ios/android development?

grovesNL commented 1 year ago

This would work fine for Android. On new versions of iOS you need to use Metal. There are some emulators that run OpenGL/OpenGL ES on top of Metal but I don't think I'd recommend that if you can avoid it.

implicit-invocation commented 1 year ago

AFAIK, Apple deprecated OpenGL ES from ios12 but apps using OpenGL ES still build and run normally on even ios16-17.
Just wondering whether glow already has the binding for that target, or I have to add it myself.

For an OpenGL ES implementation on top of Metal, MetalAngle works pretty well but I understand your reason for avoiding it.

grovesNL commented 1 year ago

Sure, as long as you're ok relying on GL availability in iOS then you should be able to use glow there. Depending on the version you need, you could probably use the Metal backend that's been implemented recently in ANGLE itself (https://github.com/google/angle).

implicit-invocation commented 1 year ago

I can confirm that glow work on ios, I shamelessly copied some rust-objc and get_proc_addr calls from miniquad and render stuffs just fine.