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

>
> Thanks to Tristam for pointing me to pyglet.graphics.vertex_list!
>
> Below is some code that demonstrates its use. The SiegeLord approach
> is about 6 times faster than the standard approach, a benefit that
> gets even greater when you anti-alias. Just beautiful :O) Any further
> optimization suggestions are welcome!


Avoid rebuilding the vertex list every time you draw (unless you absolutely
have to). Instead build each list once, and draw() them many times.
If you circles are mostly static, you can also add them to a batch (see
batched rendering in the pyglet user guide), which will let pyglet them all
in a single call to batch.draw(), and optimise accordingly.

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