joroy wrote:
Hi all,
I think this is ctypes related but how can I call the glShaderSourceARB
function?
The function have this header:
glShaderSourceARB( GLhandleARB(shaderObj), GLsizei(count),
POINTER(arrays.GLcharARBArray)(string), GLintArray(length) ) -None
I call the function with someting like: glShaderSourceARB(self._object,
1, sourceString, 1)
The error is
"expected LP_GLcharArray instance instead of str"
In fact I don't have any information on how to use this function.
This is the last version of pyopengl available on the CVS
(PyOpenGL-3.0.0a5-py2.5.egg)
Sorry about the lack of information available. There's a sample of
usage here (known to work on Win32 and Linux with latest CVS HEAD):
http://pyopengl.cvs.sourceforge.net/...py?view=markup
The key information you seem to be missing are that the Python version
has a simpler API and that you have to pass an array (list) of strings,
not just a single string to the compilation function. The count and
length (array of lengths) parameters are pulled from the list-of-strings
you pass.
HTH,
Mike
--
________________________________________________
Mike C. Fletcher
Designer, VR Plumber, Coder
http://www.vrplumber.com http://blog.vrplumber.com