Pyglet provides a nice abstraction around vertex arrays and VBOs, in the
form of pyglet.graphics.vertex_list and pyglet.graphics.indexed_vertex_list.
They are considerably easier than using the Opengl functions directly
(especially since that involves messing around with ctypes), and should be
just as fast.

See here: http://pyglet.org/doc/api/pyglet.graphics-module.html

On Thu, May 28, 2009 at 12:37 AM, Mike Lawrence <[email protected]>wrote:

>
> Hi all,
>
> I draw a lot of circles in my pyglet code and I'm trying to optimize
> as much as possible. I've implemented SiegeLord's brilliant approach
> (http://slabode.exofire.net/circle_draw.shtml; mirrored at
> http://www.mmsguru.com/mirror/circle_cached.html), using the standard
> glBegin()...glEnd() method, but I understand that using glDrawArrays()
> might speed things up even further. However, I'm hitting a snag in
> providing an array of the proper format to glVertexPointers(). I'm
> getting a "argument 4: <type 'exceptions.TypeError'>: wrong type"
> error, which presumably means that the array of verticies I'm passing
> to glVertexPointers() isn't properly formatted.
>

-- 
Tristam MacDonald
http://swiftcoder.wordpress.com/

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