On Sat, Feb 26, 2011 at 2:10 PM, une <[email protected]> wrote:
> Hello,
>
> I draw some quads on to the screen with pyglet.graphics.draw, and each
> frame I change the color slightly to make it look as though they are
> 'fading in'.  However, while this is happening, pyglet is only
> rendering at about 4 FPS, causing it to look .  It will render faster
> if I wiggle my mouse around in the window, which makes me think that
> it's a performance optimization.  Is there any way I can get around
> this?
>

I would say that yes, it is probably a performance optimization. The screen
will only be redrawn as often as pyglet thinks it needs to. However,
since you're
bypassing pyglet's event scheduling system by using your own thread, it doesn't
know that it needs to do the redraws. I would suggest using pyglet's own event
scheduling to do your animations. If you want to use your own thread, then you
should probably at least schedule a "dummy" event to run every 1/60th
of a second
or so. I'm new to pyglet, but I think that should at least convince it
that it needs to
do redraws more frequently.

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