History

CR cleanup

ZappoMan committed 13 years ago

Commit cb5ccee1 parent ed30a031 file · +2 −4Browse files

Showing the changes to interface/src/VoxelSystem.cpp (1 of 1 file). Show all

Unified · Split

interface/src/VoxelSystem.cpp+2−4
@@ -144,19 +144,17 @@ void VoxelSystem::setupNewVoxelsForDrawing() { · 143 unmodified lines
144 }144 }
145 145
146 double sinceLastViewCulling = (start - _lastViewCulling) / 1000.0;146 double sinceLastViewCulling = (start - _lastViewCulling) / 1000.0;
147
148 // If the view frustum has changed, since last time, then remove nodes that are out of view147 // If the view frustum has changed, since last time, then remove nodes that are out of view
149 if ((sinceLastViewCulling >= std::max(_lastViewCullingElapsed, VIEW_CULLING_RATE_IN_MILLISECONDS)) && hasViewChanged()) {148 if ((sinceLastViewCulling >= std::max(_lastViewCullingElapsed, VIEW_CULLING_RATE_IN_MILLISECONDS)) && hasViewChanged()) {
150 _lastViewCulling = start;149 _lastViewCulling = start;
151 removeOutOfView();150 removeOutOfView();
152 double endViewCulling = usecTimestampNow();151 double endViewCulling = usecTimestampNow();
153 _lastViewCullingElapsed = (endViewCulling - start)/1000.0;152 _lastViewCullingElapsed = (endViewCulling - start) / 1000.0;
154 } 153 }
155 154
156 if (_tree->isDirty()) {155 if (_tree->isDirty()) {
157 PerformanceWarning warn(_renderWarningsOn, "calling... newTreeToArrays()");156 PerformanceWarning warn(_renderWarningsOn, "calling... newTreeToArrays()");
158 _callsToTreesToArrays++;157 _callsToTreesToArrays++;
159
160 if (_alwaysRenderFullVBO) {158 if (_alwaysRenderFullVBO) {
161 _voxelsInWriteArrays = 0; // reset our VBO159 _voxelsInWriteArrays = 0; // reset our VBO
162 }160 }
@@ -173,7 +171,7 @@ void VoxelSystem::setupNewVoxelsForDrawing() { · 10 unmodified lines
173 copyWrittenDataToReadArrays();171 copyWrittenDataToReadArrays();
174 172
175 double end = usecTimestampNow();173 double end = usecTimestampNow();
176 double elapsedmsec = (end - start)/1000.0;174 double elapsedmsec = (end - start) / 1000.0;
177 _setupNewVoxelsForDrawingLastFinished = end;175 _setupNewVoxelsForDrawingLastFinished = end;
178 _setupNewVoxelsForDrawingLastElapsed = elapsedmsec;176 _setupNewVoxelsForDrawingLastElapsed = elapsedmsec;
179}177}