[ pyopengl-Bugs-1921652 ] call to glFogCoordfEXT fails on Windows

"SourceForge.net" <[email protected]>
Newsgroups gmane.comp.python.opengl.devel
Message-ID <[email protected]>
Bugs item #1921652, was opened at 2008-03-20 15:19
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105988&aid=1921652&group_id=5988

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: GL
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Christopher Unkel (cunkel)
Assigned to: Nobody/Anonymous (nobody)
Summary: call to glFogCoordfEXT fails on Windows

Initial Comment:
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
                        )(

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105988&aid=1921652&group_id=5988

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
PyOpenGL Homepage
http://pyopengl.sourceforge.net
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.