On Fri, May 1, 2009 at 3:35 PM, Alex Holkner <[email protected]> wrote:

>
> On Sat, May 2, 2009 at 12:52 AM, Padraig Kitterick
> <[email protected]> wrote:
>
> 2) Why does pyglet flip() the window buffers when _any_ event happens by
> > default, even when that event doesn't alter the buffers?
> This behavior means
> > that scheduling any function to be called at short intervals will push
> the
> > fps to the maximum of 60, regardless of what that function is doing, i.e.
> > whether it has an effect on the buffers or not. Not a criticism, just
> > curious...
>
> This is the easiest development model for an application/game
> developer (it avoids bugs in which the developer forgets to invalidate
> the window).  The WIndow.invalid flag exists as an opt-in way to tell
> pyglet not to redraw the window by default, if you want to manage
> invalidating the window yourself.
>

The event updates are great from the point of view of an application
developer, but really bad for a game developer - my update function pretty
much doesn't run when I am tracking mouse move events, because the window is
redrawn many, many times (past 1,000 redraws per second) during mouse move
events.
Is the idea behind the window.invalid flag that I set it to False when I
create the window, and then manually flip in my update loop?

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