summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2011-11-15 12:24:31 -0600
committerDave Parks <davep@lindenlab.com>2011-11-15 12:24:31 -0600
commit961ce1c4e785103b696a8ec76674aee4c91fe011 (patch)
treeb217f0e9748c4d1063c6a671e1b22f29e1e813b1 /indra
parente2e154d94ea0684ede8c7c1b70fff555edbd6065 (diff)
SH-2591 WIP -- fix for UI disappearing, introduces some artifacts in rotation ring, committing to debug elsewhere
Diffstat (limited to 'indra')
-rw-r--r--indra/llui/llui.cpp2
-rw-r--r--indra/newview/llmaniprotate.cpp35
2 files changed, 34 insertions, 3 deletions
diff --git a/indra/llui/llui.cpp b/indra/llui/llui.cpp
index c6f7e28027..33bc247987 100644
--- a/indra/llui/llui.cpp
+++ b/indra/llui/llui.cpp
@@ -955,10 +955,12 @@ void gl_ring( F32 radius, F32 width, const LLColor4& center_color, const LLColor
if( render_center )
{
gGL.color4fv(center_color.mV);
+ gGL.diffuseColor4fv(center_color.mV);
gl_deep_circle( radius, width, steps );
}
else
{
+ gGL.diffuseColor4fv(side_color.mV);
gl_washer_2d(radius, radius - width, steps, side_color, side_color);
gGL.translateUI(0.f, 0.f, width);
gl_washer_2d(radius - width, radius, steps, side_color, side_color);
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();