Skip to content

Commit

Permalink
FIX for #27 to work on machines where libOpenGL is not present
Browse files Browse the repository at this point in the history
Apparently the advice that we should use libOpenGL really isn't
universally applicable. Ubuntu 18.04 *does* seem to have it, though
that might be because of an installed package. Ubuntu 19.10 does
*not* have libOpenGL by default.
  • Loading branch information
mcfletch committed Dec 30, 2019
1 parent 0dca32d commit 0ed754b
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions OpenGL/platform/egl.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,15 @@ def GLES3(self):
@baseplatform.lazy_property
def GL(self):
try:
return ctypesloader.loadLibrary(
ctypes.cdll,
'OpenGL',
mode=ctypes.RTLD_GLOBAL
)
for name in ('OpenGL','GL'):
lib = ctypesloader.loadLibrary(
ctypes.cdll,
'GL',

This comment has been minimized.

Copy link
@fastflo

fastflo Feb 14, 2020

i think you wanted to use the name variable here instead of 'GL'...

mode=ctypes.RTLD_GLOBAL
)
if lib:
return lib
raise OSError("No GL/OpenGL library available")
except OSError:
return self.GLES2 or self.GLES1
@baseplatform.lazy_property
Expand Down

0 comments on commit 0ed754b

Please sign in to comment.