[ 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 18:19
Message generated for change (Comment added) made by mcfletch
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: Closed
>Resolution: Fixed
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
                        )(

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

>Comment By: Mike C. Fletcher (mcfletch)
Date: 2008-05-02 16:53

Message:
Logged In: YES 
user_id=34901
Originator: NO

This should be fixed in beta2

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

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 the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
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.