mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 23:36:44 +02:00
lowered voxel count so Ryan can run, and handle too many voxels case slightly more gracefully than crashing
This commit is contained in:
parent
9bde92fe78
commit
244b4a17f7
2 changed files with 6 additions and 1 deletions
|
@ -220,6 +220,11 @@ int VoxelSystem::newTreeToArrays(VoxelNode* node) {
|
||||||
}
|
}
|
||||||
|
|
||||||
int VoxelSystem::newway__updateNodeInArray(VoxelNode* node) {
|
int VoxelSystem::newway__updateNodeInArray(VoxelNode* node) {
|
||||||
|
// If we've run out of room, then just bail...
|
||||||
|
if (_voxelsInWriteArrays >= MAX_VOXELS_PER_SYSTEM) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
if (node->getShouldRender()) {
|
if (node->getShouldRender()) {
|
||||||
glm::vec3 startVertex = node->getCorner();
|
glm::vec3 startVertex = node->getCorner();
|
||||||
float voxelScale = node->getScale();
|
float voxelScale = node->getScale();
|
||||||
|
|
|
@ -19,7 +19,7 @@ const int TREE_SCALE = 128;
|
||||||
const int NUMBER_OF_CHILDREN = 8;
|
const int NUMBER_OF_CHILDREN = 8;
|
||||||
const int MAX_VOXEL_PACKET_SIZE = 1492;
|
const int MAX_VOXEL_PACKET_SIZE = 1492;
|
||||||
const int MAX_TREE_SLICE_BYTES = 26;
|
const int MAX_TREE_SLICE_BYTES = 26;
|
||||||
const int MAX_VOXELS_PER_SYSTEM = 500000;
|
const int MAX_VOXELS_PER_SYSTEM = 200000;
|
||||||
const int VERTICES_PER_VOXEL = 24;
|
const int VERTICES_PER_VOXEL = 24;
|
||||||
const int VERTEX_POINTS_PER_VOXEL = 3 * VERTICES_PER_VOXEL;
|
const int VERTEX_POINTS_PER_VOXEL = 3 * VERTICES_PER_VOXEL;
|
||||||
const int INDICES_PER_VOXEL = 3 * 12;
|
const int INDICES_PER_VOXEL = 3 * 12;
|
||||||
|
|
Loading…
Reference in a new issue