diff options
Diffstat (limited to '')
-rw-r--r-- | linden/indra/newview/lldrawpoolavatar.cpp | 32 |
1 files changed, 5 insertions, 27 deletions
diff --git a/linden/indra/newview/lldrawpoolavatar.cpp b/linden/indra/newview/lldrawpoolavatar.cpp index b461757..8e3341a 100644 --- a/linden/indra/newview/lldrawpoolavatar.cpp +++ b/linden/indra/newview/lldrawpoolavatar.cpp | |||
@@ -216,13 +216,11 @@ void LLDrawPoolAvatar::beginFootShadow() | |||
216 | } | 216 | } |
217 | 217 | ||
218 | gPipeline.enableLightsFullbright(LLColor4(1,1,1,1)); | 218 | gPipeline.enableLightsFullbright(LLColor4(1,1,1,1)); |
219 | glEnableClientState(GL_TEXTURE_COORD_ARRAY); | ||
220 | } | 219 | } |
221 | 220 | ||
222 | void LLDrawPoolAvatar::endFootShadow() | 221 | void LLDrawPoolAvatar::endFootShadow() |
223 | { | 222 | { |
224 | gPipeline.enableLightsDynamic(); | 223 | gPipeline.enableLightsDynamic(); |
225 | glDisableClientState(GL_TEXTURE_COORD_ARRAY); | ||
226 | } | 224 | } |
227 | 225 | ||
228 | void LLDrawPoolAvatar::beginRigid() | 226 | void LLDrawPoolAvatar::beginRigid() |
@@ -247,16 +245,11 @@ void LLDrawPoolAvatar::beginRigid() | |||
247 | { | 245 | { |
248 | sVertexProgram = NULL; | 246 | sVertexProgram = NULL; |
249 | } | 247 | } |
250 | |||
251 | glEnableClientState(GL_NORMAL_ARRAY); | ||
252 | glEnableClientState(GL_TEXTURE_COORD_ARRAY); | ||
253 | } | 248 | } |
254 | 249 | ||
255 | void LLDrawPoolAvatar::endRigid() | 250 | void LLDrawPoolAvatar::endRigid() |
256 | { | 251 | { |
257 | sShaderLevel = mVertexShaderLevel; | 252 | sShaderLevel = mVertexShaderLevel; |
258 | glDisableClientState(GL_NORMAL_ARRAY); | ||
259 | glDisableClientState(GL_TEXTURE_COORD_ARRAY); | ||
260 | if (sVertexProgram != NULL) | 253 | if (sVertexProgram != NULL) |
261 | { | 254 | { |
262 | sVertexProgram->unbind(); | 255 | sVertexProgram->unbind(); |
@@ -265,9 +258,6 @@ void LLDrawPoolAvatar::endRigid() | |||
265 | 258 | ||
266 | void LLDrawPoolAvatar::beginSkinned() | 259 | void LLDrawPoolAvatar::beginSkinned() |
267 | { | 260 | { |
268 | glEnableClientState(GL_NORMAL_ARRAY); | ||
269 | glEnableClientState(GL_TEXTURE_COORD_ARRAY); | ||
270 | |||
271 | if (sShaderLevel > 0) | 261 | if (sShaderLevel > 0) |
272 | { | 262 | { |
273 | if (LLPipeline::sUnderWaterRender) | 263 | if (LLPipeline::sUnderWaterRender) |
@@ -295,8 +285,7 @@ void LLDrawPoolAvatar::beginSkinned() | |||
295 | if (sShaderLevel > 0) // for hardware blending | 285 | if (sShaderLevel > 0) // for hardware blending |
296 | { | 286 | { |
297 | sRenderingSkinned = TRUE; | 287 | sRenderingSkinned = TRUE; |
298 | glClientActiveTextureARB(GL_TEXTURE1_ARB); | 288 | |
299 | |||
300 | sVertexProgram->bind(); | 289 | sVertexProgram->bind(); |
301 | if (sShaderLevel >= SHADER_LEVEL_CLOTH) | 290 | if (sShaderLevel >= SHADER_LEVEL_CLOTH) |
302 | { | 291 | { |
@@ -331,7 +320,6 @@ void LLDrawPoolAvatar::endSkinned() | |||
331 | sRenderingSkinned = FALSE; | 320 | sRenderingSkinned = FALSE; |
332 | sVertexProgram->disableTexture(LLShaderMgr::BUMP_MAP); | 321 | sVertexProgram->disableTexture(LLShaderMgr::BUMP_MAP); |
333 | glActiveTextureARB(GL_TEXTURE0_ARB); | 322 | glActiveTextureARB(GL_TEXTURE0_ARB); |
334 | glClientActiveTextureARB(GL_TEXTURE0_ARB); | ||
335 | disable_vertex_weighting(sVertexProgram->mAttribute[LLShaderMgr::AVATAR_WEIGHT]); | 323 | disable_vertex_weighting(sVertexProgram->mAttribute[LLShaderMgr::AVATAR_WEIGHT]); |
336 | if (sShaderLevel >= SHADER_LEVEL_BUMP) | 324 | if (sShaderLevel >= SHADER_LEVEL_BUMP) |
337 | { | 325 | { |
@@ -356,10 +344,6 @@ void LLDrawPoolAvatar::endSkinned() | |||
356 | } | 344 | } |
357 | 345 | ||
358 | glActiveTextureARB(GL_TEXTURE0_ARB); | 346 | glActiveTextureARB(GL_TEXTURE0_ARB); |
359 | glClientActiveTextureARB(GL_TEXTURE0_ARB); | ||
360 | |||
361 | glDisableClientState(GL_NORMAL_ARRAY); | ||
362 | glDisableClientState(GL_TEXTURE_COORD_ARRAY); | ||
363 | } | 347 | } |
364 | 348 | ||
365 | 349 | ||
@@ -438,7 +422,7 @@ void LLDrawPoolAvatar::renderAvatars(LLVOAvatar* single_avatar, S32 pass) | |||
438 | } | 422 | } |
439 | else if (gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_FOOT_SHADOWS)) | 423 | else if (gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_FOOT_SHADOWS)) |
440 | { | 424 | { |
441 | mIndicesDrawn += avatarp->renderFootShadows(); | 425 | avatarp->renderFootShadows(); |
442 | } | 426 | } |
443 | return; | 427 | return; |
444 | } | 428 | } |
@@ -451,7 +435,7 @@ void LLDrawPoolAvatar::renderAvatars(LLVOAvatar* single_avatar, S32 pass) | |||
451 | if (pass == 1) | 435 | if (pass == 1) |
452 | { | 436 | { |
453 | // render rigid meshes (eyeballs) first | 437 | // render rigid meshes (eyeballs) first |
454 | mIndicesDrawn += avatarp->renderRigid(); | 438 | avatarp->renderRigid(); |
455 | return; | 439 | return; |
456 | } | 440 | } |
457 | 441 | ||
@@ -548,7 +532,7 @@ void LLDrawPoolAvatar::renderAvatars(LLVOAvatar* single_avatar, S32 pass) | |||
548 | color.setColor(1.0f, 1.0f, 1.0f, 1.0f); | 532 | color.setColor(1.0f, 1.0f, 1.0f, 1.0f); |
549 | } | 533 | } |
550 | 534 | ||
551 | mIndicesDrawn += avatarp->renderSkinned(AVATAR_RENDER_PASS_SINGLE); | 535 | avatarp->renderSkinned(AVATAR_RENDER_PASS_SINGLE); |
552 | } | 536 | } |
553 | } | 537 | } |
554 | 538 | ||
@@ -609,9 +593,6 @@ void LLDrawPoolAvatar::renderForSelect() | |||
609 | return; | 593 | return; |
610 | } | 594 | } |
611 | 595 | ||
612 | glEnableClientState(GL_VERTEX_ARRAY); | ||
613 | glEnableClientState(GL_NORMAL_ARRAY); | ||
614 | glEnableClientState(GL_TEXTURE_COORD_ARRAY); | ||
615 | sVertexProgram = &gAvatarPickProgram; | 596 | sVertexProgram = &gAvatarPickProgram; |
616 | if (sShaderLevel > 0) | 597 | if (sShaderLevel > 0) |
617 | { | 598 | { |
@@ -624,13 +605,12 @@ void LLDrawPoolAvatar::renderForSelect() | |||
624 | 605 | ||
625 | if ((sShaderLevel > 0) && !gUseGLPick) // for hardware blending | 606 | if ((sShaderLevel > 0) && !gUseGLPick) // for hardware blending |
626 | { | 607 | { |
627 | glClientActiveTextureARB(GL_TEXTURE0_ARB); | ||
628 | sRenderingSkinned = TRUE; | 608 | sRenderingSkinned = TRUE; |
629 | sVertexProgram->bind(); | 609 | sVertexProgram->bind(); |
630 | enable_vertex_weighting(sVertexProgram->mAttribute[LLShaderMgr::AVATAR_WEIGHT]); | 610 | enable_vertex_weighting(sVertexProgram->mAttribute[LLShaderMgr::AVATAR_WEIGHT]); |
631 | } | 611 | } |
632 | 612 | ||
633 | mIndicesDrawn += avatarp->renderSkinned(AVATAR_RENDER_PASS_SINGLE); | 613 | avatarp->renderSkinned(AVATAR_RENDER_PASS_SINGLE); |
634 | 614 | ||
635 | // if we're in software-blending, remember to set the fence _after_ we draw so we wait till this rendering is done | 615 | // if we're in software-blending, remember to set the fence _after_ we draw so we wait till this rendering is done |
636 | if ((sShaderLevel > 0) && !gUseGLPick) | 616 | if ((sShaderLevel > 0) && !gUseGLPick) |
@@ -645,8 +625,6 @@ void LLDrawPoolAvatar::renderForSelect() | |||
645 | 625 | ||
646 | // restore texture mode | 626 | // restore texture mode |
647 | glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); | 627 | glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); |
648 | glDisableClientState(GL_NORMAL_ARRAY); | ||
649 | glDisableClientState(GL_TEXTURE_COORD_ARRAY); | ||
650 | } | 628 | } |
651 | 629 | ||
652 | //----------------------------------------------------------------------------- | 630 | //----------------------------------------------------------------------------- |