aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llviewerjointmesh.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:45:50 -0500
committerJacek Antonelli2008-08-15 23:45:50 -0500
commit2a4dea528f670b9bb1f77ef27a8a1dd16603d114 (patch)
tree95c68e362703c9099d571ecbdc6142b1cda1e005 /linden/indra/newview/llviewerjointmesh.cpp
parentSecond Life viewer sources 1.20.6 (diff)
downloadmeta-impy-2a4dea528f670b9bb1f77ef27a8a1dd16603d114.zip
meta-impy-2a4dea528f670b9bb1f77ef27a8a1dd16603d114.tar.gz
meta-impy-2a4dea528f670b9bb1f77ef27a8a1dd16603d114.tar.bz2
meta-impy-2a4dea528f670b9bb1f77ef27a8a1dd16603d114.tar.xz
Second Life viewer sources 1.20.7
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/llviewerjointmesh.cpp53
1 files changed, 16 insertions, 37 deletions
diff --git a/linden/indra/newview/llviewerjointmesh.cpp b/linden/indra/newview/llviewerjointmesh.cpp
index 4a0f0b8..0dcf4ab 100644
--- a/linden/indra/newview/llviewerjointmesh.cpp
+++ b/linden/indra/newview/llviewerjointmesh.cpp
@@ -36,6 +36,7 @@
36 36
37#include "imageids.h" 37#include "imageids.h"
38#include "llfasttimer.h" 38#include "llfasttimer.h"
39#include "llrender.h"
39 40
40#include "llagent.h" 41#include "llagent.h"
41#include "llapr.h" 42#include "llapr.h"
@@ -545,17 +546,7 @@ U32 LLViewerJointMesh::drawShape( F32 pixelArea, BOOL first_pass)
545 else 546 else
546 { 547 {
547 glColor4f(0.7f, 0.6f, 0.3f, 1.f); 548 glColor4f(0.7f, 0.6f, 0.3f, 1.f);
548 glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE_ARB); 549 gGL.getTexUnit(0)->setTextureColorBlend(LLTexUnit::TBO_LERP_TEX_ALPHA, LLTexUnit::TBS_TEX_COLOR, LLTexUnit::TBS_PREV_COLOR);
549 glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_RGB_ARB, GL_INTERPOLATE_ARB);
550
551 glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_RGB_ARB, GL_PREVIOUS_ARB);
552 glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND0_RGB_ARB, GL_SRC_COLOR);
553
554 glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE1_RGB_ARB, GL_TEXTURE);
555 glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND1_RGB_ARB, GL_SRC_COLOR);
556
557 glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE2_RGB_ARB, GL_TEXTURE);
558 glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND2_RGB_ARB, GL_ONE_MINUS_SRC_ALPHA);
559 } 550 }
560 } 551 }
561 else if( mLayerSet ) 552 else if( mLayerSet )
@@ -573,12 +564,10 @@ U32 LLViewerJointMesh::drawShape( F32 pixelArea, BOOL first_pass)
573 else 564 else
574 if ( mTexture.notNull() ) 565 if ( mTexture.notNull() )
575 { 566 {
576 mTexture->bind(); 567 if (!mTexture->getClampS() || !mTexture->getClampT())
577 if (!mTexture->getClampS()) { 568 {
578 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); 569 mTexture->bind();
579 } 570 mTexture->overrideClamp (TRUE, TRUE);
580 if (!mTexture->getClampT()) {
581 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
582 } 571 }
583 } 572 }
584 else 573 else
@@ -590,15 +579,8 @@ U32 LLViewerJointMesh::drawShape( F32 pixelArea, BOOL first_pass)
590 { 579 {
591 if (isTransparent()) 580 if (isTransparent())
592 { 581 {
593 glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE_ARB); 582 gGL.getTexUnit(0)->setTextureColorBlend(LLTexUnit::TBO_REPLACE, LLTexUnit::TBS_PREV_COLOR);
594 glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_RGB_ARB, GL_REPLACE); 583 gGL.getTexUnit(0)->setTextureAlphaBlend(LLTexUnit::TBO_MULT, LLTexUnit::TBS_TEX_ALPHA, LLTexUnit::TBS_CONST_ALPHA);
595 glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_ALPHA_ARB, GL_MODULATE);
596
597 glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_RGB_ARB, GL_PREVIOUS_ARB);
598 glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND0_RGB_ARB, GL_SRC_COLOR);
599
600 glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_ALPHA_ARB, GL_TEXTURE); // GL_TEXTURE_ENV_COLOR is set in renderPass1
601 glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND0_ALPHA_ARB, GL_SRC_ALPHA);
602 } 584 }
603 else 585 else
604 { 586 {
@@ -639,16 +621,13 @@ U32 LLViewerJointMesh::drawShape( F32 pixelArea, BOOL first_pass)
639 621
640 if (mTestImageName) 622 if (mTestImageName)
641 { 623 {
642 glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); 624 gGL.getTexUnit(0)->setTextureBlendType(LLTexUnit::TB_MULT);
643 } 625 }
644 626
645 if (mTexture.notNull()) { 627 if (mTexture.notNull())
646 if (!mTexture->getClampS()) { 628 {
647 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); 629 mTexture->bind();
648 } 630 mTexture->restoreClamp();
649 if (!mTexture->getClampT()) {
650 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
651 }
652 } 631 }
653 632
654 return triangle_count; 633 return triangle_count;
@@ -870,9 +849,9 @@ void LLViewerJointMesh::updateVectorize()
870 case 1: vp = "SSE"; break; 849 case 1: vp = "SSE"; break;
871 default: vp = "COMPILER DEFAULT"; break; 850 default: vp = "COMPILER DEFAULT"; break;
872 } 851 }
873 llinfos << "Vectorization : " << ( vectorizeEnable ? "ENABLED" : "DISABLED" ) << llendl ; 852 LL_INFOS("AppInit") << "Vectorization : " << ( vectorizeEnable ? "ENABLED" : "DISABLED" ) << LL_ENDL ;
874 llinfos << "Vector Processor : " << vp << llendl ; 853 LL_INFOS("AppInit") << "Vector Processor : " << vp << LL_ENDL ;
875 llinfos << "Vectorized Skinning : " << ( vectorizeSkin ? "ENABLED" : "DISABLED" ) << llendl ; 854 LL_INFOS("AppInit") << "Vectorized Skinning : " << ( vectorizeSkin ? "ENABLED" : "DISABLED" ) << LL_ENDL ;
876 if(vectorizeEnable && vectorizeSkin) 855 if(vectorizeEnable && vectorizeSkin)
877 { 856 {
878 switch(sVectorizeProcessor) 857 switch(sVectorizeProcessor)