Cocos2d-x is a suite of open-source, cross-platform, game-development tools utilized by millions of developers across the globe. Its core has evolved to serve as the foundation for Cocos Creator 1.x & 2.x.
I am using a NodeGrid to flip the screen.
The NodeGrid visit is called between RenderTexture-> bebginClear() and end():
mRTex->beginWithClear(0, 0, 0, 255);
mNodeGrid->visit(renderer, transform, flags);
mRTex->end();
This works fine unless in AppDelegate the designResolutionSize was set. If I set the designResolutionSize, the rendered NodeGrid is scaled up ( I guess to match the glView->getFrameSize()
glview = GLViewImpl::createWithRect("xyz", cocos2d::Rect(0, 0, 1920, 1080));
glview->setDesignResolutionSize(1280, 720, ResolutionPolicy::SHOW_ALL);
In that case the nodegrid layer is scaled by factor 1.5 (1080/720) automatically as soon as the FlipY3D action is executed.
If designResolutionSize is equal to the windows size (1920,1080), everything is fine.
I have no clue how to solve that issue. Can also share the complete code if someone wants to have a look. @stevetranby Maybe you have a hint? You often solved such transformation issues in the past.
I have created a small test project to reproduce the issue.
Steps to Reproduce:
Hi there,
I am using a NodeGrid to flip the screen. The NodeGrid visit is called between RenderTexture-> bebginClear() and end():
mRTex->beginWithClear(0, 0, 0, 255); mNodeGrid->visit(renderer, transform, flags); mRTex->end(); This works fine unless in AppDelegate the designResolutionSize was set. If I set the designResolutionSize, the rendered NodeGrid is scaled up ( I guess to match the glView->getFrameSize()
glview = GLViewImpl::createWithRect("xyz", cocos2d::Rect(0, 0, 1920, 1080)); glview->setDesignResolutionSize(1280, 720, ResolutionPolicy::SHOW_ALL); In that case the nodegrid layer is scaled by factor 1.5 (1080/720) automatically as soon as the FlipY3D action is executed.
If designResolutionSize is equal to the windows size (1920,1080), everything is fine.
I have no clue how to solve that issue. Can also share the complete code if someone wants to have a look. @stevetranby Maybe you have a hint? You often solved such transformation issues in the past.
I have created a small test project to reproduce the issue.
NodeGrid_RenderTexture_DesignResolution_Issue.zip
Thank you!