History

remove the VBO transfer frequency tests

Stephen Birarda committed 13 years ago

Commit f38df551 parent 3135d502 files · +2 −9Browse files

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

Unified · Split

interface/src/VoxelSystem.cpp+1−7
@@ -40,8 +40,6 @@ VoxelSystem::VoxelSystem() { · 39 unmodified lines
40 voxelsRendered = 0;40 voxelsRendered = 0;
41 tree = new VoxelTree();41 tree = new VoxelTree();
42 pthread_mutex_init(&bufferWriteLock, NULL);42 pthread_mutex_init(&bufferWriteLock, NULL);
43 lastBufferCopy.tv_sec = 0;
44 lastBufferCopy.tv_usec = 0;
45}43}
46 44
47VoxelSystem::~VoxelSystem() { 45VoxelSystem::~VoxelSystem() {
@@ -233,9 +231,7 @@ void VoxelSystem::render() { · 185 unmodified lines
233 231
234 glPushMatrix();232 glPushMatrix();
235 233
236 double timeSinceLastDraw = usecTimestampNow() - usecTimestamp(&lastBufferCopy);234 if (readVerticesEndPointer != readVerticesArray) {
237 if (readVerticesEndPointer != readVerticesArray && timeSinceLastDraw >= 500 * 1000) {
238 printf("The time since the last draw was %f\n", timeSinceLastDraw);
239 // try to lock on the buffer write235 // try to lock on the buffer write
240 // just avoid pulling new data if it is currently being written236 // just avoid pulling new data if it is currently being written
241 if (pthread_mutex_trylock(&bufferWriteLock) == 0) {237 if (pthread_mutex_trylock(&bufferWriteLock) == 0) {
@@ -252,8 +248,6 @@ void VoxelSystem::render() { · 10 unmodified lines
252 248
253 pthread_mutex_unlock(&bufferWriteLock);249 pthread_mutex_unlock(&bufferWriteLock);
254 }250 }
255
256 gettimeofday(&lastBufferCopy, NULL);
257 }251 }
258 252
259 // tell OpenGL where to find vertex and color information253 // tell OpenGL where to find vertex and color information