OpenGL Deprecation -> What it means for the future of Cocos2d-x

Can I see this progress online? For example, on github branch?

Not at this time but in the future yes.

Thanks. Is hard work on this casue inactivity on github repo?

Cā€™mon you guys, donā€™t freak out. Hereā€™s a possible timeline imho:

  1. Estimate and first analysis: 2wk
  2. Download, install, check, and test possible solutions: 1m
  3. Choosing one, i.e. first working prototype: 2wk
  4. Ironing the prototype, all the way: 2w
  5. Confirming proto and first alpha, first couple of shaders: 2w
  6. Alpha ongoing, first beta, more shaders: 1m
  7. Working solution and on, first release: 1m
  8. Testing, testing, testing: ad libitum, 2m

I think this estimate is, well, far and large. Of course Iā€™m not a Cocos employee :wink:, so I cannot tell for sure. But with a 6-7 month range I bet everything will be ready before next Ios release.
And if you want someone to blame, well, blame Apple.

(p.s. @slackmoehrle hope you donā€™t mind if I messed it upā€¦)

1 Like

It is a big project for us and the engineers working on it have been asked to focus entirely and way more than a 5 day week. They are working almost 7 days.

I donā€™t know the exact timeframes they are spending on each step but I do know they are taking an approach similar to what you laid out.

We wonā€™t stop the ball here. We know how important it is to you guys. We know that for many of you a failure here means loss of income.

Patience is a virtue.

Who said days ? Iā€™ve already measuring months and 1 month already passed yesterday. Iā€™ll see what news the developers will bring in another month.

@Deprecated I think @slackmoehrle meant the developers are working 7 days a week on this. Correct?

Indeed. We have a winner.

1 Like

I am still learning metal/vulkan API. I found some differences between metal and vulkan. So i am not sure if i should consider vulkan supporting now. If i design the API based on metal, then i will take less work, if i have to consider vulkan supporting in future, then it may take more time.

I will design the API first, then will put it in the forum for discussion. After that, i will starting coding. I may provide the API design in about 2-3 weeks. The API may not complete, but it will include most important ideas.

4 Likes

After having checked proposed solutions, I definitely would consider a Metal-only api. Itā€™s easier, itā€™s a straight solution to the problem, itā€™s directly manageable, itā€™s based on Apple standard. And it probably covers 100% of cocos use cases.
Vulkan has never meant to be an opengl replacement. Itā€™s for 15% top level gaming use cases not covered by opengl, basicly AAA 3d gamesā€¦
And afaik is a lot convolutedā€¦ no good win in going to Metal thru Vulkan imhoā€¦

1 Like

Great, thanks for the info @zhangxm

Oh, look at this: https://youtu.be/Mot6pEVeoJ0

Thanks for the update!

Yep, you are right. Metal API is more easier and is straight forward. And i like its API too.

2 Likes

Another thing, this is the proposal WebGPU API from apple, it is almost the same as metal API :slight_smile:

I think people have the wrong Idea about this deprecation thing and so Iā€™m just going to throw my 2 cents in here for all the people who are upset that Metal isnā€™t in cocos2d-x yet and why the cocos team isnā€™t, and shouldnā€™t be breaking their backs and working 100 hour weeks to get this in for iOS 12.

When they say ā€œdeprecatedā€, this just means they will no longer add features or update it . THIS DOES NOT MEAN IT WILL NO WORK, NOR DOES THIS MEAN YOUR GAMES WILL PREFORM WORSE. All this means that version of OpenGL ES in iOS 12 will be the last.

Apple clearly has stated that all OpenGL apps will still run on iOS 12, and itā€™s not like they will force those apps to perform worse than what OpenGL ES would have been able to do if it wasnā€™t deprecated.

https://developer.apple.com/ios/whats-new/

Apps built using OpenGL ES will continue to run in iOS 12, but Open GL ES is deprecated in iOS 12. Games and graphics-intensive apps that previously used OpenGL ES should now adopt Metal

OpenGL ES will likely be removed from iOS 14 (my estimation), since most software large software companies wait at least 2 years to removed deprecated code from their code base. SO WE HAVE AT LEAST 2 YEARS.

So please, lets cut the cocos team some slack. Itā€™s not mission critical so let them really learn metal so they can implement correctly.

The last thing we want is to broken implementation and people making threads called ā€œMETAL Broken in Cocos2d-xā€ with people complaints about how cocos2d-x is bad and why they are moving to some other engineā€¦

And for the who are egging for Metal because they think its going to increase the performance of their game by 10000x, The only time Metal will have a significant advantage over Open GL will be with things like AR, VR and More 3D features are added to cocos2d-x. It may also be better on the iOS Simulator as well since Macos Mojave will likely use a passthrou since thatā€™s built on Metal. Cocos2d-x is still primarily a 2D game engine, so that performance gains their may not be what you expect.

4 Likes

Funny how you jump from an estimation to a fact.
No, we donā€™t know how much time we have. It could be just 1 year. And take into account the time it takes to adopt a new version of cocos, test it, release new version(s) of your app(s), and wait for users to have your app(s) updated by the time OpenGL ES support is removed so you donā€™t lose active users.
Nevertheless, I agree with you, no reason to panic yet.

If you really think about it, Itā€™s a good estimate and Iā€™m not just guessing lol.

Having worked for a large company like this with massive influence (Google), Iā€™ve seen the process. I donā€™t think Apple is that far off. Think about it like this.

Apple creates a new version of iOS every year. If they took Open GL out in iOS 13, That would mean millions of games would no longer work. Thatā€™s to short of a time period for Apple to decide to remove something that low-level in term of the iOS stack and how much it used. It affects much more than just games as well. For instance, Snapchat uses Open GL for their filters and I can only imagine how long it might take to update that.

On top of that, All good software companies explicitly tell when they will remove a feature completely.
Unless Apple is being super aggressive (Which they can be), I donā€™t think they would do something that irresponsible and mistake deprecation for removal.

Also, in the session at WWDC where they were talking about why they deprecated it, Dan Omachi (Metal Ecosystem Engineer) At Apple said:

Now this is particularly important this year because as announced in yesterdayā€™s state of the union OpenGL, openGL ES and OpenCL are deprecated. Now existing and soon-to-be launched apps can still use OpenGL ES on tvOS and iOS12 and OpenGL and OpenCL on macOS 10.14 Mojave and this will remain so for some time. However, new projects should target Metal from their inception. So if youā€™re not already familiar with Metal, then itā€™s time to get started. Before you rip out all of your OpenGL code and start porting it all to Metal youā€™ve got a few options to consider.

https://developer.apple.com/videos/play/wwdc2018/604/

ā€œSome timeā€ is not going to just be one year.

I mainly wrote the post for people who are trying to aggressively wanting this as if Apple is going to remove it tomorrow.

2 Likes

Well, if I were to guess, I would say that Apple will stop approving OpenGL ES based apps as soon as iOS 13 is released. Anyways, I think it wouldnā€™t be wise to base the timeframe for this issue on a guess, no matter how right it seems, itā€™s still a guess.
And if you really think on Dan Omachiā€™s words, they are advising developers to target Metal for new projects. That means cocos2d-x is currently not a good option to start a new project. Now think about your 2-year timeframe to add Metal support and youā€™ll see the urgency of this matter more clearly.