[ pyopengl-Bugs-1878648 ] glShaderSource wrapper not loaded properly

"SourceForge.net" <[email protected]> Sun, 19 Jul 2009 02:38:43 +0000
Newsgroups gmane.comp.python.opengl.devel
Message-ID <[email protected]>
Bugs item #1878648, was opened at 2008-01-23 22:05
Message generated for change (Comment added) made by mcfletch
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105988&aid=1878648&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: v3.0.0
>Status: Closed
>Resolution: Out of Date
Priority: 5
Private: No
Submitted By: tkerwin (tkerwin)
Assigned to: Nobody/Anonymous (nobody)
Summary: glShaderSource wrapper not loaded properly

Initial Comment:
When I try to use glShaderSource, I get this error message:

  File "C:\Python25\Lib\site-packages\OpenGL\platform\baseplatform.py", line 253, in __call__
    return self( *args, **named )
TypeError: this function takes 4 arguments (2 given)

I was expecting it to require two arguments from the documentation.  From glancing at the code, it seems like the wrapper is in there, but perhaps not loading properly.  Is there any workaround for this to get shaders working?

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

>Comment By: Mike C. Fletcher (mcfletch)
Date: 2009-07-18 22:38

Message:
We've got many examples of working code on both Win32 and Linux, so we'll
assume the fix worked.

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

Comment By: Mike C. Fletcher (mcfletch)
Date: 2008-04-06 20:58

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

This would be easier to debug with a test case.  I'm guessing what's
happening is that you are on Win32, and that at the point where you import
the module, there's no glShaderSource function.  As a result the wrappers
were not being created.  Later, when you tried to call them, the
null-function wrapper was able to resolve the function and tried to call it
directly.

See OpenGLContext/tests/shaderobjects.py for an example that should work
in this mode.  Also note that I've altered the wrappers to no longer do the
load-time checks.

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

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

------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
_______________________________________________
PyOpenGL Homepage
http://pyopengl.sourceforge.net