On Fri, Mar 28, 2008 at 9:27 PM, Jamie <[EMAIL PROTECTED]> wrote:
>
>  Hi,
>
>  I'm just starting to have a play with pyglet as a warm-up for pyweek
>  next week and I really like it.  At the moment i'm just playing around
>  with particles and I was wondering if it's possible to use a numpy
>  array with glVertexPointer.  I want to can use numpy's fast
>  manipulation of arrays to move the particles in the array around, then
>  pass this array straight through as a vertex array.  Is this possible
>  at all? I know glVertexPointer expects a ctypes array, but is there
>  any way to convert between the two?

Worst case, you can convert via a Python list.

> Numpy arrays now have a ctypes
>  property to allow their data to be accessed from C, but i'm guessing
>  it's not as simple as that as it probably doesn't contain GLFloats?

I haven't used numpy recently, but this sounds doable.  a GLfloat is
the same as a c_float.

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