On 12/16/08, Alex_Gaynor <[email protected]> wrote: > > I have an application that changes the state of the screen, and then > needs to do some calculations on the new state(this is an > implementation of http://alteredqualia.com/visualization/evolve/ ). > Basically it alters the color or shape of a polygon and then needs to > compare the new resultant screen to the original image to see if it's > an improvement. But this doesn't work with me just doing all that > work in on_draw on the window. Any thoughts on how to better > architect this? You can see all the code here: > http://github.com/alex/evolves/tree/master
It sounds like you're trying to draw something into a window, grab a screenshot, do some more work, and repeat. Make sure you don't flip the window in between drawing and grabbing the screenshot -- by default pyglet grabs the back buffer. Call glFinish() before grabbing the screenshot to ensure the GPU pipe is flushed. Alex. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
