aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/lldrawpoolsky.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2009-06-13 13:17:14 -0500
committerJacek Antonelli2009-06-13 13:17:20 -0500
commit0517fe4322443bdc317f8185590a63134e3f8394 (patch)
tree942c9c26d0792accc928010a113d123c5409659b /linden/indra/newview/lldrawpoolsky.cpp
parentSecond Life viewer sources 1.23.2-RC (diff)
downloadmeta-impy-0517fe4322443bdc317f8185590a63134e3f8394.zip
meta-impy-0517fe4322443bdc317f8185590a63134e3f8394.tar.gz
meta-impy-0517fe4322443bdc317f8185590a63134e3f8394.tar.bz2
meta-impy-0517fe4322443bdc317f8185590a63134e3f8394.tar.xz
Second Life viewer sources 1.23.3-RC
Diffstat (limited to 'linden/indra/newview/lldrawpoolsky.cpp')
-rw-r--r--linden/indra/newview/lldrawpoolsky.cpp68
1 files changed, 2 insertions, 66 deletions
diff --git a/linden/indra/newview/lldrawpoolsky.cpp b/linden/indra/newview/lldrawpoolsky.cpp
index 7f21adc..f0ed380 100644
--- a/linden/indra/newview/lldrawpoolsky.cpp
+++ b/linden/indra/newview/lldrawpoolsky.cpp
@@ -61,8 +61,8 @@ LLDrawPool *LLDrawPoolSky::instancePool()
61 61
62void LLDrawPoolSky::prerender() 62void LLDrawPoolSky::prerender()
63{ 63{
64 mVertexShaderLevel = LLViewerShaderMgr::instance()->getVertexShaderLevel(LLViewerShaderMgr::SHADER_ENVIRONMENT); 64 mVertexShaderLevel = LLViewerShaderMgr::instance()->getVertexShaderLevel(LLViewerShaderMgr::SHADER_ENVIRONMENT);
65// gSky.mVOSkyp->updateGeometry(gSky.mVOSkyp->mDrawable); 65 gSky.mVOSkyp->updateGeometry(gSky.mVOSkyp->mDrawable);
66} 66}
67 67
68void LLDrawPoolSky::render(S32 pass) 68void LLDrawPoolSky::render(S32 pass)
@@ -97,7 +97,6 @@ void LLDrawPoolSky::render(S32 pass)
97 } 97 }
98 98
99 99
100 LLVOSky *voskyp = gSky.mVOSkyp;
101 LLGLSPipelineSkyBox gls_skybox; 100 LLGLSPipelineSkyBox gls_skybox;
102 101
103 LLGLDepthTest gls_depth(GL_TRUE, GL_FALSE); 102 LLGLDepthTest gls_depth(GL_TRUE, GL_FALSE);
@@ -120,43 +119,9 @@ void LLDrawPoolSky::render(S32 pass)
120 { 119 {
121 renderSkyCubeFace(i); 120 renderSkyCubeFace(i);
122 } 121 }
123
124 LLFace *hbfaces[3];
125 hbfaces[0] = NULL;
126 hbfaces[1] = NULL;
127 hbfaces[2] = NULL;
128 for (S32 curr_face = 0; curr_face < face_count; curr_face++)
129 {
130 LLFace* facep = mDrawFace[curr_face];
131 if (voskyp->isSameFace(LLVOSky::FACE_SUN, facep))
132 {
133 hbfaces[0] = facep;
134 }
135 if (voskyp->isSameFace(LLVOSky::FACE_MOON, facep))
136 {
137 hbfaces[1] = facep;
138 }
139 if (voskyp->isSameFace(LLVOSky::FACE_BLOOM, facep))
140 {
141 hbfaces[2] = facep;
142 }
143 }
144 122
145 LLGLEnable blend(GL_BLEND); 123 LLGLEnable blend(GL_BLEND);
146 124
147 if (hbfaces[2])
148 {
149 // renderSunHalo(hbfaces[2]);
150 }
151 if (hbfaces[0])
152 {
153 // renderHeavenlyBody(0, hbfaces[0]);
154 }
155 if (hbfaces[1])
156 {
157 // renderHeavenlyBody(1, hbfaces[1]);
158 }
159
160 glPopMatrix(); 125 glPopMatrix();
161} 126}
162 127
@@ -181,35 +146,6 @@ void LLDrawPoolSky::renderSkyCubeFace(U8 side)
181 } 146 }
182} 147}
183 148
184void LLDrawPoolSky::renderHeavenlyBody(U8 hb, LLFace* face)
185{
186 if ( !mHB[hb]->getDraw() ) return;
187 if (! face->getGeomCount()) return;
188
189 LLImageGL* tex = face->getTexture();
190 gGL.getTexUnit(0)->bind(tex);
191 LLColor4 color(mHB[hb]->getInterpColor());
192 LLOverrideFaceColor override(this, color);
193 face->renderIndexed();
194}
195
196
197
198void LLDrawPoolSky::renderSunHalo(LLFace* face)
199{
200 if (! mHB[0]->getDraw()) return;
201 if (! face->getGeomCount()) return;
202
203 LLImageGL* tex = face->getTexture();
204 gGL.getTexUnit(0)->bind(tex);
205 LLColor4 color(mHB[0]->getInterpColor());
206 color.mV[3] = llclamp(mHB[0]->getHaloBrighness(), 0.f, 1.f);
207
208 LLOverrideFaceColor override(this, color);
209 face->renderIndexed();
210}
211
212
213void LLDrawPoolSky::renderForSelect() 149void LLDrawPoolSky::renderForSelect()
214{ 150{
215} 151}