diff options
author | Dave Parks <davep@lindenlab.com> | 2011-09-20 00:54:37 -0500 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2011-09-20 00:54:37 -0500 |
commit | 9ea41c8094695365bc7ea10165ffd54cda204e88 (patch) | |
tree | e5a02d1c64b70181516d936da07a75fc9caefc7d /indra/newview/llfloatermodelpreview.cpp | |
parent | 2ead1691317e9bf32e996fa1f6a70f6a2a9ced02 (diff) |
SH-2243 No deprecated calls for the whole session.
Diffstat (limited to 'indra/newview/llfloatermodelpreview.cpp')
-rwxr-xr-x | indra/newview/llfloatermodelpreview.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp index 6412a573f5..4e06fb434a 100755 --- a/indra/newview/llfloatermodelpreview.cpp +++ b/indra/newview/llfloatermodelpreview.cpp @@ -102,6 +102,7 @@ #include "llviewerobjectlist.h" #include "llanimationstates.h" #include "llviewernetwork.h" +#include "llviewershadermgr.h" #include "glod/glod.h" #include <boost/algorithm/string.hpp> @@ -4729,6 +4730,8 @@ BOOL LLModelPreview::render() LLMutexLock lock(this); mNeedsUpdate = FALSE; + bool use_shaders = LLGLSLShader::sNoFixedFunction; + bool edges = mViewOption["show_edges"]; bool joint_positions = mViewOption["show_joint_positions"]; bool skin_weight = mViewOption["show_skin_weight"]; @@ -4745,6 +4748,10 @@ BOOL LLModelPreview::render() LLGLDisable fog(GL_FOG); { + if (use_shaders) + { + gUIProgram.bind(); + } //clear background to blue gGL.matrixMode(LLRender::MM_PROJECTION); gGL.pushMatrix(); @@ -4764,6 +4771,10 @@ BOOL LLModelPreview::render() gGL.matrixMode(LLRender::MM_MODELVIEW); gGL.popMatrix(); + if (use_shaders) + { + gUIProgram.unbind(); + } } LLFloaterModelPreview* fmp = LLFloaterModelPreview::sInstance; @@ -4895,6 +4906,11 @@ BOOL LLModelPreview::render() const U32 type_mask = LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_NORMAL | LLVertexBuffer::MAP_TEXCOORD0; + if (use_shaders) + { + gObjectPreviewProgram.bind(); + } + LLGLEnable normalize(GL_NORMALIZE); if (!mBaseModel.empty() && mVertexBuffer[5].empty()) @@ -5297,6 +5313,11 @@ BOOL LLModelPreview::render() } } + if (use_shaders) + { + gObjectPreviewProgram.unbind(); + } + gGL.popMatrix(); return TRUE; |