Quantcast
Channel: cocos2d-x - Cocos Forums
Viewing all articles
Browse latest Browse all 2751

FlipY3D issue if setDesignResolution and RenderTexture is used

$
0
0

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.

Thanks,
Stefan

2 posts - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 2751

Trending Articles