macOS is deprecating openGL


(cekuhnen) #179

I am curious about the future of WebGL - is this connected to openGL or different?

(SreckoMicic) #180

@cekuhen Is he building multi platform app? Can you give us link?

About Vulcan and OpenGl, yes Vulcan can replace OpenGL but that is much much more work on developer side compared to OpenGL. Main purpose of Vulcan was to replace OpenGl where it fails shorts. It is not something that will give better performances in every single case, as a matter a fact there are many graphic apps (most are 3d) that do not need this level of optimization at all.

Also OpenGL in not outdated, it still do wonders, just look at Evee. It is based on modern OpenGL. That is typical Apple marketing BS. As a matter a fact OpenGl was deprecated on Windows platform decades ago (I think it was on versions 1.1), but thing is that MS let vendors developing it, which should be best thing to do on OSX, but knowing Apple …

So for multi-platform dev, I guess most of apps will eventually move to Vulcan but it will be very long process. About metal, this will work similar as DX I think. Will work mostly for games and OSX specific apps, I do not think anyone will spent resources maintaining app for OSX, especially it being such small market. Just look 3dsMax, there is reason why it will never be ported to OSX and Linux.

(Chad Gleason) #181

I’m hopeful that once Apple completely ports it’s OS off of OpenGL reliance and onto Metal (Mojave might have already done this?) then Apple might allow vendors to carry the OpenGL torch themselves. As was mentioned earlier in this thread, it happened for Java and it’s happening for CUDA. So it is possible.

That being said, this is Apple. They’ve decided that everyone needs to make Metal apps so they are going to force the issue and not give anyone any other option.

(Dimitris Chloupis) #182

Like OpenGL ES it follow the OpenGL API very closely. As implementation they are independent units , I think WebGL depends on OpenGL but then nothing stoping them from implementing it on of Vulkan or something else.

WebGL future does not look very bright, a recent development has been webassembly which allows to use C++ plugins inside websites which opens a whole universe of options for the browsers including direct integration with libraries like Vulkan. There are some restrictions of course to what webassembly can access as it applies to Javascript as well so probably wont offer the exact same performance but WebVulkan is a matter of time if it has not already happened.

That is definetly the intention of Khronos

we will have to wait and see what we will see. But if that becomes a reality , Blender may be even able to run at least in some limited form inside web browsers.

Problem with your statement is that only 10% of graphic orientated apps , mostly because of games, use Metal. OpenGL must be around 1% if we take into account both MacOS and iOS. So if the mission of Apple is to rush Metal down the throats of develpers , they do a terrible job. If you want the rest 90% uses some form of graphics or game engine. 20-30% probably use Unity.

(apoclypse) #183

Apple has been pushing WebGPU instead of WebGL and they have been gaining some traction from Google and Mozilla. WebGPU is supposed to be the successor to WebGL and it’s pretty much the Metal API in a browser, WebMetal if you will.

So Apple has laid some groundwork to get developers on board on other platforms. I’m sure WebGPU will change (it has to, to support DX12 and Vulkan as backbends in the future) but as of right now WebGPU is metal. Once developers start using that they may start to realize that Vulkan requires a lot of developer overhead (at least initially) for very little benefit compared to Metal.

(SreckoMicic) #184

That dilemma is if you decide to develop only for OSX. I think this made unique momentum for Linux to grab even more market share.

(Dimitris Chloupis) #185

The problem is that the main usage of the web nowdays, is facebook, twitter, email , forums like reddit and other stuff. What all of them have in come is their really low demands for GPU and CPU specs.

The idea was that people would be rushing to the cloud because you no longer need to install anything or even posses a powerful computer. I never bought the idea because a) I never actually heard of anyone complaining about installations other than people pushing for the cloud b) We already had app stores that streamlined the process c) Cheap computer were already very powerful.

I think that web is great for what it is, but dekstop reigns supreme and proof to that is that both iOS and Android are desktop OS. Especially iOS a port of MacOS. Android is a bit more heavily customised. Ironically people still believe that is MacOS copying iOS and not the other way around :smiley: when even the app development of iOS happens on MacOS.

So I am not a big believer of web for heavy application and games. Especially the web game market has been a disaster, 1% and slowly shrinking to 0.1%, which is look good when game market is expanding rapidly in general. So 3d wise, the future , openGL or Vulkan or MetalGPU or whatever, does not look very promising.

Plus many desktop apps come with embed browsers nowdays and even mobile apps.

PS: Fun fact my folder containing Blender source code, third party libraries and 3 builds I made is a total of 22 GBs !!! Most of it of course is backups of previous versions of the code and binaries.

(John Forde) #186

I don’t see what the problem is here. Just port mac OpenGL and OpenCL code to Metal and the problem is solved. It is a relatively easy port. Unity and Unreal Engine have already done this. Why the complaining.

(m9105826) #187

