mirror of
https://github.com/overte-org/overte.git
synced 2025-08-12 18:55:08 +02:00
removed some dead code that wasn't being called/used
This commit is contained in:
parent
c5647addf4
commit
7d0418420d
2 changed files with 0 additions and 44 deletions
|
@ -79,7 +79,6 @@ VoxelSystem::VoxelSystem(float treeScale, int maxVoxels, VoxelTree* tree)
|
|||
|
||||
VoxelTreeElement::addDeleteHook(this);
|
||||
VoxelTreeElement::addUpdateHook(this);
|
||||
_abandonedVBOSlots = 0;
|
||||
_falseColorizeBySource = false;
|
||||
_dataSourceUUID = QUuid();
|
||||
_voxelServerCount = 0;
|
||||
|
@ -222,7 +221,6 @@ void VoxelSystem::clearFreeBufferIndexes() {
|
|||
bool showWarnings = Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings);
|
||||
PerformanceWarning warn(showWarnings, "clearFreeBufferIndexes()");
|
||||
_voxelsInWriteArrays = 0; // reset our VBO
|
||||
_abandonedVBOSlots = 0;
|
||||
|
||||
// clear out freeIndexes
|
||||
{
|
||||
|
@ -659,10 +657,6 @@ void VoxelSystem::setupNewVoxelsForDrawing() {
|
|||
_voxelsUpdated = newTreeToArrays(_tree->getRoot());
|
||||
_tree->clearDirtyBit(); // after we pull the trees into the array, we can consider the tree clean
|
||||
|
||||
if (_writeRenderFullVBO) {
|
||||
_abandonedVBOSlots = 0; // reset the count of our abandoned slots, why is this here and not earlier????
|
||||
}
|
||||
|
||||
_writeRenderFullVBO = false;
|
||||
} else {
|
||||
_voxelsUpdated = 0;
|
||||
|
@ -783,7 +777,6 @@ bool VoxelSystem::recreateVoxelGeometryInViewOperation(OctreeElement* element, v
|
|||
}
|
||||
|
||||
|
||||
// TODO: does cleanupRemovedVoxels() ever get called?
|
||||
// TODO: other than cleanupRemovedVoxels() is there anyplace we attempt to detect too many abandoned slots???
|
||||
void VoxelSystem::recreateVoxelGeometryInView() {
|
||||
|
||||
|
@ -850,37 +843,6 @@ void VoxelSystem::checkForCulling() {
|
|||
quint64 endViewCulling = usecTimestampNow();
|
||||
_lastViewCullingElapsed = (endViewCulling - start) / 1000;
|
||||
}
|
||||
|
||||
// Once we call cleanupRemovedVoxels() we do need to rebuild our VBOs (if anything was actually removed). So,
|
||||
// we should consider putting this someplace else... as this might be able to occur less frequently, and save us on
|
||||
// VBO reubuilding. Possibly we should do this only if our actual VBO usage crosses some lower boundary.
|
||||
cleanupRemovedVoxels();
|
||||
}
|
||||
|
||||
void VoxelSystem::cleanupRemovedVoxels() {
|
||||
PerformanceWarning warn(Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings), "cleanupRemovedVoxels()");
|
||||
// This handles cleanup of voxels that were culled as part of our regular out of view culling operation
|
||||
if (!_removedVoxels.isEmpty()) {
|
||||
if (Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings)) {
|
||||
qDebug() << "cleanupRemovedVoxels().. _removedVoxels=" << _removedVoxels.count();
|
||||
}
|
||||
while (!_removedVoxels.isEmpty()) {
|
||||
delete _removedVoxels.extract();
|
||||
}
|
||||
_writeRenderFullVBO = true; // if we remove voxels, we must update our full VBOs
|
||||
}
|
||||
|
||||
// we also might have VBO slots that have been abandoned, if too many of our VBO slots
|
||||
// are abandonded we want to rerender our full VBOs
|
||||
const float TOO_MANY_ABANDONED_RATIO = 0.5f;
|
||||
if (!_usePrimitiveRenderer && !_writeRenderFullVBO &&
|
||||
(_abandonedVBOSlots > (_voxelsInWriteArrays * TOO_MANY_ABANDONED_RATIO))) {
|
||||
if (Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings)) {
|
||||
qDebug() << "cleanupRemovedVoxels().. _abandonedVBOSlots ["
|
||||
<< _abandonedVBOSlots << "] > TOO_MANY_ABANDONED_RATIO";
|
||||
}
|
||||
_writeRenderFullVBO = true;
|
||||
}
|
||||
}
|
||||
|
||||
void VoxelSystem::copyWrittenDataToReadArraysFullVBOs() {
|
||||
|
@ -1200,9 +1162,6 @@ void VoxelSystem::init() {
|
|||
_initialMemoryUsageGPU = getFreeMemoryGPU();
|
||||
initVoxelMemory();
|
||||
|
||||
// our own _removedVoxels doesn't need to be notified of voxel deletes
|
||||
VoxelTreeElement::removeDeleteHook(&_removedVoxels);
|
||||
|
||||
}
|
||||
|
||||
void VoxelSystem::changeTree(VoxelTree* newTree) {
|
||||
|
|
|
@ -134,7 +134,6 @@ private:
|
|||
|
||||
bool _initialized;
|
||||
int _callsToTreesToArrays;
|
||||
OctreeElementBag _removedVoxels;
|
||||
|
||||
// Operation functions for tree recursion methods
|
||||
static int _nodeCount;
|
||||
|
@ -177,7 +176,6 @@ private:
|
|||
unsigned long _voxelsUpdated;
|
||||
unsigned long _voxelsInReadArrays;
|
||||
unsigned long _voxelsInWriteArrays;
|
||||
unsigned long _abandonedVBOSlots;
|
||||
|
||||
bool _writeRenderFullVBO;
|
||||
bool _readRenderFullVBO;
|
||||
|
@ -222,7 +220,6 @@ private:
|
|||
void setupFaceIndices(GLuint& faceVBOID, GLubyte faceIdentityIndices[]);
|
||||
|
||||
int newTreeToArrays(VoxelTreeElement* currentNode);
|
||||
void cleanupRemovedVoxels();
|
||||
|
||||
void copyWrittenDataToReadArrays(bool fullVBOs);
|
||||
|
||||
|
|
Loading…
Reference in a new issue