improve behavior of too more than _maxVoxels

This commit is contained in:
ZappoMan 2013-10-30 14:28:32 -07:00
parent 3f9631dd53
commit 14ddb89341

View file

@ -991,7 +991,7 @@ int VoxelSystem::forceRemoveNodeFromArrays(VoxelNode* node) {
int VoxelSystem::updateNodeInArrays(VoxelNode* node, bool reuseIndex, bool forceDraw) {
// If we've run out of room, then just bail...
if (_voxelsInWriteArrays >= _maxVoxels) {
if (_voxelsInWriteArrays >= _maxVoxels && (_freeIndexes.size() == 0)) {
// We need to think about what else we can do in this case. This basically means that all of our available
// VBO slots are used up, but we're trying to render more voxels. At this point, if this happens we'll just
// not render these Voxels. We need to think about ways to keep the entire scene intact but maybe lower quality