Screen overwriting

In other environment like Proce55ing, you can easily draw over the stage without the necessity of having to redraw the stage from scratch. This can be, for instance, very useful when you do generative compositions. Is there a simple way to do the same with OF? I remember, during the workshop I attended last summer, that was quite odd, but maybe something has changed.

Thanks, chr

I am just working on that problem right this very moment!

I put that ability in the code just now for the next release, it seems to work fine fullscreen, but window mode is not exactly kind to not redrawing the screen. We are hoping to add that feature (non-auto background) this next round, and we agree that it would be pretty useful. alot changed since the summer, including, I think, the underlying windowing library –

thanks much for the feedback, it’s very much apreciated.

best,
zach

we’ve added that feature, but only for full screen for now. We couldn’t get it to work with the window across all machines.

you can say:

  
  
void setup(){  
ofSetBackgroundAuto(false);  // ok don't draw bg every frame!  
ofBackground(255,255,255); // now it's manually, so do it at least once  
}  
  

then you shouldn’t clear the screen.

if you want to slowly fade the screen, you can do something like:

  
  
void draw(){  
ofEnableAlphaBlending();  
ofSetColor(255,255,255,40);  
ofRect(0,0,ofGetHeight(), ofGetWidth());  
}  
  

this is pretty new / experimental / not very well tested, so can you let us know if that works for you?

thanks!
zach