I think pyglet uses double buffering, and your problem is that the buffer
state after swap buffers is generally undefined, see
http://gamedev.stackexchange.com/questions/7316/what-is-the-contents-of-the-buffer-after-a-call-to-glswapbuffers
A possible way to sort it out can be:
. have a Framebuffer Object (FBO) as taget for your draws,
when you receive an on_draw blit the fbo over the screen
hth
On Tue, Apr 21, 2015 at 12:57 PM, pyglet_has_bugs <[email protected]>
wrote:
> Redrawing every image in my application in every call of on_draw takes too
> much time, so I updated my code to work the following way:
>
> Every time an image is modified, it is added to a queue. Every time
> on_draw is called, it iterates through the queue and draws each image. When
> the application loads, every image is added to the queue. window.clear() is
> never called.
>
> For some reason, the application keeps oscillating as I use it. After one
> update to one image, half of the displayed images vanish. After one more
> update to an image, all of the vanished images reappear, and the other half
> of them vanish. After one more update, all of the displayed images vanish,
> and the other half reappear again. I put print statements in the method
> that draws images, and it is only drawing one image every time I update an
> image. This implies to me that there are perhaps multiple graphics windows
> being drawn to.
>
> Any suggestions for where to look to fix this problem?
>
> --
> You received this message because you are subscribed to the Google Groups
> "pyglet-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/pyglet-users.
> For more options, visit https://groups.google.com/d/optout.
>
--
You received this message because you are subscribed to the Google Groups
"pyglet-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/pyglet-users.
For more options, visit https://groups.google.com/d/optout.