summaryrefslogtreecommitdiff
path: root/indra/newview/llvoicevisualizer.cpp
diff options
context:
space:
mode:
authorMark Palange <palange@lindenlab.com>2008-11-07 17:51:03 +0000
committerMark Palange <palange@lindenlab.com>2008-11-07 17:51:03 +0000
commitf89f19990cbb9f3f2e7473ac6c159098bdfabec7 (patch)
treee7fa406e2db5e9adc2e24e00557d7b3d3f93203a /indra/newview/llvoicevisualizer.cpp
parentb2bfb128e7d30e1cdb293a2ac192a0cbe63fe528 (diff)
QAR-992 Merging revisions 101012-101170,101686-101687 of svn+ssh://svn.lindenlab.com/svn/linden/qa/viewer_combo_1-22-merge into linden/release
Diffstat (limited to 'indra/newview/llvoicevisualizer.cpp')
-rw-r--r--indra/newview/llvoicevisualizer.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/indra/newview/llvoicevisualizer.cpp b/indra/newview/llvoicevisualizer.cpp
index 6eb3851d16..02635a7f82 100644
--- a/indra/newview/llvoicevisualizer.cpp
+++ b/indra/newview/llvoicevisualizer.cpp
@@ -378,20 +378,20 @@ void LLVoiceVisualizer::render()
//-----------------------------
// bind texture 0 (the dot)
//-----------------------------
- mSoundSymbol.mTexture[0]->bind();
+ gGL.getTexUnit(0)->bind(mSoundSymbol.mTexture[0]);
//-------------------------------------------------------------
// now render the dot
//-------------------------------------------------------------
gGL.color4fv( LLColor4( 1.0f, 1.0f, 1.0f, DOT_OPACITY ).mV );
- gGL.begin( LLVertexBuffer::TRIANGLE_STRIP );
+ gGL.begin( LLRender::TRIANGLE_STRIP );
gGL.texCoord2i( 0, 0 ); gGL.vertex3fv( bottomLeft.mV );
gGL.texCoord2i( 1, 0 ); gGL.vertex3fv( bottomRight.mV );
gGL.texCoord2i( 0, 1 ); gGL.vertex3fv( topLeft.mV );
gGL.end();
- gGL.begin( LLVertexBuffer::TRIANGLE_STRIP );
+ gGL.begin( LLRender::TRIANGLE_STRIP );
gGL.texCoord2i( 1, 0 ); gGL.vertex3fv( bottomRight.mV );
gGL.texCoord2i( 1, 1 ); gGL.vertex3fv( topRight.mV );
gGL.texCoord2i( 0, 1 ); gGL.vertex3fv( topLeft.mV );
@@ -503,18 +503,19 @@ void LLVoiceVisualizer::render()
LLVector3 topRight = mSoundSymbol.mPosition - l + u;
gGL.color4fv( LLColor4( red, green, blue, mSoundSymbol.mWaveOpacity[i] ).mV );
- mSoundSymbol.mTexture[i]->bind();
+ gGL.getTexUnit(0)->bind(mSoundSymbol.mTexture[i]);
+
//---------------------------------------------------
// now, render the mofo
//---------------------------------------------------
- gGL.begin( LLVertexBuffer::TRIANGLE_STRIP );
+ gGL.begin( LLRender::TRIANGLE_STRIP );
gGL.texCoord2i( 0, 0 ); gGL.vertex3fv( bottomLeft.mV );
gGL.texCoord2i( 1, 0 ); gGL.vertex3fv( bottomRight.mV );
gGL.texCoord2i( 0, 1 ); gGL.vertex3fv( topLeft.mV );
gGL.end();
- gGL.begin( LLVertexBuffer::TRIANGLE_STRIP );
+ gGL.begin( LLRender::TRIANGLE_STRIP );
gGL.texCoord2i( 1, 0 ); gGL.vertex3fv( bottomRight.mV );
gGL.texCoord2i( 1, 1 ); gGL.vertex3fv( topRight.mV );
gGL.texCoord2i( 0, 1 ); gGL.vertex3fv( topLeft.mV );
@@ -550,8 +551,8 @@ VoiceGesticulationLevel LLVoiceVisualizer::getCurrentGesticulationLevel()
//-----------------------------------------------------------------------------------------
F32 range = mMaxGesticulationAmplitude - mMinGesticulationAmplitude;
- if ( mSpeakingAmplitude > mMinGesticulationAmplitude + range * 0.66666f ) { gesticulationLevel = VOICE_GESTICULATION_LEVEL_HIGH; }
- else if ( mSpeakingAmplitude > mMinGesticulationAmplitude + range * 0.33333f ) { gesticulationLevel = VOICE_GESTICULATION_LEVEL_MEDIUM; }
+ if ( mSpeakingAmplitude > mMinGesticulationAmplitude + range * 0.5f ) { gesticulationLevel = VOICE_GESTICULATION_LEVEL_HIGH; }
+ else if ( mSpeakingAmplitude > mMinGesticulationAmplitude + range * 0.25f ) { gesticulationLevel = VOICE_GESTICULATION_LEVEL_MEDIUM; }
else if ( mSpeakingAmplitude > mMinGesticulationAmplitude + range * 0.00000f ) { gesticulationLevel = VOICE_GESTICULATION_LEVEL_LOW; }
return gesticulationLevel;