Skip to content
Open
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
4 changes: 3 additions & 1 deletion pyrender/platforms/pyglet_platform.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,21 +45,23 @@ def init_context(self):
double_buffer=True,
major_version=MIN_OPEN_GL_MAJOR,
minor_version=MIN_OPEN_GL_MINOR)]
error_message = None
for conf in confs:
try:
self._window = pyglet.window.Window(config=conf, visible=False,
resizable=False,
width=1, height=1)
break
except pyglet.window.NoSuchConfigException as e:
error_message = e
pass

if not self._window:
raise ValueError(
'Failed to initialize Pyglet window with an OpenGL >= 3+ '
'context. If you\'re logged in via SSH, ensure that you\'re '
'running your script with vglrun (i.e. VirtualGL). The '
'internal error message was "{}"'.format(e)
'internal error message was "{}"'.format(error_message)
)

def make_current(self):
Expand Down