“#1 Game is overall slow, especially when there are many nodes.”
I can confirm this too. All animations seem very laggy and low performance. Very visible between fade in out. In the same area in our game we get 60fps with opengl cocos and only 20-25fps with metal cocos.
ok, sure It is pinned until you read it. Then it moves down like other topics would. If you haven’t read this topic it remains pinned for you. User specific.
Makes sense ) Btw why in metal version, cocos2d-console is missing from tools folder? I can’t run cocos command in terminal. Solved it by copying console from 3.17 version. I am sure i downloaded dependencies and all other folders are ok.
My project now uses glBlendEquation and glBlendFuncSeparate in rendering (by modifying cocos2d::TrianglesCommand). Can I do the same modification in the future? Or can the new backend provide these functions?
I add two properties, _glBlendEquation and _isBlendFuncSeparate to TrianglesCommand, and add them to the hash struct in generateMaterialID(). Then I add those gl functions in useMaterial():
The function glBlendEquation is necessary for some special effects in my project (e.g. reverse color of the area under a sprite). And glBlendFuncSeparate would be useful when using a FBO (RenderTexture) to get correct alpha blend. Since ccGLStateCache dose not provide them, I have to call gl functions directly. I really hope the new backend can take them into account.
I’ve seen the new backend supports those properties and they can be set without graphics specific API. (But TrianglesCommand and RenderState::StateBlock don’t support all properties, maybe it’s expensive to do so.) It means I can do some similar modifications and it’s pretty enough for my project. Thanks a lot!