cocos2d/cocos2d-iphone-extensions — pull request #124 by chschu (2013-06-18 23:48:32+00:00)
Title: CCScrollLayer: keep GL state cache synchronized in cocos2d 2.x

Setting the blend function directly with glBlendFunc leads to artifacts when other blend functions are used. This is caused by the state cache implemented in cocos2d 2.x, which is intended to avoid redundant OpenGL calls. To do so, all state changes need to go through the cache.

The state cache is enabled (CC_ENABLE_GL_STATE_CACHE is 1) by default since cocos2d 2.1.

This fix replaces the calls to glBlendFunc with ccGLBlendFunc for cocos2d 2.x.