On 7 November 2012 09:49, Gabriele Lanaro <
gabriel...@gmail.com> wrote:
> If I run a test code like the following I experience a window freeze (the
> close button not working anymore). The application displays the current fps
> for some time and if I, for example, click on the window I experience a
> freeze.
>
> - The problem is reproduced also on a larger scale with a complex
> application (ie this is not related to the fps display thing).
> - The problem seems to be solved (there is a performance drop) if at the end
> of the on_draw method I put a pyglet.gl.glFinish() call or, I schedule some
> call that sleeps for some time.
> - It happens only on a system (Ubuntu) with a [GeForce GTX 550 Ti] (rev a1),
> using the nvidia driver version 304.51
>
> Am I doing something wrong?
I don't believe so. Either pyglet's doing something wrong or the
driver is doing something wrong and it'd be nice if pyglet could be
more robust in the face of that.
> This is a known bug?
I think we can classify this as a "previously-unknown" bug :-)
> import pyglet
>
> w = pyglet.window.Window()
> ds = pyglet.clock.ClockDisplay()
> @w.event
> def on_draw():
> w.clear()
> ds.draw()
>
> pyglet.app.run()
That's a great, concise example of bad behaviour (it works fine on my
Mac.) It'd be great if we could nail down exactly what the problem is.
Even if it is indeed a missing glFinish - though whether that should
be included in the standard pyglet app run loop is probably
contentious.
Richard