ManimCommunity / ManimCommunity/manim

Create opengl running 'modes'

Open
#2,069 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement opengl
Dominant language
Python
Stars
40.9k
Forks
3.1k
Avg merge
3d 12h
Merged PRs (30d)
25

Description

Enhancement proposal

Opengl brings along a number of new features that is creating a lot of complexity. I think it is slowly becoming confusing to maintain.

First example is the number of output formats:

  • -s results in saving a single png
  • --format <INSERT_FORMAT> allows outputs such as mp4, webm, png, gif etc
  • write_to_movie results in mp4 output
  • -p triggers a preview on the above format

This is just like cairo but now in opengl we have the pyglet window and interactive_embed. So now we have all the above options, plus two different ways to create windows:

  • Pyglet window can be created just to view the scene, then close after the scene has finished
  • interactive_embed that keeps the window open and allows for interaction

See this PR #1982 to see how it can start getting messy, trying to determine how different permutations of these should behave.

I am not sure of the best solution, but I think we should at least agree on how the different flags should interact, when windows should be created, the precedence order etc, then when we agree on this boil it down to a number of modes that are determined at startup so that we don't need to keep checking lots of flags to determine the behaviour.

Additional comments

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading PR #1982 and tracing how the OpenGL-related flags are handled, including -s, --format, -p, write_to_movie, and interactive_embed. Clarify the precedence between output formats, previews, temporary windows, and interactive windows before proposing modes. Done means the behavior and startup modes are agreed and the resulting complexity is addressed.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli, desktop
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.