axmol/cocos/2d/GroupCommand.cpp

36 lines
463 B
C++
Raw Normal View History

2013-11-14 09:31:12 +08:00
//
// Created by NiTe Luo on 11/13/13.
//
#include "GroupCommand.h"
NS_CC_BEGIN
2013-11-15 02:35:28 +08:00
GroupCommand::GroupCommand(int viewport, int32_t depth)
2013-11-14 09:31:12 +08:00
:RenderCommand()
, _viewport(viewport)
, _depth(depth)
{
_type = GROUP_COMMAND;
}
GroupCommand::~GroupCommand()
{
}
int64_t GroupCommand::generateID()
{
_id = 0;
_id = (int64_t)_viewport << 61
| (int64_t)1 << 60 // translucent
| (int64_t)_depth << 36;
return _id;
}
NS_CC_END