diff options
author | Jacek Antonelli | 2008-12-01 17:39:58 -0600 |
---|---|---|
committer | Jacek Antonelli | 2008-12-01 17:40:06 -0600 |
commit | 7abecb48babe6a6f09bf6692ba55076546cfced9 (patch) | |
tree | 8d18a88513fb97adf32c10aae78f4be1984942db /linden/indra/newview/llvoicevisualizer.cpp | |
parent | Second Life viewer sources 1.21.6 (diff) | |
download | meta-impy-7abecb48babe6a6f09bf6692ba55076546cfced9.zip meta-impy-7abecb48babe6a6f09bf6692ba55076546cfced9.tar.gz meta-impy-7abecb48babe6a6f09bf6692ba55076546cfced9.tar.bz2 meta-impy-7abecb48babe6a6f09bf6692ba55076546cfced9.tar.xz |
Second Life viewer sources 1.22.0-RC
Diffstat (limited to '')
-rw-r--r-- | linden/indra/newview/llvoicevisualizer.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/linden/indra/newview/llvoicevisualizer.cpp b/linden/indra/newview/llvoicevisualizer.cpp index f00247b..ad00804 100644 --- a/linden/indra/newview/llvoicevisualizer.cpp +++ b/linden/indra/newview/llvoicevisualizer.cpp | |||
@@ -378,20 +378,20 @@ void LLVoiceVisualizer::render() | |||
378 | //----------------------------- | 378 | //----------------------------- |
379 | // bind texture 0 (the dot) | 379 | // bind texture 0 (the dot) |
380 | //----------------------------- | 380 | //----------------------------- |
381 | mSoundSymbol.mTexture[0]->bind(); | 381 | gGL.getTexUnit(0)->bind(mSoundSymbol.mTexture[0]); |
382 | 382 | ||
383 | //------------------------------------------------------------- | 383 | //------------------------------------------------------------- |
384 | // now render the dot | 384 | // now render the dot |
385 | //------------------------------------------------------------- | 385 | //------------------------------------------------------------- |
386 | gGL.color4fv( LLColor4( 1.0f, 1.0f, 1.0f, DOT_OPACITY ).mV ); | 386 | gGL.color4fv( LLColor4( 1.0f, 1.0f, 1.0f, DOT_OPACITY ).mV ); |
387 | 387 | ||
388 | gGL.begin( LLVertexBuffer::TRIANGLE_STRIP ); | 388 | gGL.begin( LLRender::TRIANGLE_STRIP ); |
389 | gGL.texCoord2i( 0, 0 ); gGL.vertex3fv( bottomLeft.mV ); | 389 | gGL.texCoord2i( 0, 0 ); gGL.vertex3fv( bottomLeft.mV ); |
390 | gGL.texCoord2i( 1, 0 ); gGL.vertex3fv( bottomRight.mV ); | 390 | gGL.texCoord2i( 1, 0 ); gGL.vertex3fv( bottomRight.mV ); |
391 | gGL.texCoord2i( 0, 1 ); gGL.vertex3fv( topLeft.mV ); | 391 | gGL.texCoord2i( 0, 1 ); gGL.vertex3fv( topLeft.mV ); |
392 | gGL.end(); | 392 | gGL.end(); |
393 | 393 | ||
394 | gGL.begin( LLVertexBuffer::TRIANGLE_STRIP ); | 394 | gGL.begin( LLRender::TRIANGLE_STRIP ); |
395 | gGL.texCoord2i( 1, 0 ); gGL.vertex3fv( bottomRight.mV ); | 395 | gGL.texCoord2i( 1, 0 ); gGL.vertex3fv( bottomRight.mV ); |
396 | gGL.texCoord2i( 1, 1 ); gGL.vertex3fv( topRight.mV ); | 396 | gGL.texCoord2i( 1, 1 ); gGL.vertex3fv( topRight.mV ); |
397 | gGL.texCoord2i( 0, 1 ); gGL.vertex3fv( topLeft.mV ); | 397 | gGL.texCoord2i( 0, 1 ); gGL.vertex3fv( topLeft.mV ); |
@@ -503,18 +503,19 @@ void LLVoiceVisualizer::render() | |||
503 | LLVector3 topRight = mSoundSymbol.mPosition - l + u; | 503 | LLVector3 topRight = mSoundSymbol.mPosition - l + u; |
504 | 504 | ||
505 | gGL.color4fv( LLColor4( red, green, blue, mSoundSymbol.mWaveOpacity[i] ).mV ); | 505 | gGL.color4fv( LLColor4( red, green, blue, mSoundSymbol.mWaveOpacity[i] ).mV ); |
506 | mSoundSymbol.mTexture[i]->bind(); | 506 | gGL.getTexUnit(0)->bind(mSoundSymbol.mTexture[i]); |
507 | |||
507 | 508 | ||
508 | //--------------------------------------------------- | 509 | //--------------------------------------------------- |
509 | // now, render the mofo | 510 | // now, render the mofo |
510 | //--------------------------------------------------- | 511 | //--------------------------------------------------- |
511 | gGL.begin( LLVertexBuffer::TRIANGLE_STRIP ); | 512 | gGL.begin( LLRender::TRIANGLE_STRIP ); |
512 | gGL.texCoord2i( 0, 0 ); gGL.vertex3fv( bottomLeft.mV ); | 513 | gGL.texCoord2i( 0, 0 ); gGL.vertex3fv( bottomLeft.mV ); |
513 | gGL.texCoord2i( 1, 0 ); gGL.vertex3fv( bottomRight.mV ); | 514 | gGL.texCoord2i( 1, 0 ); gGL.vertex3fv( bottomRight.mV ); |
514 | gGL.texCoord2i( 0, 1 ); gGL.vertex3fv( topLeft.mV ); | 515 | gGL.texCoord2i( 0, 1 ); gGL.vertex3fv( topLeft.mV ); |
515 | gGL.end(); | 516 | gGL.end(); |
516 | 517 | ||
517 | gGL.begin( LLVertexBuffer::TRIANGLE_STRIP ); | 518 | gGL.begin( LLRender::TRIANGLE_STRIP ); |
518 | gGL.texCoord2i( 1, 0 ); gGL.vertex3fv( bottomRight.mV ); | 519 | gGL.texCoord2i( 1, 0 ); gGL.vertex3fv( bottomRight.mV ); |
519 | gGL.texCoord2i( 1, 1 ); gGL.vertex3fv( topRight.mV ); | 520 | gGL.texCoord2i( 1, 1 ); gGL.vertex3fv( topRight.mV ); |
520 | gGL.texCoord2i( 0, 1 ); gGL.vertex3fv( topLeft.mV ); | 521 | gGL.texCoord2i( 0, 1 ); gGL.vertex3fv( topLeft.mV ); |
@@ -550,8 +551,8 @@ VoiceGesticulationLevel LLVoiceVisualizer::getCurrentGesticulationLevel() | |||
550 | //----------------------------------------------------------------------------------------- | 551 | //----------------------------------------------------------------------------------------- |
551 | F32 range = mMaxGesticulationAmplitude - mMinGesticulationAmplitude; | 552 | F32 range = mMaxGesticulationAmplitude - mMinGesticulationAmplitude; |
552 | 553 | ||
553 | if ( mSpeakingAmplitude > mMinGesticulationAmplitude + range * 0.66666f ) { gesticulationLevel = VOICE_GESTICULATION_LEVEL_HIGH; } | 554 | if ( mSpeakingAmplitude > mMinGesticulationAmplitude + range * 0.5f ) { gesticulationLevel = VOICE_GESTICULATION_LEVEL_HIGH; } |
554 | else if ( mSpeakingAmplitude > mMinGesticulationAmplitude + range * 0.33333f ) { gesticulationLevel = VOICE_GESTICULATION_LEVEL_MEDIUM; } | 555 | else if ( mSpeakingAmplitude > mMinGesticulationAmplitude + range * 0.25f ) { gesticulationLevel = VOICE_GESTICULATION_LEVEL_MEDIUM; } |
555 | else if ( mSpeakingAmplitude > mMinGesticulationAmplitude + range * 0.00000f ) { gesticulationLevel = VOICE_GESTICULATION_LEVEL_LOW; } | 556 | else if ( mSpeakingAmplitude > mMinGesticulationAmplitude + range * 0.00000f ) { gesticulationLevel = VOICE_GESTICULATION_LEVEL_LOW; } |
556 | 557 | ||
557 | return gesticulationLevel; | 558 | return gesticulationLevel; |