What is the best way to clip a sprite? I used CCClippingNode but its too slow on iPhone4.. Maybe there is a way to do it? with stencil buffer or with shaders?
I have some CCRenderTexture and I want to clip it with CCSprite, where there is no alpha I don't want there to be an pixel visible, and at once I may have 5-6 such nodes and it's too slow on iPhone 4 and some android devices..
Activate Stencil:
EAGLView *__glView = [EAGLView viewWithFrame: [window bounds]
pixelFormat: kEAGLColorFormatRGBA8
depthFormat: GL_DEPTH24_STENCIL8_OES
preserveBackbuffer: NO
sharegroup: nil
multiSampling: NO
numberOfSamples: 0];
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.