| 42 | } |
| 43 | |
| 44 | int GroupCommandManager::getGroupID() |
| 45 | { |
| 46 | // Reuse old id |
| 47 | if (!_unusedIDs.empty()) |
| 48 | { |
| 49 | int groupID = *_unusedIDs.rbegin(); |
| 50 | _unusedIDs.pop_back(); |
| 51 | _groupMapping[groupID] = true; |
| 52 | return groupID; |
| 53 | } |
| 54 | |
| 55 | // Create new ID |
| 56 | // int newID = _groupMapping.size(); |
| 57 | int newID = Director::getInstance()->getRenderer()->createRenderQueue(); |
| 58 | _groupMapping[newID] = true; |
| 59 | |
| 60 | return newID; |
| 61 | } |
| 62 | |
| 63 | void GroupCommandManager::releaseGroupID(int groupID) |
| 64 | { |
no test coverage detected