Showing the changes to interface/src/VoxelSystem.cpp (1 of 1 file). Show all
Unified · Split
| @@ -372,7 +372,10 @@ int VoxelSystem::updateNodeInArraysAsFullVBO(VoxelNode* node) { · 371 unmodified lines | |||
| 372 | _writeVoxelDirtyArray[nodeIndex] = true; // just in case we switch to Partial mode | 372 | _writeVoxelDirtyArray[nodeIndex] = true; // just in case we switch to Partial mode |
| 373 | _voxelsInWriteArrays++; // our know vertices in the arrays | 373 | _voxelsInWriteArrays++; // our know vertices in the arrays |
| 374 | return 1; // rendered | 374 | return 1; // rendered |
| 375 | } | 375 | } else { |
| 376 | node->setBufferIndex(GLBUFFER_INDEX_UNKNOWN); | ||
| 377 | } | ||
| 378 | |||
| 376 | return 0; // not-rendered | 379 | return 0; // not-rendered |
| 377 | } | 380 | } |
| 378 | 381 | ||
| @@ -978,6 +981,7 @@ public: · 599 unmodified lines | |||
| 978 | shouldRenderNodes(0), | 981 | shouldRenderNodes(0), |
| 979 | coloredNodes(0), | 982 | coloredNodes(0), |
| 980 | nodesInVBO(0), | 983 | nodesInVBO(0), |
| 984 | nodesInVBONotShouldRender(0), | ||
| 981 | nodesInVBOOverExpectedMax(0), | 985 | nodesInVBOOverExpectedMax(0), |
| 982 | duplicateVBOIndex(0), | 986 | duplicateVBOIndex(0), |
| 983 | leafNodes(0) | 987 | leafNodes(0) |
| @@ -990,6 +994,7 @@ public: · 6 unmodified lines | |||
| 990 | unsigned long shouldRenderNodes; | 994 | unsigned long shouldRenderNodes; |
| 991 | unsigned long coloredNodes; | 995 | unsigned long coloredNodes; |
| 992 | unsigned long nodesInVBO; | 996 | unsigned long nodesInVBO; |
| 997 | unsigned long nodesInVBONotShouldRender; | ||
| 993 | unsigned long nodesInVBOOverExpectedMax; | 998 | unsigned long nodesInVBOOverExpectedMax; |
| 994 | unsigned long duplicateVBOIndex; | 999 | unsigned long duplicateVBOIndex; |
| 995 | unsigned long leafNodes; | 1000 | unsigned long leafNodes; |
| @@ -1032,6 +1037,11 @@ bool VoxelSystem::collectStatsForTreesAndVBOsOperation(VoxelNode* node, void* ex · 36 unmodified lines | |||
| 1032 | if (nodeIndex > args->expectedMax) { | 1037 | if (nodeIndex > args->expectedMax) { |
| 1033 | args->nodesInVBOOverExpectedMax++; | 1038 | args->nodesInVBOOverExpectedMax++; |
| 1034 | } | 1039 | } |
| 1040 | |||
| 1041 | // if it's in VBO but not-shouldRender, track that also... | ||
| 1042 | if (!node->getShouldRender()) { | ||
| 1043 | args->nodesInVBONotShouldRender++; | ||
| 1044 | } | ||
| 1035 | } | 1045 | } |
| 1036 | 1046 | ||
| 1037 | return true; // keep going! | 1047 | return true; // keep going! |
| @@ -1060,8 +1070,8 @@ void VoxelSystem::collectStatsForTreesAndVBOs() { · 22 unmodified lines | |||
| 1060 | printLog("stats: total %ld, leaves %ld, dirty %ld, colored %ld, shouldRender %ld, inVBO %ld\n", | 1070 | printLog("stats: total %ld, leaves %ld, dirty %ld, colored %ld, shouldRender %ld, inVBO %ld\n", |
| 1061 | args.totalNodes, args.leafNodes, args.dirtyNodes, args.coloredNodes, args.shouldRenderNodes); | 1071 | args.totalNodes, args.leafNodes, args.dirtyNodes, args.coloredNodes, args.shouldRenderNodes); |
| 1062 | 1072 | ||
| 1063 | printLog("inVBO %ld, nodesInVBOOverExpectedMax %ld, duplicateVBOIndex %ld\n", | 1073 | printLog("inVBO %ld, nodesInVBOOverExpectedMax %ld, duplicateVBOIndex %ld, nodesInVBONotShouldRender %ld\n", |
| 1064 | args.nodesInVBO, args.nodesInVBOOverExpectedMax, args.duplicateVBOIndex); | 1074 | args.nodesInVBO, args.nodesInVBOOverExpectedMax, args.duplicateVBOIndex, args.nodesInVBONotShouldRender); |
| 1065 | 1075 | ||
| 1066 | glBufferIndex minInVBO = GLBUFFER_INDEX_UNKNOWN; | 1076 | glBufferIndex minInVBO = GLBUFFER_INDEX_UNKNOWN; |
| 1067 | glBufferIndex maxInVBO = 0; | 1077 | glBufferIndex maxInVBO = 0; |