Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
mcfletch committed May 23, 2023
2 parents 8724492 + 0ec3a6e commit 2a7e344
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 5 deletions.
2 changes: 1 addition & 1 deletion OpenGL/platform/ctypesloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
16 changes: 16 additions & 0 deletions OpenGL/platform/egl.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))
6 changes: 2 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 2a7e344

Please sign in to comment.