diff options
| author | Tofu Linden <tofu.linden@lindenlab.com> | 2010-08-24 18:37:53 +0100 |
|---|---|---|
| committer | Tofu Linden <tofu.linden@lindenlab.com> | 2010-08-24 18:37:53 +0100 |
| commit | 6ba23344c95157793af9e4154933ae8df61630e8 (patch) | |
| tree | e12956cbe7a0082bbaaa545cb80d9e86b13f88e8 /indra/newview/lldynamictexture.cpp | |
| parent | 01d06a3572c533f810f8f42e7ae9c55051f34aaf (diff) | |
| parent | 46e6135eef90b7ff0f08b12384a9aafc1a3e91e1 (diff) | |
merge heads. whew.
Diffstat (limited to 'indra/newview/lldynamictexture.cpp')
| -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 466cb4709e..ed35546ca3 100644 --- a/indra/newview/lldynamictexture.cpp +++ b/indra/newview/lldynamictexture.cpp @@ -161,12 +161,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); } } @@ -205,11 +212,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; |
