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

"Fix Z-Coordinate Rendering Bug and Ensure add_updater Compatibility with OpenGL (#3983, #3984)" #4053

Closed
wants to merge 2 commits into from

Conversation

akshara-eecs
Copy link

Overview: What does this pull request change?

Fixes the Z-coordinate rendering bug and ensures compatibility of add_updater with the OpenGL renderer (#3983, #3984).

Motivation and Explanation: Why and how do your changes improve the library?

This pull request addresses two critical bugs in the OpenGL renderer:

  1. Z-Coordinate Rendering Bug ([BUG] Z-coordinate does not bring the Mobject to the front when rendering with OpenGL. #3983): The issue where Mobject layering was not respecting z-coordinates was causing visual discrepancies. This fix ensures that Mobjects are sorted and rendered correctly based on their z-coordinate values, improving the accuracy of animations involving overlapping 3D or layered 2D objects.

  2. add_updater Functionality ([BUG] add_updater does not work when redering with OpenGL. #3984): The bug where the add_updater method failed to work with the OpenGL renderer has been resolved. Now, users can apply dynamic updates to Mobjects in OpenGL, just as they could in Cairo, providing a consistent experience across different rendering backends.

Links to added or changed documentation pages

https://manimce--4038.org.readthedocs.build/en/4038/

Further Information and Comments

The changes were tested with scenes involving dynamic updates and 3D or layered 2D objects to ensure correct visual output. We validated that the fixes did not interfere with rendering on different operating systems and included additional test cases for updaters.

Reviewer Checklist

  • The PR title is descriptive enough for the changelog, and the PR is labeled correctly
  • If applicable: newly added non-private functions and classes have a docstring including a short summary and a PARAMETERS section
  • If applicable: newly added functions and classes are tested

@@ -474,7 +474,23 @@

self.animation_elapsed_time = time.time() - self.animation_start_time

def sort_mobjects_by_depth(mobjects):
# Sort based on z-coordinate to ensure proper layering

Check notice

Code scanning / CodeQL

First parameter of a method is not named 'self' Note

Normal methods should have 'self', rather than 'mobjects', as their first parameter.
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.

1 participant