aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llvotree.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/newview/llvotree.cpp')
-rw-r--r--linden/indra/newview/llvotree.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/linden/indra/newview/llvotree.cpp b/linden/indra/newview/llvotree.cpp
index 208086f..6a59253 100644
--- a/linden/indra/newview/llvotree.cpp
+++ b/linden/indra/newview/llvotree.cpp
@@ -324,7 +324,7 @@ U32 LLVOTree::processUpdateMessage(LLMessageSystem *mesgsys,
324 // 324 //
325 // Load Species-Specific data 325 // Load Species-Specific data
326 // 326 //
327 mTreeImagep = gImageList.getImageFromFile(sSpeciesTable[mSpecies]->mTextureName); 327 mTreeImagep = gImageList.getImageFromFile(sSpeciesTable[mSpecies]->mTextureName, TRUE, TRUE, 0, 0, sSpeciesTable[mSpecies]->mTextureID);
328 if (mTreeImagep) 328 if (mTreeImagep)
329 { 329 {
330 gGL.getTexUnit(0)->bind(mTreeImagep.get()); 330 gGL.getTexUnit(0)->bind(mTreeImagep.get());
@@ -359,8 +359,10 @@ BOOL LLVOTree::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time)
359 { 359 {
360 return TRUE; 360 return TRUE;
361 } 361 }
362
363 static BOOL* sRenderAnimateTrees = rebind_llcontrol<BOOL>("RenderAnimateTrees", &gSavedSettings, true);
362 364
363 if (gSavedSettings.getBOOL("RenderAnimateTrees")) 365 if (*sRenderAnimateTrees)
364 { 366 {
365 F32 mass_inv; 367 F32 mass_inv;
366 368
@@ -403,7 +405,7 @@ BOOL LLVOTree::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time)
403 } 405 }
404 } 406 }
405 407
406 if (!gSavedSettings.getBOOL("RenderAnimateTrees")) 408 if (!*sRenderAnimateTrees)
407 { 409 {
408 if (mReferenceBuffer.isNull()) 410 if (mReferenceBuffer.isNull())
409 { 411 {
@@ -548,8 +550,8 @@ BOOL LLVOTree::updateGeometry(LLDrawable *drawable)
548 max_indices += sLODIndexCount[lod]; 550 max_indices += sLODIndexCount[lod];
549 max_vertices += sLODVertexCount[lod]; 551 max_vertices += sLODVertexCount[lod];
550 } 552 }
551 553 static BOOL* sRenderAnimateTrees = rebind_llcontrol<BOOL>("RenderAnimateTrees", &gSavedSettings, true);
552 mReferenceBuffer = new LLVertexBuffer(LLDrawPoolTree::VERTEX_DATA_MASK, gSavedSettings.getBOOL("RenderAnimateTrees") ? GL_STATIC_DRAW_ARB : 0); 554 mReferenceBuffer = new LLVertexBuffer(LLDrawPoolTree::VERTEX_DATA_MASK, *sRenderAnimateTrees ? GL_STATIC_DRAW_ARB : 0);
553 mReferenceBuffer->allocateBuffer(max_vertices, max_indices, TRUE); 555 mReferenceBuffer->allocateBuffer(max_vertices, max_indices, TRUE);
554 556
555 LLStrider<LLVector3> vertices; 557 LLStrider<LLVector3> vertices;
@@ -852,8 +854,8 @@ BOOL LLVOTree::updateGeometry(LLDrawable *drawable)
852 llassert(vertex_count == max_vertices); 854 llassert(vertex_count == max_vertices);
853 llassert(index_count == max_indices); 855 llassert(index_count == max_indices);
854 } 856 }
855 857 static BOOL* sRenderAnimateTrees = rebind_llcontrol<BOOL>("RenderAnimateTrees", &gSavedSettings, true);
856 if (gSavedSettings.getBOOL("RenderAnimateTrees")) 858 if (*sRenderAnimateTrees)
857 { 859 {
858 mDrawable->getFace(0)->mVertexBuffer = mReferenceBuffer; 860 mDrawable->getFace(0)->mVertexBuffer = mReferenceBuffer;
859 } 861 }