On Sun, Feb 27, 2011 at 6:10 AM, une <[email protected]> wrote:
> 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?

Yes, it is.

pyglet has a facility for calling functions periodically:
http://pyglet.org/doc/programming_guide/calling_functions_periodically.html

Also, if you must run your own event handling in a thread then you may
set window.invalid to True, which will force the pyglet event loop to
redraw. It's probably not thread-safe though.


      Richard

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