History

Merge branch 'master' of https://github.com/worklist/hifi into occlusion_culling

ZappoMan committed 13 years ago

Commit 83209252 parents abb08e2 11fcd8f22 files · +365 −242Browse files

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

Unified · Split

interface/src/VoxelSystem.cpp+7−7
@@ -166,15 +166,15 @@ int VoxelSystem::parseData(unsigned char* sourceBuffer, int numBytes) { · 165 unmodified lines
166166
167167 void VoxelSystem::setupNewVoxelsForDrawing() {
168168 PerformanceWarning warn(_renderWarningsOn, "setupNewVoxelsForDrawing()"); // would like to include _voxelsInArrays, _voxelsUpdated
169− double start = usecTimestampNow();
170− double sinceLastTime = (start - _setupNewVoxelsForDrawingLastFinished) / 1000.0;
169+ long long start = usecTimestampNow();
170+ long long sinceLastTime = (start - _setupNewVoxelsForDrawingLastFinished) / 1000;
171171
172172 bool iAmDebugging = false; // if you're debugging set this to true, so you won't get skipped for slow debugging
173173 if (!iAmDebugging && sinceLastTime <= std::max(_setupNewVoxelsForDrawingLastElapsed, SIXTY_FPS_IN_MILLISECONDS)) {
174174 return; // bail early, it hasn't been long enough since the last time we ran
175175 }
176176
177− double sinceLastViewCulling = (start - _lastViewCulling) / 1000.0;
177+ long long sinceLastViewCulling = (start - _lastViewCulling) / 1000;
178178 // If the view frustum is no longer changing, but has changed, since last time, then remove nodes that are out of view
179179 if ((sinceLastViewCulling >= std::max(_lastViewCullingElapsed, VIEW_CULLING_RATE_IN_MILLISECONDS))
180180 && !isViewChanging() && hasViewChanged()) {
@@ -190,8 +190,8 @@ void VoxelSystem::setupNewVoxelsForDrawing() { · 9 unmodified lines
190190 // VBO reubuilding. Possibly we should do this only if our actual VBO usage crosses some lower boundary.
191191 cleanupRemovedVoxels();
192192
193− double endViewCulling = usecTimestampNow();
194− _lastViewCullingElapsed = (endViewCulling - start) / 1000.0;
193+ long long endViewCulling = usecTimestampNow();
194+ _lastViewCullingElapsed = (endViewCulling - start) / 1000;
195195 }
196196
197197 bool didWriteFullVBO = _writeRenderFullVBO;
@@ -227,8 +227,8 @@ void VoxelSystem::setupNewVoxelsForDrawing() { · 29 unmodified lines
227227
228228 pthread_mutex_unlock(&_bufferWriteLock);
229229
230− double end = usecTimestampNow();
231− double elapsedmsec = (end - start) / 1000.0;
230+ long long end = usecTimestampNow();
231+ long long elapsedmsec = (end - start) / 1000;
232232 _setupNewVoxelsForDrawingLastFinished = end;
233233 _setupNewVoxelsForDrawingLastElapsed = elapsedmsec;
234234 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t