TINYGL: Added a way to optionally restore the state after a draw call.
TINYGL: Added an outline rectangle drawing function inside zrect.
TINYGL: Added an utility function that gives the size of a previously loaded blitImage.
TINYGL: Added stub implementation for draw call dirty region detection.
TINYGL: Implemented debug rendering of dirty regions
TINYGL: Reordered a function call inside Grim engine.
Explanation: luaUpdate destroys shadow mask buffers which in turn makes the program crash, this was the only solution I could come up with but I'm not sure if it has any side effects.
TINYGL/HACK: This commit is just an hack that makes the fps counter rendered correctly.
I will probably remove this after everything is finished.