Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FlipY3D issue if setDesignResolution and RenderTexture is used #20767

Open
stefan80 opened this issue Feb 16, 2023 · 1 comment
Open

FlipY3D issue if setDesignResolution and RenderTexture is used #20767

stefan80 opened this issue Feb 16, 2023 · 1 comment

Comments

@stefan80
Copy link

  • cocos2d-x version: 3.17.2
  • devices test on: Windows
  • developing environments
    • NDK version:
    • Xcode version:
    • VS version: 2022
    • browser type and version:

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!

@stefan80
Copy link
Author

stefan80 commented Feb 16, 2023

Maybe @zilongshanren @super626 @slackmoehrle can help like it was the case for issue #14057

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant