diff options
author | Debi King (Dessie) <dessie@lindenlab.com> | 2011-08-05 19:09:28 -0400 |
---|---|---|
committer | Debi King (Dessie) <dessie@lindenlab.com> | 2011-08-05 19:09:28 -0400 |
commit | 8c5da0552db39ba6031b76ffb08994e53217a559 (patch) | |
tree | f4ac194d15a0a58475496543bbb36d587d195b4f /indra/newview/llviewerdisplay.cpp | |
parent | fce8bda3b6e502b3de9b6a34279255999478e407 (diff) | |
parent | 8675901fa85de600cc1ef7c5263a5906fd2b2811 (diff) |
merged .hgtags
Diffstat (limited to 'indra/newview/llviewerdisplay.cpp')
-rw-r--r-- | indra/newview/llviewerdisplay.cpp | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp index 911fc8e1ed..39053fe9e4 100644 --- a/indra/newview/llviewerdisplay.cpp +++ b/indra/newview/llviewerdisplay.cpp @@ -616,6 +616,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) && LLFeatureManager::getInstance()->isFeatureAvailable("UseOcclusion") && gSavedSettings.getBOOL("UseOcclusion") && gGLManager.mHasOcclusionQuery) ? 2 : 0; + LLTexUnit::sWhiteTexture = LLViewerFetchedTexture::sWhiteImagep->getTexName(); /*if (LLPipeline::sUseOcclusion && LLPipeline::sRenderDeferred) { //force occlusion on for all render types if doing deferred render (tighter shadow frustum) @@ -709,6 +710,9 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) glClear(GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT); } + LLGLState::checkStates(); + LLGLState::checkClientArrays(); + //if (!for_snapshot) { LLMemType mt_gw(LLMemType::MTYPE_DISPLAY_GEN_REFLECTION); @@ -717,6 +721,9 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) gPipeline.generateHighlight(*LLViewerCamera::getInstance()); } + LLGLState::checkStates(); + LLGLState::checkClientArrays(); + ////////////////////////////////////// // // Update images, using the image stats generated during object update/culling @@ -743,6 +750,10 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) LLImageGL::deleteDeadTextures(); stop_glerror(); } + + LLGLState::checkStates(); + LLGLState::checkClientArrays(); + /////////////////////////////////// // // StateSort @@ -770,6 +781,9 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) } } + LLGLState::checkStates(); + LLGLState::checkClientArrays(); + LLPipeline::sUseOcclusion = occlusion; { @@ -828,6 +842,9 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) LLPipeline::sUnderWaterRender = LLViewerCamera::getInstance()->cameraUnderWater() ? TRUE : FALSE; LLPipeline::refreshRenderDeferred(); + LLGLState::checkStates(); + LLGLState::checkClientArrays(); + stop_glerror(); if (to_texture) @@ -878,6 +895,14 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) stop_glerror(); } + for (U32 i = 0; i < gGLManager.mNumTextureImageUnits; i++) + { //dummy cleanup of any currently bound textures + if (gGL.getTexUnit(i)->getCurrType() != LLTexUnit::TT_NONE) + { + gGL.getTexUnit(i)->unbind(gGL.getTexUnit(i)->getCurrType()); + gGL.getTexUnit(i)->disable(); + } + } LLAppViewer::instance()->pingMainloopTimeout("Display:RenderFlush"); if (to_texture) @@ -1339,7 +1364,7 @@ void render_ui_2d() } stop_glerror(); - gGL.getTexUnit(0)->setTextureBlendType(LLTexUnit::TB_MULT); + //gGL.getTexUnit(0)->setTextureBlendType(LLTexUnit::TB_MULT); // render outline for HUD if (isAgentAvatarValid() && gAgentCamera.mHUDCurZoom < 0.98f) |