AndEngine
AndEngine copied to clipboard
Reduce number of glEnable and glDisable calls
There is no reason for postDraw() to disable blending on every call. It will be enough if Shape makes sure that it has the correct blending setting in preDraw() method.
Since 99% of Shapes are drawn with blending enabled, applying this patch substantially reduces number of redundant JNI calls, and (hopefully) improves overall performance.
(previous version of this pull request was accidentally removed with my latest copy-paste failure...)