News for hackers. Stuff that matters.
Re:Vulkan is coming to macOS and iOS, but no thanks to Apple by mathnode on Tuesday February 27, 2018 @05:10PM (#16478479)
I am always bitterly disappointed in HN's views and understanding of graphic API's. HN, what I largely assume is a community of programmers. Not Khronos idealists. The OpenGL dream died long ago. I think we can thank CAD and GPU vendors for that.

Yet here we are again. If Valve had to port software to Nintendo or Sony; they would be using the native, supported API's. Not porting over Vulkan or OpenGL.

Just use Metal. It really is, very good.

Re:Vulkan is coming to macOS and iOS, but no thanks to Apple by errantspark on Tuesday February 27, 2018 @05:20PM (#16478565)
Vulkan is also very good, and not vendor locked. Vulkan is the sole ray of hope that one day we may have a sane graphics stack that works properly across different platforms. If I'm reading the trend right I might even be able to get rid of my Windows partition during my lifetime.

It won't be because Apple decided to make it's own competing standard.

Re:Vulkan is coming to macOS and iOS, but no thanks to Apple by mathnode on Tuesday February 27, 2018 @05:28PM (#16478623)
It's not just Apple. This is what everyone forgets. It's Microsoft, Apple, Sony and Nintendo.

Every big vendor and platform for 3D games and software, has their own graphics API which work better and faster than OpenGL and Vulkan. It is only CAD still stuck on OpenGL (and the proprietary extensions).

Idealism is not the answer to positive end user experience.

Re:Vulkan is coming to macOS and iOS, but no thanks to Apple by kllrnohj on Tuesday February 27, 2018 @06:22PM (#16479100)
"Every big vendor and platform for 3D games and software, has their own graphics API which work better and faster than [..] Vulkan."

[citation needed]

Not that they have their own API, but that it's at all better or faster than Vulkan. Remember Vulkan primarily came from AMD's Mantle. It's not the creation of a committee catering to the lowest common denominator.

And no, it's not only CAD still stuck on OpenGL. Games use it, too. Most of mobile is also on OpenGL ES. Increasingly more of them use it than they used to, even, as increasingly games are using off-the-shelf engines that are already cross-platform and have an OpenGL back-end.

The single largest consumer OS in the world (Android) only supports OpenGL ES & Vulkan, even, with no proprietary graphics API of any kind.

Re:Vulkan is coming to macOS and iOS, but no thanks to Apple by LeoNatan25 on Tuesday February 27, 2018 @07:15PM (#16479478)
Actually, most iOS games in recent years have been using Metal, as are most “off the shelf” engines internally.
Re:Vulkan is coming to macOS and iOS, but no thanks to Apple by drawkbox on Tuesday February 27, 2018 @08:02PM (#16479781)
> Actually, most iOS games in recent years have been using Metal, as are most “off the shelf” engines internally.

Largely due to support in Unity/Unreal. They would be using OpenGL ES still if they had their own engines except maybe the biggest game studios that always have custom game engines/rendering integration.

Re:Vulkan is coming to macOS and iOS, but no thanks to Apple by kllrnohj on Tuesday February 27, 2018 @07:23PM (#16479514)
iOS is not the largest mobile OS, so 100% of iOS could be doing something and it still wouldn't be "most of mobile" ;)
Re:Vulkan is coming to macOS and iOS, but no thanks to Apple by AlphaSite on Tuesday February 27, 2018 @07:55PM (#16479742)
Most mobile users who matter (revenue).
Re:Vulkan is coming to macOS and iOS, but no thanks to Apple by kllrnohj on Tuesday February 27, 2018 @08:20PM (#16479860)
Revenue per graphics API would be fascinating, albeit very different, investigation. It would likely also put OpenGL on desktop in a very different light given the professional products still using it.
Re:Vulkan is coming to macOS and iOS, but no thanks to Apple by dingo_bat on Wednesday February 28, 2018 @02:34AM (#16481373)
iOS is definitely the most used mobile OS.
Re:Vulkan is coming to macOS and iOS, but no thanks to Apple by Intermernet on Wednesday February 28, 2018 @03:52AM (#16481656)
Do you have a link for that stat? Last time I looked android was quite a way in front in global market share[1] . Happy to be proven wrong.

[1]: https://www.idc.com/promo/smartphone-market-share/os

Re:Vulkan is coming to macOS and iOS, but no thanks to Apple by dingo_bat on Wednesday February 28, 2018 @05:16AM (#16482020)
I don't consider "Android" to be an OS. It is like Linux, there are a hundred different OSes all running on top of the same kernel and framework. For example, the OS Samsung runs on their phones is so different from the OS Xiaomi runs on theirs that a casual user might think it's a completely different system.

So lumping together all of these variants and calling them "most used OS" is not useful in any sense. They are very different for users, and very different for devs.

This is specially relevant when you want to develop a game against a graphics API. Samsung has Vulkan on their flagships for a couple years now, but not the mid/low-end devices. Pixel supports Vulkan, but the units sold are so low that they are a rounding error. No other major manufacturer significantly supports Vulkan either. In this and similar scenarios, the framework used by ios may well be the "most used" mobile framework.

Re:Vulkan is coming to macOS and iOS, but no thanks to Apple by Intermernet on Wednesday February 28, 2018 @06:13AM (#16482193)
> I don't consider "Android" to be an OS.

Then you're correct by your definition, but not by most people's definition.

Re:Vulkan is coming to macOS and iOS, but no thanks to Apple by pjmlp on Wednesday February 28, 2018 @01:00AM (#16481022)
Vulkan support on Android is basically constrained to a few Nougat and Oreo devices.

And even then, it is only required on those that support VR.

Metal is supported on across all iOS devices still getting updates.

Re:Vulkan is coming to macOS and iOS, but no thanks to Apple by kllrnohj on Wednesday February 28, 2018 @01:10PM (#16485172)
Android only requires GLES 2 yet 63.6% of devices support GLES 3+ anyway.

Since nearly everyone's GLES 3 hardware both supports vulkan & has vulkan drivers already there's no particular reason to believe that an OEM will decide to just not ship vulkan support. It's more work for them to remove Vulkan from the SoC's base image than it is to just not touch it.

The low-end GLES 2 hardware is the only problem, which is a market iOS simply doesn't exist in at all. So if you're cool with ignoring that market, go for it.

Re:Vulkan is coming to macOS and iOS, but no thanks to Apple by pjmlp on Friday March 02, 2018 @04:48AM (#16500245)
Well Godot engine developers don't have good experience regarding GLES 3 support, at all.

https://godotengine.org/article/abandoning-gles3-vulkan-and-...

Lets see if they have better luck with Vulkan.

Re:Vulkan is coming to macOS and iOS, but no thanks to Apple by errantspark on Tuesday February 27, 2018 @05:44PM (#16478757)
I don't think that's necessarily true anymore. Vulkan and even OpenGL have shown a lot of promise recently, in real world tests. You may be right that it's simple idealism from my end but I (want to) believe that Vulkan is coming along at the right time/space to gain broad support in the industry. I'm no fan of DX12 either, or NVN or whatever it is that Sony has. The low level nature of MoltenVK and likely the future DX12 <-> Vulkan layer will result in a small enough perf hit that it will make sense for developers to target Vulkan instead of 3 different APIs. Perhaps similar libraries will become available for Sony and Nintendo platforms as well. I hope that the trend will continue and one day I won't have to resort to OpenGl ES in order to write something that's truly cross platform.
Re:Vulkan is coming to macOS and iOS, but no thanks to Apple by drawkbox on Tuesday February 27, 2018 @08:24PM (#16479879)
> Every big vendor and platform for 3D games and software, has their own graphics API which work better and faster than OpenGL and Vulkan.

True but console is a different beast though, it seems you are focused on that not just mobile which was always just OpenGL ES mainly since '07 until Metal entered the arena.

On consoles/custom handhelds, they have always had their own frameworks to get the most out of their custom hardware and for lock-in exclusives, to compete and advance their hardware as far as possible for the console lifeline, to sell as many games as possible as the hardware ages as game content is where they made profit. Consoles have modified versions of frameworks or their own like gcm from Sony. They do support standard ones but mostly people use the custom ones to get the most out of the hardware and the hardware makers like that.

On desktop, only two essentially in DirectX and OpenGL and was that way for a long time. Portability was fine, DX windows, OpenGL everything else but DX was the major one due to Windows desktop dominance.

On mobile, OpenGL ES on the major mobile platforms, iOS and Android, pretty much the only one since '07 until Metal.

As I mentioned in other areas, not a huge deal to game developers who aren't building their own engine but portability does matter on desktop and mobile, not just consoles which have reasons for custom rendering engines/toolkits.

Re:Vulkan is coming to macOS and iOS, but no thanks to Apple by zem on Tuesday February 27, 2018 @05:41PM (#16478736)
and proprietary apis are not the answer to positive developer experience. time will show whether insisting on your own world-incompatible graphics apis will lead to developers writing custom apps for your platform, or whether they will use whatever lets them release on many platforms at once.
Re:Vulkan is coming to macOS and iOS, but no thanks to Apple by pjmlp on Tuesday February 27, 2018 @06:03PM (#16478923)
Professional game developers have been choosing proprietary APIs since ever.

They were the ones telling Sony that their efforts for having OpenGL ES 1.0 on the PS3 were not worthwhile pursuing.

OpenGL ES on the PS3 was barely used beyond prototypes and simple demos.

Re:Vulkan is coming to macOS and iOS, but no thanks to Apple by Impossible on Tuesday February 27, 2018 @06:26PM (#16479131)
Indie titles shipped using OpenGL ES on PS3 and indies got Sony to eventually release an OpenGL wrapper for PS4 as well. If you want decent portability and all your game does is draw alpha blended sprites with simple shaders it could be a win. Questionable how much better that is than either making your game with a portable engine like most indies are doing, or using gnm directly.
Re:Vulkan is coming to macOS and iOS, but no thanks to Apple by zem on Tuesday February 27, 2018 @07:46PM (#16479679)
mobile dev seems a lot more (for want of a better word) grassroots than professional game dev. lower barrier to entry, and a larger set of people who have a good idea they feel they can implement. also phones will probably bring up a lot of uses for a good high-performance graphics api that are not game-related, as people think of more and more things they would like to do with the computer in their pockets.
Re:Vulkan is coming to macOS and iOS, but no thanks to Apple by johncolanduoni on Tuesday February 27, 2018 @11:20PM (#16480645)
Vulkan also requires a huge amount of code to do relatively simple things, and is much easier to invoke UB with. It was always intended first and foremost for engine developers. Metal is far more appropriate for games that use their own graphics code but aren’t doing anything too special or have time for painstaking optimization.

Using Vulkan is like writing your own language runtime over system calls: you have to handle memory allocation and synchronization on your own.

Re:Vulkan is coming to macOS and iOS, but no thanks to Apple by mellinoe on Wednesday February 28, 2018 @02:41AM (#16481398)
> > Vulkan also requires a huge amount of code to do relatively simple things

IMO, this is a common misconception. Or, at least, the extrapolation of it is. Vulkan might require a lot of code to initialize, and has extra responsibilities related to memory management, synchronization, etc., but in my experience the end product doesn't require significantly more code than other graphics APIs. The up-front cost you pay doesn't translate to increased costs everywhere else, at least not to the same degree.

My library supports D3D11, Metal, Vulkan, and OpenGL, and Vulkan is the second-largest backend, but not by a lot (LOC: ~5k Vulkan, ~3.3k D3D11, ~2.5k Metal, 6k OpenGL). LOC is not the best indicator of complexity, to be fair. My OpenGL backend is definitely the most difficult to maintain and the largest, because the API is such a pain to deal with.

Re:Vulkan is coming to macOS and iOS, but no thanks to Apple by pjmlp on Tuesday February 27, 2018 @06:00PM (#16478898)
As someone with former experience at IGDA and that dwelled in a few GDCE's, I think many at HN just don't get one bit as professional game studios work and how different the game developer's culture is from FOSS.

This is the world that was born from demoscene, where exploiting cool hardware specific tricks was more valuable than writing portable code.

Re:Vulkan is coming to macOS and iOS, but no thanks to Apple by jheriko on Tuesday February 27, 2018 @07:51PM (#16479715)
Or how far FOSS is for the rest of the world tbh ... so many 1960s practices in foss world it makes me sad :(
Re:Vulkan is coming to macOS and iOS, but no thanks to Apple by emh68 on Tuesday February 27, 2018 @05:24PM (#16478584)
What do you mean by “the OpenGL dream died”? It seems to me that we were slowly moving toward a unified API across all operating systems, then Apple did what they always do and invented their own closed API.
Re:Vulkan is coming to macOS and iOS, but no thanks to Apple by bronxbomber92 on Tuesday February 27, 2018 @07:05PM (#16479411)
Vulkan, as a Khronos open standard, likely wouldn't exist if Apple didn't make Metal. Khronos was content for OpenGL{ES} to sputter ad infinitum until it realized that its largest platform (iOS/macOS) was moving on. It helped that the rest of the industry (MS, AMD) was also moving in the same direction, but it was the release of Metal that broke the camel's back.

There were several efforts in the past to revamp OpenGL (e.g. long's peak), but they all failed. OpenGL was stuck and there was little reason to think the situation would improve. Writing OpenGL code that worked across multiple platforms was worse than it is today to write multiple per-graphics-API render backends.

Re:Vulkan is coming to macOS and iOS, but no thanks to Apple by kllrnohj on Wednesday February 28, 2018 @01:39PM (#16485449)
If anything the current crop of new graphics APIs (Metal, Vulkan, and DX12) all owes their start to AMD's Mantle project. Metal certainly didn't get the ball rolling, although it almost certainly accelerated Khronos's path to standardization & shipping (which is why Vulkan adopted Mantle as the base, to ship quicker). AMD gets that claim.

OpenGL was not stuck, either. OpenGL's AZDO project was alive & well: https://www.khronos.org/assets/uploads/developers/library/20... (just not on macOS because AZDO is GL4.2+ whereas macOS is stuck on 4.1)

Re:Vulkan is coming to macOS and iOS, but no thanks to Apple by mathnode on Tuesday February 27, 2018 @05:30PM (#16478638)
Apple, Nintendo, Microsoft, and Sony have great API's that are not opengl or vulkan.

I am not saying opengl or vulkan is bad.

Re:Vulkan is coming to macOS and iOS, but no thanks to Apple by emh68 on Tuesday February 27, 2018 @05:33PM (#16478672)
Apple doesn’t count, they just recently moved to Metal from standard OpenGL. Do consoles use something custom? Not OpenGL?
Re:Vulkan is coming to macOS and iOS, but no thanks to Apple by mathnode on Tuesday February 27, 2018 @05:36PM (#16478700)
Apple doesn't count? did you RTFA? It's all about apple and proprietary graphics API's.

Apple Metal launched in 2014.

Sony and Nintendo and NEVER used OpenGL for anything extensive. Sony talked the talk around 2005 and 2006 with the launch of the PS3 and OpenGL ES but PSGL was always more performant.

Re:Vulkan is coming to macOS and iOS, but no thanks to Apple by karyon on Tuesday February 27, 2018 @05:43PM (#16478745)
The Nintendo Switch supports OpenGL 4.5, OpenGL ES, and Vulkan: https://wccftech.com/nintendo-switch-supports-vulkan/
Re:Vulkan is coming to macOS and iOS, but no thanks to Apple by pjmlp on Tuesday February 27, 2018 @06:05PM (#16478948)
Switch supports Vulkan and their own low level API, NVN.

Source https://developer.nintendo.com/

Just like Sony did in the past with the PS 3 and GL ES 1.0, they are just testing waters to see which way devs go.

In the PS3 devs preferred to pick Sony's API instead.

Re:Vulkan is coming to macOS and iOS, but no thanks to Apple by mathnode on Tuesday February 27, 2018 @05:51PM (#16478811)
That's just dandy. Show me software that uses it. This is 2005 all over again. You make that deal. You talk to that support. You prove me wrong, please do! The better support, debuggers, and feature requests will come from the native API.

PLEASE prove me wrong.

Re:Vulkan is coming to macOS and iOS, but no thanks to Apple by jheriko on Tuesday February 27, 2018 @07:56PM (#16479747)
After months of devkits with the real api ...
Re:Vulkan is coming to macOS and iOS, but no thanks to Apple by emh68 on Tuesday February 27, 2018 @08:23PM (#16479873)
I did RTFA, but you were saying the OpenGL dream has been dead for a long time, which I took to mean pre-2014 ;)

Uou have convinced me that Metal might not be so bad... at least is all the consoles have custom APIs then it’s not as unusual as I thought.

Re:Vulkan is coming to macOS and iOS, but no thanks to Apple by jheriko on Tuesday February 27, 2018 @07:55PM (#16479744)
You mean gcm? PSGL is the ps3 OpenGL implementation afaik
Re:Vulkan is coming to macOS and iOS, but no thanks to Apple by jheriko on Tuesday February 27, 2018 @07:55PM (#16479739)
Consoles don’t use OpenGL.... even when they say they support it ;)
Re:Vulkan is coming to macOS and iOS, but no thanks to Apple by jheriko on Tuesday February 27, 2018 @07:53PM (#16479728)
Yeah it might look this way if you never used graphics APIs... truth is it has never been possible to write code against OpenGL for all platforms without extra platform specifics ... it’s also never been anything but trivial to wrap graphics so that the backend is switchable. Metal, mantle, Vulcan, dx12 have done nothing to change that
Re:Vulkan is coming to macOS and iOS, but no thanks to Apple by slavik81 on Wednesday February 28, 2018 @01:46AM (#16481176)
There are enormous hoops to jump through to release a game on a console. Each console has its own list of certification requirements. Even ignoring the graphics API, it takes significant platform-specific development effort to port a new game engine from Playstation to Xbox.

On the other hand, when I develop OpenGL programs on Linux, it takes maybe a few hours to fix up the few compile errors I might encounter on OSX. Swapping out the graphics API would dwarf all the other porting work combined.

Seriously, all I want is to be able to write graphics programs using compute shaders and share them among my colleagues who use OSX, Linux and Windows. I don't want to write my programs three times. Is that really too much to ask?

Re:Vulkan is coming to macOS and iOS, but no thanks to Apple by erikj on Tuesday February 27, 2018 @06:23PM (#16479108)
Nintendo and Sony are a tiny insignificant speck of the market compared to all the OpenGL ES compatible devices available. I guess every smartphone vendor not called Apple is ran by Khronos idealists. Besides, the latest Nintendo device officially supports Vulkan.
Re:Vulkan is coming to macOS and iOS, but no thanks to Apple by drawkbox on Tuesday February 27, 2018 @07:29PM (#16479561)
Metal is great, so is Vulkan, so is OpenGL ES on mobile, but it does complicate a bit with portability where OpenGL wasn't as big of deal to port to many platforms, especially on mobile. Mobile has largely been an OpenGL ES only platform except now with Metal entering the game. When speaking of portability on mobile, it was all OpenGL ES versions. Yes consoles have always had their own frameworks to get the most out of their custom hardware and for lock-in exclusives to compete and advance their hardware as far as possible for the console lifeline, to sell as many games as possible as the hardware ages as game content is where they made profit.

The bummer about Apple is that they did help fund Khronos/OpenGL ES and subsequently WebGL from that stack that really revolutionized mobile/handheld gaming. They were big in helping open tech like that as well as canvas, html5, svg etc when the iPhone first came out. They killed Flash essentially and brought H.264 to take a big part of what Flash did, video. Part of how they won was using OpenGL ES and a decent rendering hardware device, it was an amazing thing to see in 2007 and changed handheld gaming big time.

Now Apple has Metal, their own rendering kit, that only works for macOS/iOS where OpenGL was easier to then port to iOS, Android, *nix, even use on Windows etc for desktop/mobile games especially. Apple used open rendering to allow easier porting to their platform, now they have flipped and have taken on a big part of rendering on their devices, a big software part that they hopefully will keep well maintained and up to compete.

But really today there are so many great engines that are middle tier in Unity and Unreal for instance that low level rendering frameworks aren't as big of deal to integrate as it is handled by these middle layer engines. Metal being so prevalent on iOS is only because Unity and Unreal support exporting with that as those two engines make up the largest part of mobile games.

There are four major rendering frameworks now with OpenGL, DirectX, Vulkan and Metal, including others like libGCM and flavors of OpenGL like ES/WebGL. This does complicate things for game engine developers, maintenance and portability with four market standards now. On mobile there are now a few instead of just OpenGL ES versions the dominant one since handheld gaming was taken over by Apple iOS/Google Android. Console game development is a different beast than mobile and desktop in terms of rendering frameworks used for many reasons, mainly that the hardware has to age longer and you need to get every bit of performance.

Most game studios now let the middle tier companies like Unity/Unreal/Cry/Source be their engine team now so it isn't as impactful, so studios can focus on game development, design and content. Back when you did have to write your own engine and rendering layer, it was nice to only have two essentially in DirectX and OpenGL on desktop, and OpenGL ES on the major mobile platforms, console development being the area where there are many frameworks and custom ones per hardware device. The slow progress before mobile and new frameworks was frustrating at times but primarily due to hardware progression, currently it is good to advance and get rendering kits competitive again.

Re:Vulkan is coming to macOS and iOS, but no thanks to Apple by Ethcad on Tuesday February 27, 2018 @09:12PM (#16480113)
Agreed. It’s awesome that you can write a game once with Unity and not only have it run on all platforms, but have it run with the native, optimized rendering framework.