mirror of
https://github.com/overte-org/overte.git
synced 2025-04-22 17:53:32 +02:00
Merge branch 'master' of https://github.com/worklist/hifi into shadowplay
This commit is contained in:
commit
cb64103e05
1 changed files with 5 additions and 0 deletions
|
@ -510,6 +510,7 @@ void VoxelNode::storeTwoChildren(VoxelNode* childOne, VoxelNode* childTwo) {
|
|||
const int newChildCount = 2;
|
||||
_externalChildrenMemoryUsage += newChildCount * sizeof(VoxelNode*);
|
||||
_children.external = new VoxelNode*[newChildCount];
|
||||
memset(_children.external, 0, sizeof(VoxelNode*) * newChildCount);
|
||||
}
|
||||
_children.external[0] = childOne;
|
||||
_children.external[1] = childTwo;
|
||||
|
@ -620,6 +621,7 @@ void VoxelNode::storeThreeChildren(VoxelNode* childOne, VoxelNode* childTwo, Vox
|
|||
const int newChildCount = 3;
|
||||
_externalChildrenMemoryUsage += newChildCount * sizeof(VoxelNode*);
|
||||
_children.external = new VoxelNode*[newChildCount];
|
||||
memset(_children.external, 0, sizeof(VoxelNode*) * newChildCount);
|
||||
}
|
||||
_children.external[0] = childOne;
|
||||
_children.external[1] = childTwo;
|
||||
|
@ -1004,6 +1006,8 @@ void VoxelNode::setChildAtIndex(int childIndex, VoxelNode* child) {
|
|||
_childrenExternal = true;
|
||||
const int newChildCount = 4;
|
||||
_children.external = new VoxelNode*[newChildCount];
|
||||
memset(_children.external, 0, sizeof(VoxelNode*) * newChildCount);
|
||||
|
||||
_externalChildrenMemoryUsage += newChildCount * sizeof(VoxelNode*);
|
||||
|
||||
_children.external[0] = childOne;
|
||||
|
@ -1072,6 +1076,7 @@ void VoxelNode::setChildAtIndex(int childIndex, VoxelNode* child) {
|
|||
// 4 or more children, one item being added, we know we're stored externally, we just figure out where to insert
|
||||
// this child pointer into our external list
|
||||
VoxelNode** newExternalList = new VoxelNode*[newChildCount];
|
||||
memset(newExternalList, 0, sizeof(VoxelNode*) * newChildCount);
|
||||
|
||||
int copiedCount = 0;
|
||||
for (int ordinal = 1; ordinal <= newChildCount; ordinal++) {
|
||||
|
|
Loading…
Reference in a new issue