aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llhudicon.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:45:34 -0500
committerJacek Antonelli2008-08-15 23:45:34 -0500
commitcd17687f01420952712a500107e0f93e7ab8d5f8 (patch)
treece48c2b706f2c1176290e39fb555fbdf6648ce01 /linden/indra/newview/llhudicon.cpp
parentSecond Life viewer sources 1.19.0.5 (diff)
downloadmeta-impy-cd17687f01420952712a500107e0f93e7ab8d5f8.zip
meta-impy-cd17687f01420952712a500107e0f93e7ab8d5f8.tar.gz
meta-impy-cd17687f01420952712a500107e0f93e7ab8d5f8.tar.bz2
meta-impy-cd17687f01420952712a500107e0f93e7ab8d5f8.tar.xz
Second Life viewer sources 1.19.1.0
Diffstat (limited to 'linden/indra/newview/llhudicon.cpp')
-rw-r--r--linden/indra/newview/llhudicon.cpp32
1 files changed, 18 insertions, 14 deletions
diff --git a/linden/indra/newview/llhudicon.cpp b/linden/indra/newview/llhudicon.cpp
index 2124827..393c932 100644
--- a/linden/indra/newview/llhudicon.cpp
+++ b/linden/indra/newview/llhudicon.cpp
@@ -34,6 +34,7 @@
34#include "llhudicon.h" 34#include "llhudicon.h"
35 35
36#include "llgl.h" 36#include "llgl.h"
37#include "llglimmediate.h"
37 38
38#include "llviewerobject.h" 39#include "llviewerobject.h"
39#include "lldrawable.h" 40#include "lldrawable.h"
@@ -83,8 +84,11 @@ void LLHUDIcon::renderIcon(BOOL for_select)
83{ 84{
84 LLGLSUIDefault texture_state; 85 LLGLSUIDefault texture_state;
85 LLGLDepthTest gls_depth(GL_TRUE); 86 LLGLDepthTest gls_depth(GL_TRUE);
86 LLGLState no_texture(GL_TEXTURE_2D, for_select ? FALSE : TRUE); 87 if (for_select)
87 88 {
89 LLViewerImage::unbindTexture(0);
90 }
91
88 if (mHidden) 92 if (mHidden)
89 return; 93 return;
90 94
@@ -152,28 +156,28 @@ void LLHUDIcon::renderIcon(BOOL for_select)
152 { 156 {
153 // set color to unique color id for picking 157 // set color to unique color id for picking
154 LLColor4U coloru((U8)(mPickID >> 16), (U8)(mPickID >> 8), (U8)mPickID); 158 LLColor4U coloru((U8)(mPickID >> 16), (U8)(mPickID >> 8), (U8)mPickID);
155 glColor4ubv(coloru.mV); 159 gGL.color4ubv(coloru.mV);
156 } 160 }
157 else 161 else
158 { 162 {
159 LLColor4 icon_color = LLColor4::white; 163 LLColor4 icon_color = LLColor4::white;
160 icon_color.mV[VALPHA] = alpha_factor; 164 icon_color.mV[VALPHA] = alpha_factor;
161 glColor4fv(icon_color.mV); 165 gGL.color4fv(icon_color.mV);
162 LLViewerImage::bindTexture(mImagep); 166 LLViewerImage::bindTexture(mImagep);
163 } 167 }
164 168
165 glBegin(GL_QUADS); 169 gGL.begin(GL_QUADS);
166 { 170 {
167 glTexCoord2f(0.f, 1.f); 171 gGL.texCoord2f(0.f, 1.f);
168 glVertex3fv(upper_left.mV); 172 gGL.vertex3fv(upper_left.mV);
169 glTexCoord2f(0.f, 0.f); 173 gGL.texCoord2f(0.f, 0.f);
170 glVertex3fv(lower_left.mV); 174 gGL.vertex3fv(lower_left.mV);
171 glTexCoord2f(1.f, 0.f); 175 gGL.texCoord2f(1.f, 0.f);
172 glVertex3fv(lower_right.mV); 176 gGL.vertex3fv(lower_right.mV);
173 glTexCoord2f(1.f, 1.f); 177 gGL.texCoord2f(1.f, 1.f);
174 glVertex3fv(upper_right.mV); 178 gGL.vertex3fv(upper_right.mV);
175 } 179 }
176 glEnd(); 180 gGL.end();
177} 181}
178 182
179void LLHUDIcon::setImage(LLViewerImage* imagep) 183void LLHUDIcon::setImage(LLViewerImage* imagep)