aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llvovolume.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/llvovolume.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/linden/indra/newview/llvovolume.cpp b/linden/indra/newview/llvovolume.cpp
index 5f7327d..bed3e13 100644
--- a/linden/indra/newview/llvovolume.cpp
+++ b/linden/indra/newview/llvovolume.cpp
@@ -2231,8 +2231,13 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
2231 std::vector<LLFace*> alpha_faces; 2231 std::vector<LLFace*> alpha_faces;
2232 U32 useage = group->mSpatialPartition->mBufferUsage; 2232 U32 useage = group->mSpatialPartition->mBufferUsage;
2233 2233
2234 U32 max_vertices = (gSavedSettings.getS32("RenderMaxVBOSize")*1024)/LLVertexBuffer::calcStride(group->mSpatialPartition->mVertexDataMask); 2234
2235 U32 max_total = (gSavedSettings.getS32("RenderMaxNodeSize")*1024)/LLVertexBuffer::calcStride(group->mSpatialPartition->mVertexDataMask); 2235 static S32* sRenderMaxVBOSize = rebind_llcontrol<S32>("RenderMaxVBOSize", &gSavedSettings, true);
2236 static S32* sRenderMaxNodeSize = rebind_llcontrol<S32>("RenderMaxNodeSize", &gSavedSettings, true);
2237
2238
2239 U32 max_vertices = ((*sRenderMaxVBOSize)*1024)/LLVertexBuffer::calcStride(group->mSpatialPartition->mVertexDataMask);
2240 U32 max_total = ((*sRenderMaxNodeSize)*1024)/LLVertexBuffer::calcStride(group->mSpatialPartition->mVertexDataMask);
2236 max_vertices = llmin(max_vertices, (U32) 65535); 2241 max_vertices = llmin(max_vertices, (U32) 65535);
2237 2242
2238 U32 cur_total = 0; 2243 U32 cur_total = 0;
@@ -2505,8 +2510,9 @@ void LLVolumeGeometryManager::rebuildMesh(LLSpatialGroup* group)
2505 2510
2506void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, std::vector<LLFace*>& faces, BOOL distance_sort) 2511void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, std::vector<LLFace*>& faces, BOOL distance_sort)
2507{ 2512{
2513 static S32* sRenderMaxVBOSize = rebind_llcontrol<S32>("RenderMaxVBOSize", &gSavedSettings, true);
2508 //calculate maximum number of vertices to store in a single buffer 2514 //calculate maximum number of vertices to store in a single buffer
2509 U32 max_vertices = (gSavedSettings.getS32("RenderMaxVBOSize")*1024)/LLVertexBuffer::calcStride(group->mSpatialPartition->mVertexDataMask); 2515 U32 max_vertices = ((*sRenderMaxVBOSize)*1024)/LLVertexBuffer::calcStride(group->mSpatialPartition->mVertexDataMask);
2510 max_vertices = llmin(max_vertices, (U32) 65535); 2516 max_vertices = llmin(max_vertices, (U32) 65535);
2511 2517
2512 if (!distance_sort) 2518 if (!distance_sort)