3 #ifndef __GAF_STENCIL_MASK_SPRITE__
4 #define __GAF_STENCIL_MASK_SPRITE__
8 #define kGAFStencilMaskAlphaFilterProgramCacheKey "kGAFScrollLayerAlphaFilterProgramCacheKey"
20 GLboolean currentStencilEnabled;
21 GLuint currentStencilWriteMask;
22 GLenum currentStencilFunc;
23 GLint currentStencilRef;
24 GLuint currentStencilValueMask;
25 GLenum currentStencilFail;
26 GLenum currentStencilPassDepthFail;
27 GLenum currentStencilPassDepthPass;
33 virtual bool initWithTexture(cocos2d::Texture2D *pTexture,
const cocos2d::Rect& rect,
bool rotated);
34 static cocos2d::GLProgram * programShaderForMask();
35 virtual void draw(cocos2d::Renderer *renderer,
const cocos2d::Mat4 &transform,
bool transformUpdated)
override;
36 virtual void visit(cocos2d::Renderer *renderer,
const cocos2d::Mat4 &transform,
bool transformUpdated)
override;
38 void invalidateMaskedObjectsOrder();
40 static void updateMaskContainerOf(cocos2d::Node * node);
42 void addMaskedObject(cocos2d::Node * anObject);
43 void removeMaskedObject(cocos2d::Node * anObject);
44 void updateStencilLayer(
int newLayer);
46 void sortAllMaskedObjects();
49 cocos2d::__Array * _maskedObjects;
50 bool _isReorderMaskedObjectsDirty;
51 void _disableStencil();
54 #endif // __GAF_STENCIL_MASK_SPRITE__
Definition: GAFStencilMaskSprite.h:15
Definition: GAFSprite.h:23