Skip to content

opengl

OpenGLBackend dataclass

Python
OpenGLBackend(xml_path: Callable[[], Path])

The classic MuJoCo viewer (mujoco.viewer.launch_passive): a native window drawn with OpenGL.

It needs a display, so over SSH it needs X11 forwarding. The viewer reads the model and data from its own thread, which is why the RuntimeManager holds viewer_lock while it steps physics.

xml_path instance-attribute

Python
xml_path: Callable[[], Path]

Gives the file the current model was written to, which the viewer shows in its title and reloads from.