Ejemplo n.º 1
0
 def get_proc_address(self, s):
     proc = glut.glutGetProcAddress(s)
     if not proc and os.name == "nt":
         # glutGetProcAddress is documented to only look up GLUT functions.
         # Since it uses dlsym on Linux, it happens to also work for GL
         # functions, but that is not the behavior on Windows where a dynamic
         # lookup needs to specify explicitly what module to search in.
         proc = ctypes.cast(getattr(gl_platform.PLATFORM.GL, s.decode('ascii')), ctypes.c_void_p).value
     return proc
Ejemplo n.º 2
0
 def get_proc_address(self, s):
     proc = glut.glutGetProcAddress(s)
     if not proc and os.name == "nt":
         # glutGetProcAddress is documented to only look up GLUT functions.
         # Since it uses dlsym on Linux, it happens to also work for GL
         # functions, but that is not the behavior on Windows where a dynamic
         # lookup needs to specify explicitly what module to search in.
         proc = ctypes.cast(getattr(gl_platform.PLATFORM.GL, s.decode('ascii')), ctypes.c_void_p).value
     return proc