Is there a performance benefit when the frame is not redrawn?
I'm working on a 2D O开发者_开发百科penGL chess game, and I was wondering if there is a performance gain if I were to redraw some of the squares as opposed to the whole frame?
In theory, yes, but you shouldn't worry about it. Especially in a not graphics-heavy 2D-Game like this the performance-improvement will barely be noticeable (if noticeable at all). Performance may decrease if you have a lot of overdraw; drawing a lot of transparent layers over each other.
You should first try out: how it works without drawing only specific squares, and if it really does become slow, you might think again about optimizing.
精彩评论