Skip to content

Commit

Permalink
Fix 3d set but not used
Browse files Browse the repository at this point in the history
  • Loading branch information
troopa81 authored and nyalldawson committed Apr 11, 2023
1 parent d023880 commit dc7d33a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/3d/chunks/qgschunkedentity_p.cpp
Expand Up @@ -155,7 +155,9 @@ void QgsChunkedEntity::update( const SceneState &state )

update( mRootNode, state );

#ifdef QGISDEBUG
int enabled = 0, disabled = 0, unloaded = 0;
#endif

for ( QgsChunkNode *node : std::as_const( mActiveNodes ) )
{
Expand All @@ -171,7 +173,9 @@ void QgsChunkedEntity::update( const SceneState &state )
continue;
}
node->entity()->setEnabled( true );
#ifdef QGISDEBUG
++enabled;
#endif
}
}

Expand All @@ -184,7 +188,9 @@ void QgsChunkedEntity::update( const SceneState &state )
continue;
}
node->entity()->setEnabled( false );
#ifdef QGISDEBUG
++disabled;
#endif
}

double usedGpuMemory = QgsChunkedEntity::calculateEntityGpuMemorySize( this );
Expand All @@ -197,7 +203,9 @@ void QgsChunkedEntity::update( const SceneState &state )
usedGpuMemory -= QgsChunkedEntity::calculateEntityGpuMemorySize( entry->chunk->entity() );
entry->chunk->unloadChunk(); // also deletes the entry
mActiveNodes.removeOne( entry->chunk );
#ifdef QGISDEBUG
++unloaded;
#endif
}

if ( mBboxesEntity )
Expand Down

0 comments on commit dc7d33a

Please sign in to comment.