light mask

This commit is contained in:
yangxiao 2014-09-19 14:50:20 +08:00
parent dd3a312eeb
commit 5b61e569f5
2 changed files with 6 additions and 0 deletions

View File

@ -157,6 +157,7 @@ Sprite3D::Sprite3D()
: _skeleton(nullptr)
, _blend(BlendFunc::ALPHA_NON_PREMULTIPLIED)
, _aabbDirty(true)
, _lightMask(-1)
{
}

View File

@ -113,6 +113,10 @@ public:
// set cull face enable or not
void setCullFaceEnabled(bool enable);
/** light mask getter & setter, light works only when _lightmask */
void setLightMask(unsigned short mask) { _lightMask = mask; }
unsigned short getLightMask() const { return _lightMask; }
CC_CONSTRUCTOR_ACCESS:
Sprite3D();
@ -162,6 +166,7 @@ protected:
mutable AABB _aabb; // cache current aabb
mutable Mat4 _nodeToWorldTransform; // cache the matrix
bool _aabbDirty;
unsigned short _lightMask;
};
///////////////////////////////////////////////////////