Rearrange your event loop to use clock.schedule_interval(update, 1/60.0) and call draw from within there.
On Fri, Jan 18, 2013 at 6:44 PM, Winston Wolff <[email protected]> wrote: > Does setting an FPS limit work in 1.2alpha? I have a cocos2d app and it runs > about 40fps normally, but when the window gets covered by another window, the > fps jumps up to 200fps and it starts using a lot of CPU. I don't like that > CPU usage so I'm trying to set a max framerate of 30. But none of these calls > seem to do anything, i.e framerates will still be about 45 when showing, and > 200 when the window is obscured: > > pyglet.clock.set_fps_limit(30.0) > pyglet.clock.get_default().set_fps_limit(30) > cocos.director.event_loop.clock.set_fps_limit(30) > > Running Mac OS X 10.8.2 > > > Winston Wolff > Stratolab - Games for Learning > tel: (917) 543 8852 > web: www.stratolab.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. > -- 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.
