Add low-level CGL context management for macOS.
This allows rendering from non-main threads as the context is not tied to a Cocoa window. Fixes #742 Fixes #798 PiperOrigin-RevId: 523144359 Change-Id: I98432debdd034814c313eda94e38c248c3c1f76c
This commit is contained in:
committed by
Copybara-Service
parent
b536e46cc0
commit
6d63e046fd
@@ -40,6 +40,9 @@ if _MUJOCO_GL not in ('disable', 'disabled', 'off', 'false', '0'):
|
||||
elif _SYSTEM == 'Linux' and _MUJOCO_GL == 'egl':
|
||||
from mujoco.egl import GLContext as _GLContext
|
||||
GLContext = _GLContext
|
||||
elif _SYSTEM == 'Darwin':
|
||||
from mujoco.cgl import GLContext as _GLContext
|
||||
GLContext = _GLContext
|
||||
else:
|
||||
from mujoco.glfw import GLContext as _GLContext
|
||||
GLContext = _GLContext
|
||||
|
||||
Reference in New Issue
Block a user