AndEngine icon indicating copy to clipboard operation
AndEngine copied to clipboard

Reduce number of glEnable and glDisable calls

Open nazgee opened this issue 13 years ago • 0 comments

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...)

nazgee avatar Oct 29 '12 21:10 nazgee