Skip to content

Commit 74c6aac

Browse files
Merge pull request #570 from mishmish66/master
Fixes #569 (🐛 Bug)
2 parents ac8df07 + f69ac66 commit 74c6aac

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

robosuite/renderers/context/egl_context.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ def __init__(self, max_width, max_height, device_id=0):
113113
del max_width, max_height # unused
114114
num_configs = ctypes.c_long()
115115
config_size = 1
116-
config = EGL.EGLConfig()
116+
config_ptr = EGL.EGLConfig() # Makes an opaque pointer
117117
EGL.eglReleaseThread()
118118
global EGL_DISPLAY
119119
if EGL_DISPLAY is None:
@@ -126,14 +126,14 @@ def __init__(self, max_width, max_height, device_id=0):
126126
"required for creating a headless rendering context."
127127
)
128128
atexit.register(EGL.eglTerminate, EGL_DISPLAY)
129-
EGL.eglChooseConfig(EGL_DISPLAY, EGL_ATTRIBUTES, ctypes.byref(config), config_size, num_configs)
129+
EGL.eglChooseConfig(EGL_DISPLAY, EGL_ATTRIBUTES, config_ptr, config_size, num_configs)
130130
if num_configs.value < 1:
131131
raise RuntimeError(
132132
"EGL failed to find a framebuffer configuration that matches the "
133133
"desired attributes: {}".format(EGL_ATTRIBUTES)
134134
)
135135
EGL.eglBindAPI(EGL.EGL_OPENGL_API)
136-
self._context = EGL.eglCreateContext(EGL_DISPLAY, config, EGL.EGL_NO_CONTEXT, None)
136+
self._context = EGL.eglCreateContext(EGL_DISPLAY, config_ptr, EGL.EGL_NO_CONTEXT, None)
137137
if not self._context:
138138
raise RuntimeError("Cannot create an EGL context.")
139139

0 commit comments

Comments
 (0)