diff options
author | Dave Parks <davep@lindenlab.com> | 2011-11-15 12:24:31 -0600 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2011-11-15 12:24:31 -0600 |
commit | 961ce1c4e785103b696a8ec76674aee4c91fe011 (patch) | |
tree | b217f0e9748c4d1063c6a671e1b22f29e1e813b1 /indra/newview | |
parent | e2e154d94ea0684ede8c7c1b70fff555edbd6065 (diff) |
SH-2591 WIP -- fix for UI disappearing, introduces some artifacts in rotation ring, committing to debug elsewhere
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llmaniprotate.cpp | 35 |
1 files changed, 32 insertions, 3 deletions
diff --git a/indra/newview/llmaniprotate.cpp b/indra/newview/llmaniprotate.cpp index 04dd2be583..a8da94f75e 100644 --- a/indra/newview/llmaniprotate.cpp +++ b/indra/newview/llmaniprotate.cpp @@ -53,6 +53,7 @@ #include "llviewercamera.h" #include "llviewerobject.h" #include "llviewerobject.h" +#include "llviewershadermgr.h" #include "llviewerwindow.h" #include "llworld.h" #include "pipeline.h" @@ -113,7 +114,7 @@ void LLManipRotate::handleSelect() void LLManipRotate::render() { LLGLSUIDefault gls_ui; - gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); + gGL.getTexUnit(0)->bind(LLViewerFetchedTexture::sWhiteImagep); LLGLDepthTest gls_depth(GL_TRUE); LLGLEnable gl_blend(GL_BLEND); LLGLEnable gls_alpha_test(GL_ALPHA_TEST); @@ -147,6 +148,7 @@ void LLManipRotate::render() gGL.pushMatrix(); { + // are we in the middle of a constrained drag? if (mManipPart >= LL_ROT_X && mManipPart <= LL_ROT_Z) { @@ -154,6 +156,11 @@ void LLManipRotate::render() } else { + if (LLGLSLShader::sNoFixedFunction) + { + gDebugProgram.bind(); + } + LLGLEnable cull_face(GL_CULL_FACE); LLGLDepthTest gls_depth(GL_FALSE); gGL.pushMatrix(); @@ -190,20 +197,27 @@ void LLManipRotate::render() { color.setVec( 0.7f, 0.7f, 0.7f, 0.6f ); } + gGL.diffuseColor4fv(color.mV); gl_washer_2d(mRadiusMeters + width_meters, mRadiusMeters, CIRCLE_STEPS, color, color); if (mManipPart == LL_NO_PART) { gGL.color4f( 0.7f, 0.7f, 0.7f, 0.3f ); + gGL.diffuseColor4f(0.7f, 0.7f, 0.7f, 0.3f); gl_circle_2d( 0, 0, mRadiusMeters, CIRCLE_STEPS, TRUE ); } gGL.flush(); } gGL.popMatrix(); - } + if (LLGLSLShader::sNoFixedFunction) + { + gUIProgram.bind(); + } + } + gGL.translatef( center.mV[VX], center.mV[VY], center.mV[VZ] ); LLQuaternion rot; @@ -219,6 +233,11 @@ void LLManipRotate::render() gGL.rotatef(angle_radians * RAD_TO_DEG, x, y, z); + if (LLGLSLShader::sNoFixedFunction) + { + gDebugProgram.bind(); + } + if (mManipPart == LL_ROT_Z) { mManipulatorScales = lerp(mManipulatorScales, LLVector4(1.f, 1.f, SELECTED_MANIPULATOR_SCALE, 1.f), LLCriticalDamp::getInterpolant(MANIPULATOR_SCALE_HALF_LIFE)); @@ -270,6 +289,7 @@ void LLManipRotate::render() // First pass: centers. Second pass: sides. for( S32 i=0; i<2; i++ ) { + gGL.pushMatrix(); { if (mHighlightedPart == LL_ROT_Z) @@ -286,7 +306,7 @@ void LLManipRotate::render() } } gGL.popMatrix(); - + gGL.pushMatrix(); { gGL.rotatef( 90.f, 1.f, 0.f, 0.f ); @@ -328,11 +348,20 @@ void LLManipRotate::render() { mManipulatorScales = lerp(mManipulatorScales, LLVector4(1.f, 1.f, 1.f, SELECTED_MANIPULATOR_SCALE), LLCriticalDamp::getInterpolant(MANIPULATOR_SCALE_HALF_LIFE)); } + } + } + + if (LLGLSLShader::sNoFixedFunction) + { + gUIProgram.bind(); + } + } gGL.popMatrix(); gGL.popMatrix(); + LLVector3 euler_angles; LLQuaternion object_rot = first_object->getRotationEdit(); |