mirror of https://github.com/axmolengine/axmol.git
light mask
This commit is contained in:
parent
dd3a312eeb
commit
5b61e569f5
|
@ -157,6 +157,7 @@ Sprite3D::Sprite3D()
|
||||||
: _skeleton(nullptr)
|
: _skeleton(nullptr)
|
||||||
, _blend(BlendFunc::ALPHA_NON_PREMULTIPLIED)
|
, _blend(BlendFunc::ALPHA_NON_PREMULTIPLIED)
|
||||||
, _aabbDirty(true)
|
, _aabbDirty(true)
|
||||||
|
, _lightMask(-1)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -113,6 +113,10 @@ public:
|
||||||
// set cull face enable or not
|
// set cull face enable or not
|
||||||
void setCullFaceEnabled(bool enable);
|
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:
|
CC_CONSTRUCTOR_ACCESS:
|
||||||
|
|
||||||
Sprite3D();
|
Sprite3D();
|
||||||
|
@ -162,6 +166,7 @@ protected:
|
||||||
mutable AABB _aabb; // cache current aabb
|
mutable AABB _aabb; // cache current aabb
|
||||||
mutable Mat4 _nodeToWorldTransform; // cache the matrix
|
mutable Mat4 _nodeToWorldTransform; // cache the matrix
|
||||||
bool _aabbDirty;
|
bool _aabbDirty;
|
||||||
|
unsigned short _lightMask;
|
||||||
};
|
};
|
||||||
|
|
||||||
///////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////
|
||||||
|
|
Loading…
Reference in New Issue