Reputation: 41
I would want to port some OpenCL sample using Metal as compute API (as iOS doesn't support ES 3.1 compute shaders still) and OpenGL ES as graphics API, as sample uses OCL/OGL interop seems easiest way to port.. questions is a app can make use of Metal and OpenGL ES APIs simultaneously and if and how interop is achieved i.e. OpenGL mapping a buffer object of data compute by Metal.. thanks..
Upvotes: 4
Views: 1740
Reputation: 336
Yes, you can use openGL and Metal API simultaneously, but keep in mind, any intercommunication between two layers leads to overhead of host/gpu memory traffic: you have to copy textures and buffers between Metal/OpenGL representations. I think the best way to utilize gpu is use one of these technology stack. Moreover all what you can do with opengl shaders you can do with metal kernels. In general, as i can judge after year of practice with Metal, it is more comfortable and convenient API then OpenGL. Enjoy with Metal, join us:)
Upvotes: 2