summaryrefslogtreecommitdiff
path: root/indra/newview/lldrawpooltree.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/lldrawpooltree.cpp')
-rw-r--r--indra/newview/lldrawpooltree.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/indra/newview/lldrawpooltree.cpp b/indra/newview/lldrawpooltree.cpp
index 0d5195bdbf..facfb235c9 100644
--- a/indra/newview/lldrawpooltree.cpp
+++ b/indra/newview/lldrawpooltree.cpp
@@ -42,7 +42,6 @@
S32 LLDrawPoolTree::sDiffTex = 0;
static LLGLSLShader* shader = NULL;
-static LLTrace::BlockTimerStatHandle FTM_SHADOW_TREE("Tree Shadow");
LLDrawPoolTree::LLDrawPoolTree(LLViewerTexture *texturep) :
LLFacePool(POOL_TREE),
@@ -69,7 +68,7 @@ void LLDrawPoolTree::beginRenderPass(S32 pass)
shader = &gTreeProgram;
}
- if (gPipeline.canUseVertexShaders())
+ if (gPipeline.shadersLoaded())
{
shader->bind();
shader->setMinimumAlpha(0.5f);
@@ -78,23 +77,24 @@ void LLDrawPoolTree::beginRenderPass(S32 pass)
else
{
gPipeline.enableLightsDynamic();
- gGL.setAlphaRejectSettings(LLRender::CF_GREATER, 0.5f);
+ gGL.flush();
}
}
void LLDrawPoolTree::render(S32 pass)
{
- LL_RECORD_BLOCK_TIME(LLPipeline::sShadowRender ? FTM_SHADOW_TREE : FTM_RENDER_TREES);
+ LL_PROFILE_ZONE_SCOPED;
if (mDrawFace.empty())
{
return;
}
- LLGLState test(GL_ALPHA_TEST, LLGLSLShader::sNoFixedFunction ? 0 : 1);
+ LLGLState test(GL_ALPHA_TEST, 0);
+
+ gGL.getTexUnit(sDiffTex)->bindFast(mTexturep);
+ gPipeline.touchTexture(mTexturep, 1024.f * 1024.f); // <=== keep Linden tree textures at full res
- gGL.getTexUnit(sDiffTex)->bind(mTexturep);
-
for (std::vector<LLFace*>::iterator iter = mDrawFace.begin();
iter != mDrawFace.end(); iter++)
{
@@ -117,9 +117,8 @@ void LLDrawPoolTree::render(S32 pass)
gPipeline.mMatrixOpCount++;
}
- buff->setBuffer(LLDrawPoolTree::VERTEX_DATA_MASK);
- buff->drawRange(LLRender::TRIANGLES, 0, buff->getNumVerts()-1, buff->getNumIndices(), 0);
- gPipeline.addTrianglesDrawn(buff->getNumIndices());
+ buff->setBufferFast(LLDrawPoolTree::VERTEX_DATA_MASK);
+ buff->drawRangeFast(LLRender::TRIANGLES, 0, buff->getNumVerts()-1, buff->getNumIndices(), 0);
}
}
}
@@ -135,7 +134,7 @@ void LLDrawPoolTree::endRenderPass(S32 pass)
if (mShaderLevel <= 0)
{
- gGL.setAlphaRejectSettings(LLRender::CF_DEFAULT);
+ gGL.flush();
}
}
@@ -153,6 +152,7 @@ void LLDrawPoolTree::beginDeferredPass(S32 pass)
void LLDrawPoolTree::renderDeferred(S32 pass)
{
+ LL_PROFILE_ZONE_SCOPED;
render(pass);
}
@@ -168,7 +168,7 @@ void LLDrawPoolTree::endDeferredPass(S32 pass)
//============================================
void LLDrawPoolTree::beginShadowPass(S32 pass)
{
- LL_RECORD_BLOCK_TIME(FTM_SHADOW_TREE);
+ LL_PROFILE_ZONE_SCOPED;
glPolygonOffset(gSavedSettings.getF32("RenderDeferredTreeShadowOffset"),
gSavedSettings.getF32("RenderDeferredTreeShadowBias"));
@@ -187,7 +187,7 @@ void LLDrawPoolTree::renderShadow(S32 pass)
void LLDrawPoolTree::endShadowPass(S32 pass)
{
- LL_RECORD_BLOCK_TIME(FTM_SHADOW_TREE);
+ LL_PROFILE_ZONE_SCOPED;
glPolygonOffset(gSavedSettings.getF32("RenderDeferredSpotShadowOffset"),
gSavedSettings.getF32("RenderDeferredSpotShadowBias"));