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

Set RenderTexture content size on creation #2120

Merged
merged 1 commit into from
Aug 30, 2024
Merged

Conversation

rh101
Copy link
Contributor

@rh101 rh101 commented Aug 30, 2024

Describe your changes

Currently, when a RenderTexture is created, its content size remains as 0,0, so the only way to get the size of the RenderTexture is to call RenderTexture->getSprite()->getContentSize(). I'm not sure why this was never set, but the change in this PR ensures that the content size of the RenderTexture is set on creation.

This PR should not affect the current behavior of the RenderTexture in any way.

Issue ticket number and link

#2045

Checklist before requesting a review

For each PR

  • Add Copyright if it missed:
    - "Copyright (c) 2019-present Axmol Engine contributors (see AUTHORS.md)."

  • I have performed a self-review of my code.

    Optional:

    • I have checked readme and add important infos to this PR.
    • I have added/adapted some tests too.

For core/new feature PR

  • I have checked readme and add important infos to this PR.
  • I have added thorough tests.

@halx99 halx99 added this to the 2.2.0 milestone Aug 30, 2024
@halx99 halx99 merged commit 0fbf9f7 into axmolengine:dev Aug 30, 2024
15 checks passed
@rh101 rh101 deleted the patch-2 branch August 31, 2024 00:14
xfbird pushed a commit to xfbird/axmol that referenced this pull request Sep 18, 2024
xfbird pushed a commit to xfbird/axmol that referenced this pull request Sep 18, 2024
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

Successfully merging this pull request may close these issues.

2 participants