On 20/09/2007, at 12:16 PM, Simon H wrote:

>
> Hi all - quick ctypes question.
>
> I'm experimenting with stencil buffer picking and I need to pass an
> array of GLuints to glSelectBuffer. Problem is, while my research has
> turned up information about passing simple types by reference, I'm
> having trouble nutting out passing an array. I'm sure I'm missing
> something simple - If you can help, lemme know what it is so I can get
> to the forehead-slapping stage. :)

You just seem to have mixed up GLuint and GLint somewhere along the  
line, and attributed that to a pointer problem.  Here's an example  
that works:

selectBuf = (GLuint * 512)()
glSelectBuffer(len(selectBuf), selectBuf)

You can grep through the pyglet source for many examples of similar  
usage passing arrays to GL functions.

Alex.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pyglet-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/pyglet-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to