Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > pyopengl glShaderSourceARB error

Reply
Thread Tools

pyopengl glShaderSourceARB error

 
 
joroy
Guest
Posts: n/a
 
      12-05-2006
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)

 
Reply With Quote
 
 
 
 
Mike C. Fletcher
Guest
Posts: n/a
 
      12-10-2006
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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
pyOpenGL Error unable to detect undefined names Ron Python 0 12-02-2010 05:18 PM
Installing PyOpenGL - can't find libnumarray module Steven Gutstein Python 3 12-30-2003 06:08 AM
pyOpenGL for python 2.3 Jimmy Johns Python 3 11-18-2003 05:45 AM
re: pyopengl / python2.3 / win32 Arthur Python 1 10-06-2003 07:52 PM
pyopengl / python2.3 / win32 John Hunter Python 0 09-22-2003 08:35 PM



Advertisments