Sorry Iâm not sure what you mean, does that mean v4 currently canât be made without macos catalina?
How do I create a project if the cmake script doesnât run?
it means you canât run on simulator if you are using catalina⌠everything else works on lower version of macos
Ok, but my issue wasnât running in simulator, I posted logs of cmake not working in building the project.
Whatâs the command line you used? You should refer to cmake/README.md
or you should use cocos command to run(except iOS).
@R101 1. As for creating Program
, there are two points, one is for creating build-in Program
, we recommend using the following ways since it more efficient:
ProgramState::ProgramState(ProgramType type)
{
_program = backend::ProgramCache::getInstance()->newBuiltinProgram(type);
CCASSERT(_program, "Not built-in program type, please use ProgramState(const std::string& vertexShader, const std::string& fragmentShader) instead.");
CC_SAFE_RETAIN(_program);
init();
}
backend::Program* ProgramCache::newBuiltinProgram(ProgramType type)
{
const auto& iter = ProgramCache::_cachedPrograms.find(type);
if (ProgramCache::_cachedPrograms.end() != iter)
return iter->second;
return nullptr;
}
the other is for creating user-defined Program
, I think itâs a good way to pass in a user-define ID as well as with the shader sources, since it can avoid hashing the shader sources.
-
ProgramState
is designed for unshareable, eachProgramState
contains its own texture and uniform data. If we create theProgramState
from aProgram
directly, the texture and uniform maybe override.
That is perfectly fine for predefined shader scripts, but for large user-defined scripts the current implementation seems limited. It would be great if the hash value is returned in some way so that we can use it to look up the cache to check if a Program
already exists, and it would avoid calling std::hash again on the scripts.
I am aware that ProgramState
is not shareable, but I donât understand your point regarding Program
. As far as I understand, Program
can be used to create new instances of ProgramState
; isnât that how it is supposed to work?
sure, I will fix it later.
Got it, I misunderstood what you meant before, will fix it later.
I was using the guide at https://docs.cocos2d-x.org/cocos2d-x/v4/en/installation/CMake-Guide.html
Iâve updated to Catalina today and run it again, only experiencing a different error in missing CMakeLists for /external (which I resolved by running download/deps)
It may be worth updating the documentation to state:
- macos Catalina is needed
- downloading dependencies is needed in a new clone of the project
No, it is not needed.
Yep, it is needed as before. We will add documents about how to run tests and how to create and run a new project.
Anyway, it worked. (4.0RC0).
But, there are some problemsďźcocostudio3.1 .
(Iphone ccs3.1) wtf, Some pictures disappear. disappear. disappear.
(Android ccs3.1) is all right.
(Mac ccs3.1) is all right.
The Iphone is very hotďźbut Android phone No fever. whyâŚjust HelloWorld.ďźďź
I think Iphone can fry eggs.
Look at the minor issue please:
_samplerDescriptor
is not updated inside the function. Does it needed at all?
@18180920700 i think it may be an issue of ccs, and ccs is not maintained for a long time, i have not idea how to fix it.
@coulsonwang please take a look.
BTWâŚ
macOS HS 10.13.6
cocos2dx 4.0rc0
cocostudio 3.1
I solved it:
- Compress PNG Images
- Remove Text Metadata From PNG Files
It seems to be caused by Xcode.
btw, What editors do you recommend?
So bad!!, really badâŚ
hope to see that as soon as possible.
@18180920700 Attached is my cocos2d-x spine runtime that works with v4. I merged the changes with a relatively recent version of the cocos2dx-spine runtime code. It also has additional custom code to make it work with both v3 and v4 (although it may not compile with v3 yet).
I did notice an issue though with v4, where itâs using an extra draw call for certain models, and Iâm not entirely sure why, whether itâs a bug in Cocos2d-x v4rc0 or in the cocos2d-x v4 spine runtime.
cocos2dx-spine-v4.zip (31.3 KB)