No port is ever an “easy port” where graphics are concerned. Pointing to Unreal and Unity as examples of it being easy is like someone who drives a Ferrari wondering why a Ford Pinto can’t do 0-60 in under 6 seconds. Both organizations have more money and manpower to throw into projects than the Blender Foundation will ever dream of having.

(SreckoMicic) #188

It is far far from being easy.

(apoclypse) #189

But it’s not impossibly hard. Certainly easier than working with Vulkan or at least less overheard in-terms of developer grunt work. Metal is a bit higher level than Vulkan and is quite elegant to boot. The issue isn’t whether it’s hard or not, it’s whether the work is worth the effort for just one platform.

Now I personally think that Blender should be exploring some form of abstraction layer since OpenGL may not be around forever. If they are going to be moving to Vulkan anyway and are already doing all the work why not take the time make sure this part of Blender is more futureproof. But again is it worth the effort if every other platform supports Vulkan and there is an abstraction layer for Macs too.

(SreckoMicic) #190

Sure, I do agree. But also it is not about porting stuff and it will work out forever. There is one more important aspect, maintaining all of that. That sometimes cost even more. Thing is that being cross platform is more important than being easy to develop on, especially for projects like Blender. Maybe if Apple chips some $ to Blender dev to port Blender to Metal and maintain it? :smiley:

(John Forde) #191

It’s definitely worth supporting for one platform considering the Mac represents 13% of desktops, and the fact that Blender Foundation support Linux, which is under 2%.

Agree with the abstraction layer idea. Game engines have long had this since they have supported more efficient graphics drivers like DirecrtX (which is equivalent to Metal on the PC) for years.

(BeerBaron) #192

That’s not at all how WebAssembly works. WebAssembly is just an IR/bytecode-like format that’s more efficient that Javascript, but it can’t access any API that isn’t already a Web API.

You can compile C/C++ code to it and there are headers that expose WebGL as if it was OpenGL ES. There’s no way to directly use any other 3D API with.

Apple wants to push WebGPU, but the other vendors haven’t agreed on that yet. Even then, it takes forever to adopt a web standard and they’re meant to stay. WebGL will be the graphics API for the web, for the time being.

Having said that, WebGL indeed does not depend on an underlying OpenGL driver, at least on Windows it usually runs on top of Direct3D.

(Ace Dragon) #193

The gamesfromscratch guy did an article regarding MoltenVK, being able to use it to continue having Blender on the Mac. will be worthless if Apple bans its use.

In short, a game developer made use of it to make a game for iOS and got rejected for “non-public API usage”. There is a chance that Apple will not allow anything built on top of or wrapped around Metal at all (and there’s still the question on whether Metal itself will even be compatible with FOSS).

(Chad Gleason) #194

Here’s a link to the moltenVK github page going over this issue.

It appears to be a legitimate issue that the moltenVK team should be able to solve. If it’s anything worse than that, we’ll likely find out about it on that page.

(BeerBaron) #195

From what the developer said, Apple is in the right here, they did use some private API (accidentally and unnecessarily) on at least one occasion, possibly more.

It wouldn’t make sense for Apple to disallow software not written directly against Metal, it’s very common for games to use HLSL (Direct3D shader language) and translate into GLSL (or MSL) for cross-platform support.

(Dimitris Chloupis) #196

That’s not the real problem though.

If Valve’s graphs is a good representation of MotlenVK that means its 30% faster than OpenGL. This is extremely bad news for MoltenVK when Molten is reported to have speed ups of up to 1000(version 1)-2000%(version) , almost 100 times the performance boost of MoltenVK. Even if those numbers are inflated or deflated in real case scenarios the bottom line is that even a 50% performance difference is enough to make Metal the only viable option.

Unfortunately I was not able to find benchmarks comparing the two to a large extend so all this is speculation at best. In the end , no , MoltenVK is definitely a bad option for Blender on Mac. I seriously doubt they will go down the MoltenVK path unless in the mean time it has speed up significantly which I seriously doubt or they cannot find the developer manpower to do the transition.

So for now at least Metal seems the only good option, after all performance was the very reason Apple kicked out OpenGL. Which was also the reason they kicked out Flash.

(BeerBaron) #197

Nobody ever gets that speedup in the real world, because to get it, you have to write code that doesn’t make sense in OpenGL and compare it to Vulkan/Metal/D3D12 code that takes advantage of lower driver overhead (i.e. using far more draw calls).

Driver overhead is all about CPU performance, not GPU performance. Sure, maybe a less crappy compiler on one API over another gives a GPU speedup, or maybe not.

(apoclypse) #198

I don’t think this makes sense. Even a 30% speedup is better than what we have now. It’s going to be a net positive for users who are using OpenGL. It would be better go with metal overall for sure, but if that’s not viable then a 30% speedup versus 50% or whatever is not a bad tradeoff imo. Unless I don’t understand what you wrote.