From cd17687f01420952712a500107e0f93e7ab8d5f8 Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Fri, 15 Aug 2008 23:45:34 -0500 Subject: Second Life viewer sources 1.19.1.0 --- linden/indra/newview/llvoicevisualizer.cpp | 51 +++++++++++++++--------------- 1 file changed, 26 insertions(+), 25 deletions(-) (limited to 'linden/indra/newview/llvoicevisualizer.cpp') diff --git a/linden/indra/newview/llvoicevisualizer.cpp b/linden/indra/newview/llvoicevisualizer.cpp index c931734..0046ae0 100644 --- a/linden/indra/newview/llvoicevisualizer.cpp +++ b/linden/indra/newview/llvoicevisualizer.cpp @@ -45,6 +45,7 @@ #include "llviewerimage.h" #include "llviewerimagelist.h" #include "llvoiceclient.h" +#include "llglimmediate.h" //brent's wave image //29de489d-0491-fb00-7dab-f9e686d31e83 @@ -197,7 +198,6 @@ void LLVoiceVisualizer::render() //--------------------------------------------------------------- // some gl state //--------------------------------------------------------------- - LLGLEnable tex( GL_TEXTURE_2D ); LLGLEnable blend( GL_BLEND ); //------------------------------------------------------------- @@ -219,19 +219,19 @@ void LLVoiceVisualizer::render() //------------------------------------------------------------- // now render the dot //------------------------------------------------------------- - glColor4fv( LLColor4( 1.0f, 1.0f, 1.0f, DOT_OPACITY ).mV ); + gGL.color4fv( LLColor4( 1.0f, 1.0f, 1.0f, DOT_OPACITY ).mV ); - glBegin( GL_TRIANGLE_STRIP ); - glTexCoord2i( 0, 0 ); glVertex3fv( bottomLeft.mV ); - glTexCoord2i( 1, 0 ); glVertex3fv( bottomRight.mV ); - glTexCoord2i( 0, 1 ); glVertex3fv( topLeft.mV ); - glEnd(); - - glBegin( GL_TRIANGLE_STRIP ); - glTexCoord2i( 1, 0 ); glVertex3fv( bottomRight.mV ); - glTexCoord2i( 1, 1 ); glVertex3fv( topRight.mV ); - glTexCoord2i( 0, 1 ); glVertex3fv( topLeft.mV ); - glEnd(); + gGL.begin( GL_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( GL_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 ); + gGL.end(); @@ -338,23 +338,23 @@ void LLVoiceVisualizer::render() LLVector3 topLeft = mSoundSymbol.mPosition + l + u; LLVector3 topRight = mSoundSymbol.mPosition - l + u; - glColor4fv( LLColor4( red, green, blue, mSoundSymbol.mWaveOpacity[i] ).mV ); + gGL.color4fv( LLColor4( red, green, blue, mSoundSymbol.mWaveOpacity[i] ).mV ); mSoundSymbol.mTexture[i]->bind(); //--------------------------------------------------- // now, render the mofo //--------------------------------------------------- - glBegin( GL_TRIANGLE_STRIP ); - glTexCoord2i( 0, 0 ); glVertex3fv( bottomLeft.mV ); - glTexCoord2i( 1, 0 ); glVertex3fv( bottomRight.mV ); - glTexCoord2i( 0, 1 ); glVertex3fv( topLeft.mV ); - glEnd(); - - glBegin( GL_TRIANGLE_STRIP ); - glTexCoord2i( 1, 0 ); glVertex3fv( bottomRight.mV ); - glTexCoord2i( 1, 1 ); glVertex3fv( topRight.mV ); - glTexCoord2i( 0, 1 ); glVertex3fv( topLeft.mV ); - glEnd(); + gGL.begin( GL_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( GL_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 ); + gGL.end(); } //if ( mSoundSymbol.mWaveActive[i] ) @@ -451,6 +451,7 @@ void LLVoiceVisualizer::markDead() mVoiceEnabled = false; mSoundSymbol.mActive = false; + LLHUDEffect::markDead(); }//------------------------------------------------------------------ -- cgit v1.1