On Feb 7, 5:22 am, Jimmy Chan <[email protected]> wrote:
> and does
> the math to move and rotate them.
Let opengl do the math, much quicker, also much simpler, see
glPushMatrix/glPopMatrix

> My only thought is to put the glBegin glEnd block in
Drawing primitives by specifying each vertex individually with
glVertex3f between glBegin and glEnd, while beeing flexible, is
incredibly slow, especially out of python.
You want to use pyglet.graphics.vertex_list and pyglet.graphics.batch
to avoid that.

>  Is there a common way
> to store these bunch of points, that will move and rotate together.
Yes, as vertex lists as part of a pyglet.graphics.batch

> I could have a for loop iterate over all the coordinates and rotate/move
> each one at a time but it seems logical to use a 4 x nCoordintes
> matrix and do matrix multiplication.  Downside is this will require a
> nd_array class (probably from numpy).  I'm leaning toward just
> importing numpy.   Is this overkill or is this common?
Let opengl do the math per vertex for you, see glPushMatrix/
glPopMatrix.


--~--~---------~--~----~------------~-------~--~----~
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