diff options
author | Xiaohong Bao <bao@lindenlab.com> | 2010-08-23 16:19:50 -0600 |
---|---|---|
committer | Xiaohong Bao <bao@lindenlab.com> | 2010-08-23 16:19:50 -0600 |
commit | 94a454e3251dac9fb83d4418fffa75b5d563076d (patch) | |
tree | 8d34987e0f0727eb3e8892f6354c1c81481b0dc0 /indra/newview | |
parent | 4eb1e2356f2c3103b7bd550b9fccf5d41791dc08 (diff) | |
parent | beb965772c97f781aac5657a014c2b43909333b7 (diff) |
Automated merge with ssh://hg.lindenlab.com/q/viewer-release
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/lldynamictexture.cpp | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/indra/newview/lldynamictexture.cpp b/indra/newview/lldynamictexture.cpp index bb4e6c7a3e..a460a4f618 100644 --- a/indra/newview/lldynamictexture.cpp +++ b/indra/newview/lldynamictexture.cpp @@ -167,12 +167,19 @@ void LLViewerDynamicTexture::postRender(BOOL success) { generateGLTexture() ; } - if(!mGLTexturep->getHasGLTexture()) + else if(!mGLTexturep->getHasGLTexture()) + { + generateGLTexture() ; + } + else if(mGLTexturep->getDiscardLevel() != 0)//do not know how it happens, but regenerate one if it does. { generateGLTexture() ; } - llcallstacks << "class type: " << (S32)getType() << llcallstacksendl ; + if(gGLManager.mDebugGPU) + { + LLGLState::dumpStates() ; + } success = mGLTexturep->setSubImageFromFrameBuffer(0, 0, mOrigin.mX, mOrigin.mY, mFullWidth, mFullHeight); } } @@ -211,11 +218,16 @@ BOOL LLViewerDynamicTexture::updateAllInstances() { LLViewerDynamicTexture *dynamicTexture = *iter; if (dynamicTexture->needsRender()) - { + { + if(gGLManager.mDebugGPU) + { + llinfos << "class type: " << (S32)dynamicTexture->getType() << llendl; + LLGLState::dumpStates() ; + } + glClear(GL_DEPTH_BUFFER_BIT); gDepthDirty = TRUE; - - + gGL.color4f(1,1,1,1); dynamicTexture->preRender(); // Must be called outside of startRender() result = FALSE; |