From 536e38ad51b89808f26d8e3cd107fe093862d22a Mon Sep 17 00:00:00 2001 From: David Parks Date: Tue, 22 Sep 2009 11:11:45 +0000 Subject: Merging render-pipeline-6-qa-2 into viewer-2 Self reviewed. --- indra/newview/lldrawpoolbump.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'indra/newview/lldrawpoolbump.cpp') diff --git a/indra/newview/lldrawpoolbump.cpp b/indra/newview/lldrawpoolbump.cpp index 331ba67d36..f581f2c402 100644 --- a/indra/newview/lldrawpoolbump.cpp +++ b/indra/newview/lldrawpoolbump.cpp @@ -572,6 +572,8 @@ BOOL LLDrawPoolBump::bindBumpMap(LLDrawInfo& params, S32 channel) LLViewerTexture* bump = NULL; U8 bump_code = params.mBump; + + //Note: texture atlas does not support bump texture now. LLViewerFetchedTexture* tex = LLViewerTextureManager::staticCastToFetchedTexture(params.mTexture) ; if(!tex) { @@ -831,7 +833,7 @@ void LLBumpImageList::updateImages() if( image ) { BOOL destroy = TRUE; - if( image->hasValidGLTexture()) + if( image->hasGLTexture()) { if( image->getBoundRecently() ) { @@ -858,7 +860,7 @@ void LLBumpImageList::updateImages() if( image ) { BOOL destroy = TRUE; - if( image->hasValidGLTexture()) + if( image->hasGLTexture()) { if( image->getBoundRecently() ) { @@ -963,7 +965,7 @@ void LLBumpImageList::onSourceStandardLoaded( BOOL success, LLViewerFetchedTextu LLPointer nrm_image = new LLImageRaw(src->getWidth(), src->getHeight(), 4); generateNormalMapFromAlpha(src, nrm_image); src_vi->setExplicitFormat(GL_RGBA, GL_RGBA); - src_vi->createGLTexture(0, nrm_image); + src_vi->createGLTexture(src_vi->getDiscardLevel(), nrm_image); } } @@ -1147,14 +1149,14 @@ void LLBumpImageList::onSourceLoaded( BOOL success, LLViewerTexture *src_vi, LLI if (!LLPipeline::sRenderDeferred) { bump->setExplicitFormat(GL_ALPHA8, GL_ALPHA); - bump->createGLTexture(0, dst_image); + bump->createGLTexture(bump->getDiscardLevel(), dst_image); } else { LLPointer nrm_image = new LLImageRaw(src->getWidth(), src->getHeight(), 4); generateNormalMapFromAlpha(src, nrm_image); bump->setExplicitFormat(GL_RGBA, GL_RGBA); - bump->createGLTexture(0, nrm_image); + bump->createGLTexture(bump->getDiscardLevel(), nrm_image); } @@ -1216,7 +1218,7 @@ void LLDrawPoolBump::pushBatch(LLDrawInfo& params, U32 mask, BOOL texture) if (params.mTexture.notNull()) { gGL.getTexUnit(diffuse_channel)->bind(params.mTexture) ; - params.mTexture->addTextureStats(params.mVSize); + params.mTexture->addTextureStats(params.mVSize); } else { -- cgit v1.2.3 From b5724bc0e97328a1859fc52b444e0a2edec255dd Mon Sep 17 00:00:00 2001 From: Martin Reddy Date: Fri, 25 Sep 2009 16:51:25 +0000 Subject: SNOW-194 DEV-40415: pulling this snowglobe patch into viewer 2.0. This fixes all of the parentheses warnings in the code. Original patch was reviewed by merov (and others). --- indra/newview/lldrawpoolbump.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'indra/newview/lldrawpoolbump.cpp') diff --git a/indra/newview/lldrawpoolbump.cpp b/indra/newview/lldrawpoolbump.cpp index f581f2c402..e087feeaec 100644 --- a/indra/newview/lldrawpoolbump.cpp +++ b/indra/newview/lldrawpoolbump.cpp @@ -309,8 +309,8 @@ void LLDrawPoolBump::endRenderPass(S32 pass) void LLDrawPoolBump::beginShiny(bool invisible) { LLFastTimer t(FTM_RENDER_SHINY); - if (!invisible && !gPipeline.hasRenderBatches(LLRenderPass::PASS_SHINY)|| - invisible && !gPipeline.hasRenderBatches(LLRenderPass::PASS_INVISI_SHINY)) + if ((!invisible && !gPipeline.hasRenderBatches(LLRenderPass::PASS_SHINY))|| + (invisible && !gPipeline.hasRenderBatches(LLRenderPass::PASS_INVISI_SHINY))) { return; } @@ -384,8 +384,8 @@ void LLDrawPoolBump::beginShiny(bool invisible) void LLDrawPoolBump::renderShiny(bool invisible) { LLFastTimer t(FTM_RENDER_SHINY); - if (!invisible && !gPipeline.hasRenderBatches(LLRenderPass::PASS_SHINY)|| - invisible && !gPipeline.hasRenderBatches(LLRenderPass::PASS_INVISI_SHINY)) + if ((!invisible && !gPipeline.hasRenderBatches(LLRenderPass::PASS_SHINY))|| + (invisible && !gPipeline.hasRenderBatches(LLRenderPass::PASS_INVISI_SHINY))) { return; } @@ -411,8 +411,8 @@ void LLDrawPoolBump::renderShiny(bool invisible) void LLDrawPoolBump::endShiny(bool invisible) { LLFastTimer t(FTM_RENDER_SHINY); - if (!invisible && !gPipeline.hasRenderBatches(LLRenderPass::PASS_SHINY)|| - invisible && !gPipeline.hasRenderBatches(LLRenderPass::PASS_INVISI_SHINY)) + if ((!invisible && !gPipeline.hasRenderBatches(LLRenderPass::PASS_SHINY))|| + (invisible && !gPipeline.hasRenderBatches(LLRenderPass::PASS_INVISI_SHINY))) { return; } -- cgit v1.2.3