I’ve been working with Allegro 4 for a while and I’m trying to follow the same principles I use, in openFrameworks. In Allegro, when I want an object to redraw itself I do the following:
if(someObject->needsRedraw())
{
someObject->draw();
// Wait for the next redraw signaling from somewhere...
someObject->redraw(false);
}
…the screen keeps ‘dirty’ and I have full control of the background and where and when something has to be blitted on screen.
Now, I can’t get the same result in OF because the background gets cleared automatically on every frame and after the first blit the screen goes gray again. I tried ofSetBackgroundAuto(false) at the application setup() but if I add that, the object doesn’t draw at all.
Is there a way to acheive what I’m trying to do? Do I have to manipulate some clip area per object draw?
Can anybody give me a hint on this? Thank you.