Skip to content

Commit

Permalink
update glfw init order
Browse files Browse the repository at this point in the history
  • Loading branch information
mdrolet01 committed Oct 17, 2023
1 parent d909aec commit 998cdfb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mushroom_rl/utils/mujoco/viewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ def __init__(self, model, dt, width=1920, height=1080, start_paused=False,
self._width, self._height = self.update_headless_size(width, height)
else:
self._width, self._height = width, height
self._window = glfw.create_window(width=self._width, height=self._height, title="MuJoCo", monitor=None, share=None)
glfw.init()
glfw.window_hint(glfw.COCOA_RETINA_FRAMEBUFFER, 0)
self._window = glfw.create_window(width=self._width, height=self._height, title="MuJoCo", monitor=None, share=None)
glfw.make_context_current(self._window)
glfw.set_mouse_button_callback(self._window, self.mouse_button)
glfw.set_cursor_pos_callback(self._window, self.mouse_move)
Expand Down

0 comments on commit 998cdfb

Please sign in to comment.