0
\$\begingroup\$

What is the default interval of draw method call in cocos2dx engine? Can we set it manually? I couldn't find much information about it online. After researching a bit I found that update() method interval step could be adjusted by setting setAnimationInterval. Can I set a specific interval for draw method too?

\$\endgroup\$
1
\$\begingroup\$

The default interval is 1/60s. Although you can set it manually using CCDirector::sharedDirector()->setAnimationInterval(1.0 / 60);, it's not usually effective for intervals less than 1/60s simply because of vertical sync in case of desktop platforms, or hardware limits in case of mobile ones. For desktop platforms (specially windows that I've already tested) though you can disable vsync using wglSwapIntervalEXT(0);

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.