473,511 Members | 16,258 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1958
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1404
by: soul | last post by:
I have a problem in pyOpenGL.I'm programing in Linux Fedora Core 2 and I have installed the following packets: python 2.3.3-6 glut-3.7-12 glut-devel-3.7-12 PyOpenGL-2.0.1.09...
1
2295
by: Kirill Kuvaldin | last post by:
Hello All! My program in python uses PyOpenGL and I need to convert it to a standalone windows executable file. Following to these instructions...
2
4046
by: Erik Max Francis | last post by:
I was interesting in adding selection and hit testing to ZOE, and was looking at the PyOpenGL wrappers' handling of selection and picking. I see glSelectBuffer to specify the size of the buffer,...
5
1753
by: Sébastien Ramage | last post by:
Bonjour à tous, Dans la folie j'ai installé le nouveau python, impatient de voir les nouveautés mais je pense que j'ai été un peu rapide car j'ai voulu utiliser pyOpenGL et là problème il...
0
1437
by: sweetmelon | last post by:
(I'm a newbie in Python and pyOpenGL.) Environment: WinXP SP2 Python ver. 2.5 WingIDE easy_install is installed PIL, pyNum is installed Download PyOpenGL-3.0.0a5-py2.5.egg run: easy_install...
0
1337
by: shirish | last post by:
Hi all, Is it possible to have Python+Pygame+PyOpenGL in one compact package so people can play the games released at pyweek.org . I have been having a hard time getting the whole thing on windows...
2
2222
by: seb.haase | last post by:
Hi, I am distributing a package with a precompiled collection of modules and packages useful for Python based medical/biological/astronomical image analysis and algorithm development. (Codename:...
0
1043
by: Colin J. Williams | last post by:
I have just installed PyOpenGL and get a series of warning messages: Best match: PyOpenGL 3.0.0b3 Downloading...
1
6708
by: Clay Hobbs | last post by:
I need a tutorial for PyOpenGL (specifically, to be used with wxPython). I searched with Google and didn't find one. Does anybody know where one is? -- Ratfink
0
7353
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7508
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5662
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5063
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4737
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3222
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3212
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
781
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
446
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.