Quantcast
Channel: Processing Forum
Viewing all articles
Browse latest Browse all 1768

Re : Sketch lagging

$
0
0

Is there a way to get the rect() to be rendered before the draw() is complete?
I still have an impression you haven't figured out how
& especially when Processing renders a screen frame! 

Every drawing you do is actually stored inside a PGraphics instance kept by variable g.
This is called a screen or blit buffer.

Only when draw() is finished, Processing calls a hidden function called run(),
which is therefore tasked to render a screen frame based on that PGraphics most current state!

What it means is that if you draw something that gets in the way of another drawing,
no 1 will notice that happening, for the screen stays still until the end of draw()!  

Here's a post which dealt w/ something similar to yours:
http://forum.processing.org/topic/saveframe-only-capturing-background-image

Viewing all articles
Browse latest Browse all 1768

Trending Articles