469,621 Members | 1,720 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,621 developers. It's quick & easy.

pyopengl glShaderSourceARB error

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)

Dec 5 '06 #1
1 1811
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

Dec 10 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Kirill Kuvaldin | last post: by
2 posts views Thread by Erik Max Francis | last post: by
5 posts views Thread by Sébastien Ramage | last post: by
reply views Thread by sweetmelon | last post: by
reply views Thread by shirish | last post: by
2 posts views Thread by seb.haase | last post: by
reply views Thread by Colin J. Williams | last post: by
1 post views Thread by Clay Hobbs | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.