A question about redrawing...
Posted: Mon Nov 02, 2009 8:21 pm
Hi all, I'm using LÖVE (simply amazing fw by the way, I LÖVE it ) in some kind of object oriented approach, implemented in Lua by use of metatables as described in lua-users.org tutorials. I have some independent objects on screen, every object has (as it's class dictates) a draw() method and an update() method. The question is, Do I have to control when to redraw things by myself? or the 'draw' callback does that for me. I've read the documentation about draw callback and didn't find anything like:
..thats why I'm asking about redrawing management. I hope I have been clear and thanks in advance.
Code: Select all
if(object.needsRedraw())
{
object.redraw() -- where redraw() method should turn off a redraw flag for object until next redrawing is needed.
}