Hacker News new | past | comments | ask | show | jobs | submit login

What's the consensus on Metal? How does it compare to OpenGL?



You can’t compare them directly, they’re very different categories of graphics APIs. Metal belongs to the category of “modern low-level graphics API” (which also includes Vulkan and Direct3D 12), while OpenGL is an older higher-level graphics API (which also includes Direct3D 11 and previous).

The low-level graphics APIs like Metal and Vulkan allow for much better performance, but they are much harder to use and require more work from the developer (hence, they’re usually used only by game engine makers). Higher-level graphics APIs like OpenGL are less efficient and have lower peak performance, but are easier to use for individual projects and have the benefit of having existing functional code (no need to rewrite a working project).

Also, OpenGL (and its mobile and web variants OpenGL ES and WebGL) are very portable (macOS, Linux, Windows, iOS, Android, both and native and in browsers), while Metal is macOS/iOS-only.


To be fair - OpenGL was fairly horrible to use directly. It sat in an awkward middle area between "low level enough to be efficient" and "high level enough to be productive".

Maybe I'm biased - every time I looked at OpenGl code I shuddered and ran away to a higher level framework (I'm excluding shader code from this - that's concise enough for me not to mind getting that close to the metal)


So much this! I've been writing OpenGL code on a daily basis for the past 10 years, and I hate it. It works like an API designed in the 1970s. It uses none of the modern features of languages, easily allowing you to pass incorrect data to a function, and giving you almost no clue what, if anything, went wrong. Just look on StackOverflow some time at how many questions are basically, "My previously working OpenGL program is now rendering nothing but a black screen. What went wrong?" And then compare the huge number of different causes. There's no reason they couldn't have improved it along the way, keeping backwards compatibility, and just adding more informative error codes and better use of language features. But they didn't. My feeling is "Don't let the door hit you on the way out."


I don't think that is quite accurate. But you will have to ask a professional game developer for better judgement. Comparatively speaking.

Vulkan, you need to know exactly what you are doing. There are little to no handhelding. You are trying to squeeze out every last 10% of performance in exchange for lots more development time. You need to write a hell a lot more code to do something what you previously thought were simple.

OpenGL is higher level that should be compared to Direct3D 10, not 11. As a matter of fact I will go about saying compare to Direct 3D 9. And unless you are a OpenGL zealot, any sane game developers would have told you Direct X 9 already exceed OpenGL in most way.

Metal is offering what most of Vulkan can do and making it even easier then OpenGL.

Honestly I don't get / understand why all the backlash. OpenGL is deprecated, and it simply means Apple won't be updating OpenGL anymore. Stop asking every god damn year. They have been shipping other deprecated library and API for years! OpenGL is developed in such a way that no one really cares. And designed by committees for maximum backward compatibility. And if you want your App on iOS, you will have to use Metal anyway.


Thank you for explanation. I don't do any graphics programming, besides few toy projects with OpenGL, but my understanding was that one of it's benefits was portability (for a varying definition of "portability").

That's why I wasn't sure what Metal is offering instead.


Except they aren't portable at all for game consoles.


Most of the game devs I follow on Twitter expressed a positive opinion on Metal, particularly over Kronos' Vulkan and of course everyone(that actually has to develop with it) hates OpenGL.


To my understanding, the consensus is that it's, y'know, fine, but nothing particular to recommend it over Vulkan. The main problem people seem to have with it is that it feels unnecessary, like Apple being incompatible for the sake of being incompatible.


Didn't Apple try to work with Krohnos to make Vulkan, but they were taking so long, that Apple just gave up and made Metal and shipped it before Vulkan was finished?


Much better.

A 3D modern API that acknowledges the time of pure C APIs is long gone, with C++14 as shading/compute language, providing math, 3D models, materials, fonts, textures support.

Whereas in OpenGL you are stuck with fishing for libraries, multiple execution paths depending on the extensions and bugs, compiling and linking shaders at runtime without library support, C style APIs and a plethora of deprecated APIs.


Metal is a lower-level API, somewhat similar to Vulkan or Direct3D 12. OpenGL supports driver extensions that can be used to reduce overhead in a similar manner to Metal, but this is largely a moot point when it comes to OpenGL on macOS, as many such extensions are simply not available.




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: