summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorPtolemy <ptolemy@lindenlab.com>2020-03-12 18:45:02 -0700
committerPtolemy <ptolemy@lindenlab.com>2020-03-12 18:58:59 -0700
commit2b0b3e86258bef6d4b8a51c519626b9492200025 (patch)
treecf80e2573d41199ac9ea0fef65225b1afe34f1bc /indra
parentb67df8184f273294b1703df25b012dfa0ad36d28 (diff)
SL-12781 Remove expensive and redundant z clear; instead enable/disable z test for background and model preview
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llfloatermodelpreview.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp
index d808d4588a..8a894c4ec8 100644
--- a/indra/newview/llfloatermodelpreview.cpp
+++ b/indra/newview/llfloatermodelpreview.cpp
@@ -3645,10 +3645,9 @@ BOOL LLModelPreview::render()
S32 width = getWidth();
S32 height = getHeight();
- LLGLSUIDefault def;
+ LLGLSUIDefault def; // GL_BLEND, GL_ALPHA_TEST, GL_CULL_FACE, depth test
LLGLDisable no_blend(GL_BLEND);
- LLGLEnable cull(GL_CULL_FACE);
- LLGLDepthTest depth(GL_TRUE);
+ LLGLDepthTest depth(GL_FALSE); // SL-12781 disable z-buffer to render background color
LLGLDisable fog(GL_FOG);
{
@@ -3761,7 +3760,7 @@ BOOL LLModelPreview::render()
F32 explode = mFMP->childGetValue("physics_explode").asReal();
- glClear(GL_DEPTH_BUFFER_BIT);
+ LLGLDepthTest gls_depth(GL_TRUE); // SL-12781 re-enable z-buffer for 3D model preview
LLRect preview_rect;