aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llvosurfacepatch.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/newview/llvosurfacepatch.cpp')
-rw-r--r--linden/indra/newview/llvosurfacepatch.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/linden/indra/newview/llvosurfacepatch.cpp b/linden/indra/newview/llvosurfacepatch.cpp
index 1671880..380eff5 100644
--- a/linden/indra/newview/llvosurfacepatch.cpp
+++ b/linden/indra/newview/llvosurfacepatch.cpp
@@ -423,7 +423,7 @@ void LLVOSurfacePatch::updateNorthGeometry(LLFace *facep,
423 S32 vertex_count = 0; 423 S32 vertex_count = 0;
424 S32 i, x, y; 424 S32 i, x, y;
425 425
426 S32 num_vertices, num_indices; 426 S32 num_vertices;
427 427
428 U32 render_stride = mLastStride; 428 U32 render_stride = mLastStride;
429 S32 patch_size = mPatchp->getSurface()->getGridsPerPatchEdge(); 429 S32 patch_size = mPatchp->getSurface()->getGridsPerPatchEdge();
@@ -441,7 +441,6 @@ void LLVOSurfacePatch::updateNorthGeometry(LLFace *facep,
441 if (north_stride == render_stride) 441 if (north_stride == render_stride)
442 { 442 {
443 num_vertices = 2 * length + 1; 443 num_vertices = 2 * length + 1;
444 num_indices = length * 6 - 3;
445 444
446 facep->mCenterAgent = (mPatchp->getPointAgent(8, 15) + mPatchp->getPointAgent(8, 16))*0.5f; 445 facep->mCenterAgent = (mPatchp->getPointAgent(8, 15) + mPatchp->getPointAgent(8, 16))*0.5f;
447 446
@@ -494,7 +493,6 @@ void LLVOSurfacePatch::updateNorthGeometry(LLFace *facep,
494 { 493 {
495 // North stride is longer (has less vertices) 494 // North stride is longer (has less vertices)
496 num_vertices = length + length/2 + 1; 495 num_vertices = length + length/2 + 1;
497 num_indices = half_length*9 - 3;
498 496
499 facep->mCenterAgent = (mPatchp->getPointAgent(7, 15) + mPatchp->getPointAgent(8, 16))*0.5f; 497 facep->mCenterAgent = (mPatchp->getPointAgent(7, 15) + mPatchp->getPointAgent(8, 16))*0.5f;
500 498
@@ -555,7 +553,6 @@ void LLVOSurfacePatch::updateNorthGeometry(LLFace *facep,
555 length = patch_size / north_stride; 553 length = patch_size / north_stride;
556 half_length = length / 2; 554 half_length = length / 2;
557 num_vertices = length + half_length + 1; 555 num_vertices = length + half_length + 1;
558 num_indices = 9*half_length - 3;
559 556
560 facep->mCenterAgent = (mPatchp->getPointAgent(15, 7) + mPatchp->getPointAgent(16, 8))*0.5f; 557 facep->mCenterAgent = (mPatchp->getPointAgent(15, 7) + mPatchp->getPointAgent(16, 8))*0.5f;
561 558
@@ -629,7 +626,7 @@ void LLVOSurfacePatch::updateEastGeometry(LLFace *facep,
629{ 626{
630 S32 i, x, y; 627 S32 i, x, y;
631 628
632 S32 num_vertices, num_indices; 629 S32 num_vertices;
633 630
634 U32 render_stride = mLastStride; 631 U32 render_stride = mLastStride;
635 S32 patch_size = mPatchp->getSurface()->getGridsPerPatchEdge(); 632 S32 patch_size = mPatchp->getSurface()->getGridsPerPatchEdge();
@@ -642,7 +639,6 @@ void LLVOSurfacePatch::updateEastGeometry(LLFace *facep,
642 if (east_stride == render_stride) 639 if (east_stride == render_stride)
643 { 640 {
644 num_vertices = 2 * length + 1; 641 num_vertices = 2 * length + 1;
645 num_indices = length * 6 - 3;
646 642
647 facep->mCenterAgent = (mPatchp->getPointAgent(8, 15) + mPatchp->getPointAgent(8, 16))*0.5f; 643 facep->mCenterAgent = (mPatchp->getPointAgent(8, 15) + mPatchp->getPointAgent(8, 16))*0.5f;
648 644
@@ -693,7 +689,6 @@ void LLVOSurfacePatch::updateEastGeometry(LLFace *facep,
693 { 689 {
694 // East stride is longer (has less vertices) 690 // East stride is longer (has less vertices)
695 num_vertices = length + half_length + 1; 691 num_vertices = length + half_length + 1;
696 num_indices = half_length*9 - 3;
697 692
698 facep->mCenterAgent = (mPatchp->getPointAgent(7, 15) + mPatchp->getPointAgent(8, 16))*0.5f; 693 facep->mCenterAgent = (mPatchp->getPointAgent(7, 15) + mPatchp->getPointAgent(8, 16))*0.5f;
699 694
@@ -750,7 +745,6 @@ void LLVOSurfacePatch::updateEastGeometry(LLFace *facep,
750 length = patch_size / east_stride; 745 length = patch_size / east_stride;
751 half_length = length / 2; 746 half_length = length / 2;
752 num_vertices = length + length/2 + 1; 747 num_vertices = length + length/2 + 1;
753 num_indices = 9*(length/2) - 3;
754 748
755 facep->mCenterAgent = (mPatchp->getPointAgent(15, 7) + mPatchp->getPointAgent(16, 8))*0.5f; 749 facep->mCenterAgent = (mPatchp->getPointAgent(15, 7) + mPatchp->getPointAgent(16, 8))*0.5f;
756 750