mirror of
https://github.com/overte-org/overte.git
synced 2025-04-25 14:13:47 +02:00
Fixed the major bug, which is that non-leaves were being collapsed. Update
full VBO on deletion, since otherwise we don't see the update.
This commit is contained in:
parent
4289921b7e
commit
be88fec7d3
2 changed files with 3 additions and 2 deletions
|
@ -1005,6 +1005,7 @@ void VoxelSystem::deleteVoxelAt(float x, float y, float z, float s) {
|
|||
_tree->deleteVoxelAt(x, y, z, s, true);
|
||||
|
||||
// redraw!
|
||||
_renderFullVBO = true;
|
||||
setupNewVoxelsForDrawing(); // do we even need to do this? Or will the next network receive kick in?
|
||||
|
||||
pthread_mutex_unlock(&_treeLock);
|
||||
|
|
|
@ -195,8 +195,8 @@ bool VoxelNode::collapseIdenticalLeaves() {
|
|||
bool allChildrenMatch = true; // assume the best (ottimista)
|
||||
int red,green,blue;
|
||||
for (int i = 0; i < NUMBER_OF_CHILDREN; i++) {
|
||||
// if no child, or child doesn't have a color
|
||||
if (!_children[i] || !_children[i]->isColored()) {
|
||||
// if no child, child isn't a leaf, or child doesn't have a color
|
||||
if (!_children[i] || !_children[i]->isLeaf() || !_children[i]->isColored()) {
|
||||
allChildrenMatch=false;
|
||||
//printLog("SADNESS child missing or not colored! i=%d\n",i);
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue