Commit 422d51e
authored
🎨 Refactor CoreNode Renderability Logic 🚀 (#476)
### 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! 🛠️3 files changed
+43
-25
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1017 | 1017 | | |
1018 | 1018 | | |
1019 | 1019 | | |
1020 | | - | |
| 1020 | + | |
1021 | 1021 | | |
1022 | 1022 | | |
1023 | 1023 | | |
| |||
1225 | 1225 | | |
1226 | 1226 | | |
1227 | 1227 | | |
1228 | | - | |
1229 | | - | |
1230 | | - | |
1231 | | - | |
1232 | | - | |
| 1228 | + | |
1233 | 1229 | | |
1234 | 1230 | | |
1235 | 1231 | | |
| |||
1401 | 1397 | | |
1402 | 1398 | | |
1403 | 1399 | | |
1404 | | - | |
| 1400 | + | |
1405 | 1401 | | |
1406 | 1402 | | |
1407 | 1403 | | |
1408 | 1404 | | |
1409 | 1405 | | |
1410 | | - | |
1411 | | - | |
1412 | | - | |
1413 | | - | |
1414 | | - | |
1415 | | - | |
1416 | | - | |
1417 | | - | |
1418 | | - | |
1419 | | - | |
1420 | 1406 | | |
1421 | 1407 | | |
1422 | 1408 | | |
| |||
2045 | 2031 | | |
2046 | 2032 | | |
2047 | 2033 | | |
| 2034 | + | |
| 2035 | + | |
| 2036 | + | |
| 2037 | + | |
| 2038 | + | |
| 2039 | + | |
| 2040 | + | |
| 2041 | + | |
| 2042 | + | |
| 2043 | + | |
| 2044 | + | |
| 2045 | + | |
| 2046 | + | |
| 2047 | + | |
2048 | 2048 | | |
2049 | 2049 | | |
2050 | | - | |
2051 | | - | |
| 2050 | + | |
| 2051 | + | |
| 2052 | + | |
2052 | 2053 | | |
2053 | 2054 | | |
2054 | 2055 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
454 | 454 | | |
455 | 455 | | |
456 | 456 | | |
457 | | - | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
458 | 463 | | |
459 | 464 | | |
460 | 465 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
104 | | - | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
105 | 110 | | |
106 | 111 | | |
107 | 112 | | |
| |||
155 | 160 | | |
156 | 161 | | |
157 | 162 | | |
158 | | - | |
| 163 | + | |
159 | 164 | | |
160 | | - | |
| 165 | + | |
161 | 166 | | |
162 | | - | |
| 167 | + | |
163 | 168 | | |
164 | 169 | | |
165 | 170 | | |
| |||
195 | 200 | | |
196 | 201 | | |
197 | 202 | | |
198 | | - | |
| 203 | + | |
199 | 204 | | |
200 | 205 | | |
| 206 | + | |
201 | 207 | | |
202 | 208 | | |
203 | 209 | | |
204 | 210 | | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
205 | 216 | | |
206 | 217 | | |
207 | 218 | | |
| |||
249 | 260 | | |
250 | 261 | | |
251 | 262 | | |
| 263 | + | |
252 | 264 | | |
253 | 265 | | |
254 | 266 | | |
| |||
0 commit comments