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

🎨 Refactor CoreNode Renderability Logic 🚀 #476

Merged
merged 3 commits into from
Jan 8, 2025

Conversation

wouterlucas
Copy link
Contributor

What’s New? ✨

This PR refactors Texture Throttling in the following ways:

  • 🕒 Async RTT Texture Loading: When an RTT node is set, wait for the texture to load asynchronously.
  • 🗑️ Improved Texture Cleanup: When a texture is freed, its source texture is now also marked as freed. Fixes a bug where textures weren't returning after memory cleanup.
  • 🔄 Auto-Trigger Texture Loading: Refactored isRenderable owner changes to automatically call texture loading if the texture state is freed or initial.

How to Test? 🧪

RTT Changes: Use test=rtt-dimension. 🖼️ You should see race conditions occurring prior to this PR.

Texture Freed Fix: Add a rocko.png to the test=texture-cleanup-critical test and move it in and out of the screen to validate. 🎯 (Not the prettiest, but it works!). Might create an automated test for this in the future.

What’s Next? 🚀

More Testing! 🛠️

…Node and Stage

This avoids sending a free event each time we load a texture and;
Improves the renderability changes and loading of texture w.r.t. texture state.
@wouterlucas wouterlucas requested a review from jfboeve January 7, 2025 20:24
@wouterlucas wouterlucas marked this pull request as ready for review January 8, 2025 07:45
@erikhaandrikman erikhaandrikman self-requested a review January 8, 2025 08:56
Copy link
Collaborator

@jfboeve jfboeve left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@wouterlucas wouterlucas added this pull request to the merge queue Jan 8, 2025
Merged via the queue into main with commit 422d51e Jan 8, 2025
2 checks passed
@wouterlucas wouterlucas deleted the feat/texture-throttling branch January 10, 2025 17:41
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.

3 participants