#188 call to glFogCoordfEXT fails on Windows

closed-fixed
nobody
GL (74)
5
2008-05-02
2008-03-20
No

PyOpenGL-3.0.0.b1-py2.5egg on Python 2.5.2 on win32

When running NeHe lesson 4.1:

Traceback (most recent call last):
File "c:\python25\lib\site-packages\PyOpenGL-3.0.0b1-py2.5.egg\OpenGL\GLUT\special.py", line 110, in safeCall
return function( *args, **named )
File "lesson41.py", line 226, in DrawGLScene
glFogCoordfEXT( 1.0); glTexCoord2f(0.0, 0.0); glVertex3f(-2.5,-2.5,-15.0);
File "c:\python25\lib\site-packages\PyOpenGL-3.0.0b1-py2.5.egg\OpenGL\platform\baseplatform.py", line 252, in __call__
if self.extension and self.load():
File "c:\python25\lib\site-packages\PyOpenGL-3.0.0b1-py2.5.egg\OpenGL\platform\baseplatform.py", line 234, in load
func = functionTypeFor( self.DLL )(
NameError: global name 'functionTypeFor' is not defined
GLUT callback forcing low-level exit on error: global name 'functionTypeFor' is not defined

I see no evidence that a global functionTypeFor should be in scope. The following patch resolves the problem:

*** PyOpenGL-3.0.0b1-py2.5.egg/OpenGL/platform/baseplatform.py Thu Mar 20 14:56:50 2008
--- PyOpenGL-3.0.0b1-py2.5.not/OpenGL/platform/baseplatform.py Thu Mar 20 13:15:43 2008
***************
*** 231,237 ****
from OpenGL import platform
pointer = platform.PLATFORM.getExtensionProcedure( self.__name__ )
if pointer:
! func = functionTypeFor( self.DLL )(
self.restype,
*self.argtypes
)(
--- 231,237 ----
from OpenGL import platform
pointer = platform.PLATFORM.getExtensionProcedure( self.__name__ )
if pointer:
! func = platform.PLATFORM.functionTypeFor( self.DLL )(
self.restype,
*self.argtypes
)(

Discussion

  • Mike C. Fletcher

    Logged In: YES
    user_id=34901
    Originator: NO

    This should be fixed in beta2

     
  • Mike C. Fletcher

    • status: open --> closed-fixed
     

Log in to post a comment.