Closed mplooster closed 5 years ago
I was thinking something along the same lines of having a new base class but didn't want ot bring it up in the review. Happy for the change. We can finish up this PR and put it on the TODO list. I don't mind the name, GraphicsBase is good - or perhaps Drawable? I think the drawComplete should be moved into the draw functions themselves. requestDraw -> redraw is good with me. Or perhaps even requestRedraw. I just want it explicit that it is a redrawing and not just drawing once. I dunno, just makes more sense to me.
Added checks to only draw in the render window if something in the graphics have changed. Otherwise, it was always redrawing the same scene as fast as it could (but below the maximum frame rate). This change greatly improves responsiveness, and helps save some CPU time because it is no longer constantly drawing.