Skip to content

Commit bb91cfe

Browse files
authored
Merge pull request #69 from jnolan14/new_vgl_opts
Added test for egl support for runvgl in FV, adds flag to use if present
2 parents 7895716 + 372a682 commit bb91cfe

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

surfa/vis/freeview.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,8 @@ def _find_vgl():
338338
Locate the VGL wrapper if installed.
339339
"""
340340
have_key = os.path.isfile('/etc/opt/VirtualGL/vgl_xauth_key')
341+
# test for egl support
342+
has_egl = os.path.isfile('/opt/VirtualGL/bin/eglinfo')
341343
vgl_path = shutil.which('vglrun')
342344
if vgl_path is None:
343345
vgl_path = shutil.which('vglrun', path='/usr/pubsw/bin')
@@ -346,6 +348,9 @@ def _find_vgl():
346348
islocal = any([os.environ.get('DISPLAY', '').endswith(string) for string in (':0', ':0.0')])
347349
no_glx = 'NV-GLX' in collect_output('xdpyinfo')[0]
348350
if not islocal and not no_glx:
351+
# add flag for egl if supported
352+
if has_egl:
353+
vgl_path = vgl_path + ' -d egl'
349354
return vgl_path
350355
return None
351356

0 commit comments

Comments
 (0)