Skip to content

Commit 7a2388a

Browse files
committed
synchronize rendering context for envs
1 parent aa410d2 commit 7a2388a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

robosuite/utils/binding_utils.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,8 @@ def update_offscreen_size(self, width, height):
125125
self._set_mujoco_context_and_buffers()
126126

127127
def render(self, width, height, camera_id=None, segmentation=False):
128+
self.gl_ctx.make_current()
129+
128130
viewport = mujoco.MjrRect(0, 0, width, height)
129131

130132
# if self.sim.render_callback is not None:

0 commit comments

Comments
 (0)