aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llsurfacepatch.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/newview/llsurfacepatch.cpp')
-rw-r--r--linden/indra/newview/llsurfacepatch.cpp34
1 files changed, 23 insertions, 11 deletions
diff --git a/linden/indra/newview/llsurfacepatch.cpp b/linden/indra/newview/llsurfacepatch.cpp
index 5fac5fd..04b732a 100644
--- a/linden/indra/newview/llsurfacepatch.cpp
+++ b/linden/indra/newview/llsurfacepatch.cpp
@@ -712,17 +712,7 @@ BOOL LLSurfacePatch::updateTexture()
712 if (mVObjp) 712 if (mVObjp)
713 { 713 {
714 mVObjp->dirtyGeom(); 714 mVObjp->dirtyGeom();
715 } 715 gPipeline.markGLRebuild(mVObjp);
716 updateCompositionStats();
717 F32 tex_patch_size = meters_per_grid*grids_per_patch_edge;
718 if (comp->generateTexture((F32)origin_region[VX], (F32)origin_region[VY],
719 tex_patch_size, tex_patch_size))
720 {
721 mSTexUpdate = FALSE;
722
723 // Also generate the water texture
724 mSurfacep->generateWaterTexture((F32)origin_region.mdV[VX], (F32)origin_region.mdV[VY],
725 tex_patch_size, tex_patch_size);
726 return TRUE; 716 return TRUE;
727 } 717 }
728 } 718 }
@@ -735,6 +725,28 @@ BOOL LLSurfacePatch::updateTexture()
735 } 725 }
736} 726}
737 727
728void LLSurfacePatch::updateGL() // KL SD
729{
730 F32 meters_per_grid = getSurface()->getMetersPerGrid();
731 F32 grids_per_patch_edge = (F32)getSurface()->getGridsPerPatchEdge();
732
733 LLViewerRegion *regionp = getSurface()->getRegion();
734 LLVector3d origin_region = getOriginGlobal() - getSurface()->getOriginGlobal();
735
736 LLVLComposition* comp = regionp->getComposition();
737
738 updateCompositionStats();
739 F32 tex_patch_size = meters_per_grid*grids_per_patch_edge;
740 if (comp->generateTexture((F32)origin_region[VX], (F32)origin_region[VY],
741 tex_patch_size, tex_patch_size))
742 {
743 mSTexUpdate = FALSE;
744
745 // Also generate the water texture
746 mSurfacep->generateWaterTexture((F32)origin_region.mdV[VX], (F32)origin_region.mdV[VY],
747 tex_patch_size, tex_patch_size);
748 }
749} // KL
738 750
739void LLSurfacePatch::dirtyZ() 751void LLSurfacePatch::dirtyZ()
740{ 752{