Hi.

I'm not a code expert so I may be talking dumb stuff here but I've seen quite much enthusiasm on the web for Apple's Metal API and how well it smoothed OS X so I was wondering, will it be possible to make use of that API in Vuo and are there any plans regarding that ?

Apple Metal API

Thanks

Comments

Metal lets you create

smokris's picture
Submitted by

Metal lets you create IOSurface-backed textures, so you could use those to efficiently send images between a Metal-based node or host app and Vuo's OpenGL (which already supports IOSurface-backed textures). So in theory it's already possible, though I haven't tried it yet.

However, Metal does not provide a way to efficiently transfer other GPU data (e.g., mesh vertex buffers) between Metal and OpenGL, so efficient interoperation is limited to only textures.

@smokris, thanks ! However, I

Bodysoulspirit's picture
Submitted by

Steve, thanks ! However, I should perhaps not have asked a question for which I cannot understand its answer ;) ;)

Ok. Anyway, I was just wondering as that last WWDC video showed pretty neat stuff about Metal. And as they released it for OS X too and made for games I thought it would have been about meshes and vertices too and could boost Vuo's performances even more.

But I should document myself a bit more about this to be able to discuss this more ;) I'm just making blur guesses here.

Thanks for answer.

Currently Metal is only

smokris's picture
Submitted by

Currently Metal is only available to a small percentage of Vuo's user base (it only runs on some of the hardware capable of running Mac OS 10.11, whereas Vuo supports Mac OS 10.7+), so if we add support for Metal, that would mean we'd also have to continue to support OpenGL for years. We can't currently afford that, especially since adding the Metal-based graphics pipeline won't help grow the Vuo community.

Apple hasn't publicly stated anything about deprecating OpenGL, but if Apple does officially deprecate OpenGL that would of course change this calculation.

Thanks @Steve, just what I

alexmitchellmus's picture
Submitted by

Thanks @Steve, just what I wanted to hear. There are already tools to convert GLSL shaders into Metal shaders: https://github.com/aras-p/glsl-optimizer

Metal shaders are coded in C++ as opposed to GLSL in C, (personally C is much easier for me to understand).

Obviously Apple will EOL OpenGL at some point, how do you envision Vuo handling multi-platform dealing with multiple graphics architectures?

FWIW, I notice that SceneKit

George_Toledo's picture
Submitted by

FWIW, I notice that SceneKit translates GLSL syntax into Metal before executing the shader, so a third party tool or code isn't necessarily needed to as a basis for it. This is noted in the SCNShadable Protocol reference.

Presumably it would be possible to make a special case node that used SceneKit to load shaders, which then wind up being converted to Metal.

It's not really up to Apple

George_Toledo's picture
Submitted by

It's not really up to Apple to end of line OpenGL, they don't control it, only whether or not they use it as a built in framework I guess.

Apple has a penchant for coming up with pet projects like Metal and then abandoning them (QC, cough cough), or them turning to crap while seemingly still maintaining (Core Image).... while things like OpenGL and GLSL keep ticking. With all of the surge of WebGL users, and OpenGL's close relationship with C, it's not going anywhere. Even if Apple didn't include it as a framework it could just be added.