set_fps_limit can't really do its job in the pyglet 1.1-style loop.
An equivalent and better performing solution is to delete the call to
set_fps_limit, and instead schedule your update function at the
desired rate:
clock.schedule_interval(update, 1/30.0)
I imagine this will solve your framerate issue under pyglet 1.1. I'll
have a look and see if there's an easy fix for set_fps_limit,
otherwise I'll probably mark it deprecated in the future.
Alex.
pyglet assumes that the window needs to be repainted after any event,
including mouse events. You can override this by setting
window.invalid=False during your on_draw() handler. This prevents
on_draw being called again until invalid is set to True (for example,
during your update() function). This is a
new/experimental/undocumented feature.
> I am still seeing tearing.
Try:
python tests/test.py WINDOW_SET_VSYNC
which should make it abundantly clear whether or not your video card
supports vsync.
Alex.