@zhangxm Is there any documentation available for the process of upgrading from V3 to V4? The area I’m specifically interested in is related to shaders, since the API has changed significantly, and there seems to be less pre-defined shaders available.
For instance, v3 has ccPositionTextureColor_noMVP_vert defined, but v4 does not, so there is no obvious replacement that I can see. I’ll be digging into the shader code to see if there is something similar.
Also, in v3 you have things like this:
GLProgram::createWithByteArrays(vertSource, fragSource)
Yet in v4, there is no equivalent, so from looking at the cocos code, I assume we would need to do this:
backend::ProgramCache::getInstance()->newProgram(vertSource, fragSource)
I haven’t had time to dig into the code to see what the new system is like, and even then I may not understand it completely.
So, if there is documentation detailing what is required to upgrade from v3 to v4, relating to what changes are required etc., then it would be of great help with adapting the current game code to use v4.
So far things seem to be working ok, except for a strange issue with global Z sorting with v4 that does not happen with v3. I’m looking into at the moment to determine if it’s a bug in my game code or in the v4 engine code.
Also, there are fixes in the v3 github branch that have not been ported over to the v4 branch. Will these be merged in at some point?
EDIT: There is some strange behavior with clipping areas. If there are multiple clipping areas adjacent to each other, and they are all children of the same parent node, then the first clipping area added to the parent will cause all other adjust clipping areas to clipped out incorrectly. I’ll do my best to get a simple project to reproduce this.
EDIT: cpp-tests, 25:Node: Clipping -> Test #2 is not working correctly (Win32 debug build, VS2019). The holes should be an image, yet they’re just empty squares. I’m not sure if it’s related to the issue I’m experiencing though.