aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/lldrawpoolalpha.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:45:44 -0500
committerJacek Antonelli2008-08-15 23:45:44 -0500
commitacfdcf2b1deeb04698174c78e8cb22b093445bb1 (patch)
tree811293650bcf81d01ea7c54d7c2cf263110aa329 /linden/indra/newview/lldrawpoolalpha.cpp
parentSecond Life viewer sources 1.20.2 (diff)
downloadmeta-impy-acfdcf2b1deeb04698174c78e8cb22b093445bb1.zip
meta-impy-acfdcf2b1deeb04698174c78e8cb22b093445bb1.tar.gz
meta-impy-acfdcf2b1deeb04698174c78e8cb22b093445bb1.tar.bz2
meta-impy-acfdcf2b1deeb04698174c78e8cb22b093445bb1.tar.xz
Second Life viewer sources 1.20.3
Diffstat (limited to 'linden/indra/newview/lldrawpoolalpha.cpp')
-rw-r--r--linden/indra/newview/lldrawpoolalpha.cpp17
1 files changed, 2 insertions, 15 deletions
diff --git a/linden/indra/newview/lldrawpoolalpha.cpp b/linden/indra/newview/lldrawpoolalpha.cpp
index cc2600e..ddde578 100644
--- a/linden/indra/newview/lldrawpoolalpha.cpp
+++ b/linden/indra/newview/lldrawpoolalpha.cpp
@@ -77,9 +77,6 @@ void LLDrawPoolAlpha::prerender()
77void LLDrawPoolAlpha::beginRenderPass(S32 pass) 77void LLDrawPoolAlpha::beginRenderPass(S32 pass)
78{ 78{
79 LLFastTimer t(LLFastTimer::FTM_RENDER_ALPHA); 79 LLFastTimer t(LLFastTimer::FTM_RENDER_ALPHA);
80 glEnableClientState(GL_TEXTURE_COORD_ARRAY);
81 glEnableClientState(GL_NORMAL_ARRAY);
82 glEnableClientState(GL_COLOR_ARRAY);
83 80
84 if (LLPipeline::sUnderWaterRender) 81 if (LLPipeline::sUnderWaterRender)
85 { 82 {
@@ -128,8 +125,6 @@ void LLDrawPoolAlpha::render(S32 pass)
128 { 125 {
129 glUseProgramObjectARB(0); 126 glUseProgramObjectARB(0);
130 } 127 }
131 glDisableClientState(GL_NORMAL_ARRAY);
132 glDisableClientState(GL_COLOR_ARRAY);
133 gPipeline.enableLightsFullbright(LLColor4(1,1,1,1)); 128 gPipeline.enableLightsFullbright(LLColor4(1,1,1,1));
134 glColor4f(1,0,0,1); 129 glColor4f(1,0,0,1);
135 LLViewerImage::sSmokeImagep->addTextureStats(1024.f*1024.f); 130 LLViewerImage::sSmokeImagep->addTextureStats(1024.f*1024.f);
@@ -141,10 +136,6 @@ void LLDrawPoolAlpha::render(S32 pass)
141 136
142void LLDrawPoolAlpha::renderAlpha(U32 mask) 137void LLDrawPoolAlpha::renderAlpha(U32 mask)
143{ 138{
144#if !LL_RELEASE_FOR_DOWNLOAD
145 LLGLState::checkClientArrays(mask);
146#endif
147
148 for (LLCullResult::sg_list_t::iterator i = gPipeline.beginAlphaGroups(); i != gPipeline.endAlphaGroups(); ++i) 139 for (LLCullResult::sg_list_t::iterator i = gPipeline.beginAlphaGroups(); i != gPipeline.endAlphaGroups(); ++i)
149 { 140 {
150 LLSpatialGroup* group = *i; 141 LLSpatialGroup* group = *i;
@@ -182,9 +173,7 @@ void LLDrawPoolAlpha::renderAlphaHighlight(U32 mask)
182 LLRenderPass::applyModelMatrix(params); 173 LLRenderPass::applyModelMatrix(params);
183 174
184 params.mVertexBuffer->setBuffer(mask); 175 params.mVertexBuffer->setBuffer(mask);
185 U16* indices_pointer = (U16*) params.mVertexBuffer->getIndicesPointer(); 176 params.mVertexBuffer->drawRange(LLVertexBuffer::TRIANGLES, params.mStart, params.mEnd, params.mCount, params.mOffset);
186 glDrawRangeElements(GL_TRIANGLES, params.mStart, params.mEnd, params.mCount,
187 GL_UNSIGNED_SHORT, indices_pointer+params.mOffset);
188 gPipeline.addTrianglesDrawn(params.mCount/3); 177 gPipeline.addTrianglesDrawn(params.mCount/3);
189 } 178 }
190 } 179 }
@@ -303,9 +292,7 @@ void LLDrawPoolAlpha::renderGroupAlpha(LLSpatialGroup* group, U32 type, U32 mask
303 } 292 }
304 293
305 params.mVertexBuffer->setBuffer(mask); 294 params.mVertexBuffer->setBuffer(mask);
306 U16* indices_pointer = (U16*) params.mVertexBuffer->getIndicesPointer(); 295 params.mVertexBuffer->drawRange(LLVertexBuffer::TRIANGLES, params.mStart, params.mEnd, params.mCount, params.mOffset);
307 glDrawRangeElements(GL_TRIANGLES, params.mStart, params.mEnd, params.mCount,
308 GL_UNSIGNED_SHORT, indices_pointer+params.mOffset);
309 gPipeline.addTrianglesDrawn(params.mCount/3); 296 gPipeline.addTrianglesDrawn(params.mCount/3);
310 297
311 if (params.mTextureMatrix && texture && params.mTexture.notNull()) 298 if (params.mTextureMatrix && texture && params.mTexture.notNull())