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

[Spine] Fix two color tint data not being copied across to backend buffer on first frame #1875

Merged
merged 1 commit into from
May 2, 2024

Conversation

rh101
Copy link
Contributor

@rh101 rh101 commented May 2, 2024

Describe your changes

The two color tint vertex data was being updated after a new render command (TwoColorTrianglesCommand) is added, but the issue is that the addCommand method would have already updated the back-end buffer with the passed in data. This meant that the vertex data in the back-end buffer did not contain the updated values.

It's primarily an issue with TwoColorTrianglesCommand, because of how it works. The non-two color tint code uses TrianglesCommand, and does not seem to copy the data on addCommand, but rather hold a reference to the vertex data to be used later in the rendering process (if I understand it correctly). Regardless of that, the section for non-two color tint has also been changed to update the data before the Renderer::addCommand is called.

Issue ticket number and link

#1824

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.

@rh101 rh101 mentioned this pull request May 2, 2024
@halx99 halx99 added this to the 2.1.3 milestone May 2, 2024
@halx99 halx99 linked an issue May 2, 2024 that may be closed by this pull request
@halx99
Copy link
Collaborator

halx99 commented May 2, 2024

cheers, thanks @rh101

@halx99 halx99 merged commit 8b4ac1d into axmolengine:dev May 2, 2024
14 of 15 checks passed
@rh101 rh101 deleted the spine-render-fix branch May 2, 2024 04:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Spine Two-Color Tint Bug
2 participants