Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions robosuite/renderers/context/cgl_context.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
"""An OpenGL context created via CGL."""

from mujoco.cgl import GLContext

class CGLGLContext(GLContext):
"""An OpenGL context created via CGL."""

def __init__(self, max_width, max_height, device_id=0):
super().__init__(max_width, max_height)
2 changes: 2 additions & 0 deletions robosuite/utils/binding_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ def __init__(self, sim, offscreen=True, device_id=-1, max_width=640, max_height=
from robosuite.renderers.context.osmesa_context import OSMesaGLContext as GLContext
elif _SYSTEM == "Linux" and _MUJOCO_GL == "egl":
from robosuite.renderers.context.egl_context import EGLGLContext as GLContext
elif _SYSTEM == "Darwin" and _MUJOCO_GL == "cgl":
from robosuite.renderers.context.cgl_context import CGLGLContext as GLContext
else:
from robosuite.renderers.context.glfw_context import GLFWGLContext as GLContext

Expand Down
Loading