Skip to content

Commit

Permalink
Revert commit 73c31ac.
Browse files Browse the repository at this point in the history
That commit broke rendering on macOS. `glfwInitHint` only sets internal hints in GLFW and a subsequent call to `glfwInit` is still required. However, `glfwInitHint(GLFW_COCOA_MENUBAR, 0); glfwInit();` still results in a dock icon being created, so we are reverting that commit entirely until we figure out a way to actually disable it.

Closes #239

PiperOrigin-RevId: 425341097
Change-Id: If87643db372d4ec0a5237deb6c0b3effecdd7dc0
  • Loading branch information
saran-t authored and copybara-github committed Jan 31, 2022
1 parent 421c927 commit fe44496
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
10 changes: 1 addition & 9 deletions dm_control/_render/glfw_renderer.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@

"""An OpenGL renderer backed by GLFW."""

import platform

from dm_control._render import base
from dm_control._render import executor

Expand All @@ -27,13 +25,7 @@
except (ImportError, IOError, OSError) as exc:
raise ImportError from exc
try:
if platform.system() == 'Darwin':
# By default, GLFW creates a Cocoa menubar on macOS, which results in a
# Python rocket icon appearing in the dock. We don't want this since
# dm_control._render only uses GLFW for offscreen rendering.
glfw.init_hint(glfw.COCOA_MENUBAR, glfw.FALSE)
else:
glfw.init()
glfw.init()
except glfw.GLFWError as exc:
raise ImportError from exc

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ def is_excluded(s):

setup(
name='dm_control',
version='0.0.424822091',
version='0.0.425341097',
description='Continuous control environments and MuJoCo Python bindings.',
author='DeepMind',
license='Apache License, Version 2.0',
Expand Down

0 comments on commit fe44496

Please sign in to comment.