Open GoogleCodeExporter opened 9 years ago
This flag is a bit mysterious altogether - in particular, it seems very tricky
to synchronise window redraw to the
slower of 2 scheduled intervals.
Original comment by swiftcoder
on 27 Feb 2009 at 1:13
I don't pretend to understand what's going on here, but just in case it's a
significant data point, without setting window.invalid = False, I see 100%
kernal-mode cpu use. When I do set it, I still see 100% cpu, but now in
user-mode.
Pyglet 1.1.3 on Windows XP, Python 2.6
Original comment by tart...@gmail.com
on 15 Jul 2009 at 12:10
Original comment by benjamin...@gmail.com
on 20 Aug 2009 at 2:03
[deleted comment]
I confirm this one. It looks like both window update functions (on_draw) AND
the scheduled procedure calls (via clock.schedule_interval) are handled by the
same event loop so it is NOT POSSIBLE to have window.on_draw called at 30 FPS
and some other functions at 90 times per seconds - it will all go down to the
lowest scheduled timeframe.
I hit this bug on Windows XP.
Original comment by michal....@gmail.com
on 19 Mar 2011 at 11:48
... so what I do is:
1) I create my custom event loop with idle() method overridden
2) I am NOT doing anything in the idle loop, especially I am NOT redrawing ANY
WINDOWS
3) I register re-drawing of the window with clock.schedule_interval.
This way, on Windows, I can have half the CPU usage, redraws with the FPS I
like and so on.
Original comment by michal....@gmail.com
on 19 Mar 2011 at 12:08
Can you please download latest version from the repository?
http://pyglet.googlecode.com/archive/tip.zip
Just to see if this makes any difference. Thanks!
Original comment by useboxnet
on 6 Nov 2013 at 6:51
Hi,
I have downloaded trunk SVN checkout AND I ran the example program included in
the first message of this issue.
CPU usage was pretty decent, which was around 0%. Pretty good result for a
program, that does /almost/ nothing.
Original comment by michal....@gmail.com
on 10 Nov 2013 at 6:26
OK, thanks Michal!
Daniel, looks like there's a problem with the generated documentation because I
can see a comment about invalid in the Window Class. I'll investigate what's
going on.
Original comment by useboxnet
on 16 Nov 2013 at 11:04
I've regenerated the online docs for 1.2 using a patch for sphinx [1] and it
shows the documentation properly, see:
http://pyglet-current.usebox.net/api/window/pyglet.window.Window.html#pyglet.win
dow.Window.invalid
[1]: https://groups.google.com/d/msg/pyglet-users/QaD2AUYu2WI/0gMwLf97c1AJ
Original comment by useboxnet
on 17 Nov 2013 at 4:41
Ignore my last comment, that document is not correct. We're working on it
though.
Original comment by useboxnet
on 17 Nov 2013 at 4:42
Original issue reported on code.google.com by
darabos....@gmail.com
on 10 Feb 2009 at 2:33