diff --git a/OpenGL/platform/ctypesloader.py b/OpenGL/platform/ctypesloader.py index 82ec8e69..d9ff0069 100644 --- a/OpenGL/platform/ctypesloader.py +++ b/OpenGL/platform/ctypesloader.py @@ -52,7 +52,7 @@ def _loadLibraryPosix(dllType, name, mode): suffix = '.so' base_name = prefix + name + suffix - filenames_to_try = [] + filenames_to_try = [base_name] # If a .so is missing, let's try libs with so version (e.g libGLU.so.9, libGLU.so.8 and so on) filenames_to_try.extend(list(reversed([ base_name + '.%i' % i for i in range(0, 10) diff --git a/OpenGL/platform/egl.py b/OpenGL/platform/egl.py index e74f3dd8..55fbb0be 100644 --- a/OpenGL/platform/egl.py +++ b/OpenGL/platform/egl.py @@ -104,3 +104,19 @@ def GLE( self ): @baseplatform.lazy_property def GetCurrentContext( self ): return self.EGL.eglGetCurrentContext + + def getGLUTFontPointer( self, constant ): + """Platform specific function to retrieve a GLUT font pointer + + GLUTAPI void *glutBitmap9By15; + #define GLUT_BITMAP_9_BY_15 (&glutBitmap9By15) + + Key here is that we want the addressof the pointer in the DLL, + not the pointer in the DLL. That is, our pointer is to the + pointer defined in the DLL, we don't want the *value* stored in + that pointer. + """ + name = [ x.title() for x in constant.split( '_' )[1:] ] + internal = 'glut' + "".join( [x.title() for x in name] ) + pointer = ctypes.c_void_p.in_dll( self.GLUT, internal ) + return ctypes.c_void_p(ctypes.addressof(pointer)) diff --git a/setup.py b/setup.py index bb444e62..57a656b3 100644 --- a/setup.py +++ b/setup.py @@ -2,13 +2,11 @@ """PyOpenGL setup script (setuptools-based) """ import sys, os - -extra_commands = {} - from setuptools import setup - from distutils.command.install_data import install_data +extra_commands = {} + class smart_install_data(install_data): def run(self):