-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Do not render constantly in requestRenderMode when dynamic geometries exist #11855
Conversation
Update Primitive _ready flag immediately instead of on the next render. This resolves the infinite rendering loop caused by dynamic Primitives which was reported under CesiumGS#6631.
Fix the broken unit tests
Thanks for the suggestion @rropp5! I can confirm we have a CLA on file for you. |
@rropp5 I think this is a valid way to address the issue. I've tested the example from #10517 where this code was originally added, and request render mode continue to function as expected. Would you mind syncing up with |
@ggetz No problem! The branches should be synced now and I added 1.116 to the CHANGES.md so I believe we're good to go. |
Thanks @rropp5! |
Description
Avoid requesting a new render from the Scene every time a Primitive is ready. With dynamic Primitives, they are destroyed and re-created each frame so this means they must be marked "ready" each frame. If they request a render each time they are ready, there is an infinite rendering loop that breaks requestRenderMode.
These changes simple modify the setReady() function on Primitives so it only sets the ready state and does not request a new frame.
Issue number and link
This resolves the problems reported under #6631.
Testing plan
I created several sandcastles on the linked issue (#6631) to address Primitives and GroundPrimitives. I have also tested to confirm non-dynamic Primitives render as expected when requestRenderMode is enabled and when it is disabled.
Case 1: animation is paused, Infinity maximumRenderTimeChange
Case 2: animation is active, 2 second maximumRenderTimeChange
Author checklist
CONTRIBUTORS.md
CHANGES.md
with a short summary of my change