Hi,
I’m having some strange behavior using effects, liquid or waves effects, when the resolution size is different from the design resolution.
For test purposes I animated the background sprite from the sample application, when the resolution is the same, all works well, but when is different I get a small box on the left corner with this sprite and all around is black.
I’m using cocos2dx 2.2.2 in windows.
Windows application is built with a 480x320 frame size.
To reproduce this behavior I’ve created a new project with project-creator.
In my AppDelegate.cpp after
pDirector->setOpenGLView(pEGLView);
Added this lines
CCSize designResolutionSize = cocos2d::CCSizeMake(800, 480);
pEGLView->setDesignResolutionSize(designResolutionSize.width, designResolutionSize.height, kResolutionExactFit);
CCSize frameSize = pEGLView->getFrameSize();
pDirector->setContentScaleFactor( frameSize.height / designResolutionSize.height);
And in HelloWorldScene.cpp replaced
this->addChild(pSprite, 0);
with
CCNode* node = CCNode::create();
node->addChild(pSprite, 0);
CCLiquid* effect = CCLiquid::create(5, CCSizeMake(16,12), 2, 5);
node->runAction( CCRepeatForever::create( effect ) );
this->addChild(node, 0);
Is there any way to fix this?