History

put back the missing voxels

Stephen Birarda committed 13 years ago

Commit 4ed23161 parent a16c5a93 files · +9 −9Browse files

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

Unified · Split

interface/src/VoxelSystem.cpp+3−3
@@ -170,16 +170,16 @@ int VoxelSystem::parseData(unsigned char* sourceBuffer, int numBytes) { · 169 unmodified lines
170170 void VoxelSystem::setupNewVoxelsForDrawing() {
171171 PerformanceWarning warn(_renderWarningsOn, "setupNewVoxelsForDrawing()"); // would like to include _voxelsInArrays, _voxelsUpdated
172172 uint64_t start = usecTimestampNow();
173− int sinceLastTime = (start - _setupNewVoxelsForDrawingLastFinished) / 1000;
173+ uint64_t sinceLastTime = (start - _setupNewVoxelsForDrawingLastFinished) / 1000;
174174
175175 bool iAmDebugging = false; // if you're debugging set this to true, so you won't get skipped for slow debugging
176− if (!iAmDebugging && sinceLastTime <= std::max(_setupNewVoxelsForDrawingLastElapsed, SIXTY_FPS_IN_MILLISECONDS)) {
176+ if (!iAmDebugging && sinceLastTime <= std::max((float) _setupNewVoxelsForDrawingLastElapsed, SIXTY_FPS_IN_MILLISECONDS)) {
177177 return; // bail early, it hasn't been long enough since the last time we ran
178178 }
179179
180180 int sinceLastViewCulling = (start - _lastViewCulling) / 1000;
181181 // If the view frustum is no longer changing, but has changed, since last time, then remove nodes that are out of view
182− if ((sinceLastViewCulling >= std::max(_lastViewCullingElapsed, VIEW_CULLING_RATE_IN_MILLISECONDS))
182+ if ((sinceLastViewCulling >= std::max((float) _lastViewCullingElapsed, VIEW_CULLING_RATE_IN_MILLISECONDS))
183183 && !isViewChanging() && hasViewChanged()) {
184184 _lastViewCulling = start;
185185