aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden
diff options
context:
space:
mode:
Diffstat (limited to 'linden')
-rw-r--r--linden/indra/newview/lldrawable.cpp3
-rw-r--r--linden/indra/newview/lldrawpoolwater.cpp2
-rw-r--r--linden/indra/newview/llspatialpartition.cpp3
-rw-r--r--linden/indra/newview/llviewerobject.cpp3
-rw-r--r--linden/indra/newview/llviewerobject.h13
-rw-r--r--linden/indra/newview/llvowater.cpp6
-rw-r--r--linden/indra/newview/llvowater.h5
-rw-r--r--linden/indra/newview/llworld.cpp5
8 files changed, 22 insertions, 18 deletions
diff --git a/linden/indra/newview/lldrawable.cpp b/linden/indra/newview/lldrawable.cpp
index 494ac5b..5a383bc 100644
--- a/linden/indra/newview/lldrawable.cpp
+++ b/linden/indra/newview/lldrawable.cpp
@@ -361,8 +361,7 @@ void LLDrawable::makeActive()
361 { 361 {
362 U32 pcode = mVObjp->getPCode(); 362 U32 pcode = mVObjp->getPCode();
363 if (pcode == LLViewerObject::LL_VO_WATER || 363 if (pcode == LLViewerObject::LL_VO_WATER ||
364 pcode == LLViewerObject::LL_VO_HOLE_WATER || 364 pcode == LLViewerObject::LL_VO_VOID_WATER ||
365 pcode == LLViewerObject::LL_VO_EDGE_WATER ||
366 pcode == LLViewerObject::LL_VO_SURFACE_PATCH || 365 pcode == LLViewerObject::LL_VO_SURFACE_PATCH ||
367 pcode == LLViewerObject::LL_VO_PART_GROUP || 366 pcode == LLViewerObject::LL_VO_PART_GROUP ||
368 pcode == LLViewerObject::LL_VO_HUD_PART_GROUP || 367 pcode == LLViewerObject::LL_VO_HUD_PART_GROUP ||
diff --git a/linden/indra/newview/lldrawpoolwater.cpp b/linden/indra/newview/lldrawpoolwater.cpp
index 81e1c68..624b8a8 100644
--- a/linden/indra/newview/lldrawpoolwater.cpp
+++ b/linden/indra/newview/lldrawpoolwater.cpp
@@ -540,7 +540,7 @@ void LLDrawPoolWater::shade()
540 540
541 sNeedsReflectionUpdate = TRUE; 541 sNeedsReflectionUpdate = TRUE;
542 542
543 if (water->getUseTexture() || !water->isEdgeWater()) 543 if (water->getUseTexture() || !water->getIsEdgePatch())
544 { 544 {
545 sNeedsDistortionUpdate = TRUE; 545 sNeedsDistortionUpdate = TRUE;
546 face->renderIndexed(); 546 face->renderIndexed();
diff --git a/linden/indra/newview/llspatialpartition.cpp b/linden/indra/newview/llspatialpartition.cpp
index 01ed375..c1d5ff3 100644
--- a/linden/indra/newview/llspatialpartition.cpp
+++ b/linden/indra/newview/llspatialpartition.cpp
@@ -2304,8 +2304,7 @@ void renderBoundingBox(LLDrawable* drawable, BOOL set_color = TRUE)
2304 case LLViewerObject::LL_VO_HUD_PART_GROUP: 2304 case LLViewerObject::LL_VO_HUD_PART_GROUP:
2305 gGL.color4f(0,0,1,1); 2305 gGL.color4f(0,0,1,1);
2306 break; 2306 break;
2307 case LLViewerObject::LL_VO_EDGE_WATER: 2307 case LLViewerObject::LL_VO_VOID_WATER:
2308 case LLViewerObject::LL_VO_HOLE_WATER:
2309 case LLViewerObject::LL_VO_WATER: 2308 case LLViewerObject::LL_VO_WATER:
2310 gGL.color4f(0,0.5f,1,1); 2309 gGL.color4f(0,0.5f,1,1);
2311 break; 2310 break;
diff --git a/linden/indra/newview/llviewerobject.cpp b/linden/indra/newview/llviewerobject.cpp
index f3353bb..cbd0472 100644
--- a/linden/indra/newview/llviewerobject.cpp
+++ b/linden/indra/newview/llviewerobject.cpp
@@ -144,8 +144,7 @@ LLViewerObject *LLViewerObject::createObject(const LLUUID &id, const LLPCode pco
144 res = new LLVOSurfacePatch(id, pcode, regionp); break; 144 res = new LLVOSurfacePatch(id, pcode, regionp); break;
145 case LL_VO_SKY: 145 case LL_VO_SKY:
146 res = new LLVOSky(id, pcode, regionp); break; 146 res = new LLVOSky(id, pcode, regionp); break;
147 case LL_VO_EDGE_WATER: 147 case LL_VO_VOID_WATER:
148 case LL_VO_HOLE_WATER:
149 res = new LLVOVoidWater(id, pcode, regionp); break; 148 res = new LLVOVoidWater(id, pcode, regionp); break;
150 case LL_VO_WATER: 149 case LL_VO_WATER:
151 res = new LLVOWater(id, pcode, regionp); break; 150 res = new LLVOWater(id, pcode, regionp); break;
diff --git a/linden/indra/newview/llviewerobject.h b/linden/indra/newview/llviewerobject.h
index c443441..33e8da2 100644
--- a/linden/indra/newview/llviewerobject.h
+++ b/linden/indra/newview/llviewerobject.h
@@ -509,13 +509,12 @@ public:
509 LL_VO_WL_SKY = LL_PCODE_APP | 0x40, 509 LL_VO_WL_SKY = LL_PCODE_APP | 0x40,
510 LL_VO_SQUARE_TORUS = LL_PCODE_APP | 0x50, 510 LL_VO_SQUARE_TORUS = LL_PCODE_APP | 0x50,
511 LL_VO_SKY = LL_PCODE_APP | 0x60, 511 LL_VO_SKY = LL_PCODE_APP | 0x60,
512 LL_VO_EDGE_WATER = LL_PCODE_APP | 0x70, 512 LL_VO_VOID_WATER = LL_PCODE_APP | 0x70,
513 LL_VO_HOLE_WATER = LL_PCODE_APP | 0x80, 513 LL_VO_WATER = LL_PCODE_APP | 0x80,
514 LL_VO_WATER = LL_PCODE_APP | 0x90, 514 LL_VO_GROUND = LL_PCODE_APP | 0x90,
515 LL_VO_GROUND = LL_PCODE_APP | 0xa0, 515 LL_VO_PART_GROUP = LL_PCODE_APP | 0xa0,
516 LL_VO_PART_GROUP = LL_PCODE_APP | 0xb0, 516 LL_VO_TRIANGLE_TORUS = LL_PCODE_APP | 0xb0,
517 LL_VO_TRIANGLE_TORUS = LL_PCODE_APP | 0xc0, 517 LL_VO_HUD_PART_GROUP = LL_PCODE_APP | 0xc0,
518 LL_VO_HUD_PART_GROUP = LL_PCODE_APP | 0xd0,
519 } EVOType; 518 } EVOType;
520 519
521 LLUUID mID; 520 LLUUID mID;
diff --git a/linden/indra/newview/llvowater.cpp b/linden/indra/newview/llvowater.cpp
index 7e9470a..c66295a 100644
--- a/linden/indra/newview/llvowater.cpp
+++ b/linden/indra/newview/llvowater.cpp
@@ -77,6 +77,7 @@ LLVOWater::LLVOWater(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regi
77 setScale(LLVector3(256.f, 256.f, 0.f)); // Hack for setting scale for bounding boxes/visibility. 77 setScale(LLVector3(256.f, 256.f, 0.f)); // Hack for setting scale for bounding boxes/visibility.
78 78
79 mUseTexture = TRUE; 79 mUseTexture = TRUE;
80 mIsEdgePatch = FALSE;
80 mRenderType = LLPipeline::RENDER_TYPE_WATER; 81 mRenderType = LLPipeline::RENDER_TYPE_WATER;
81} 82}
82 83
@@ -253,6 +254,11 @@ void LLVOWater::setUseTexture(const BOOL use_texture)
253 mUseTexture = use_texture; 254 mUseTexture = use_texture;
254} 255}
255 256
257void LLVOWater::setIsEdgePatch(const BOOL edge_patch)
258{
259 mIsEdgePatch = edge_patch;
260}
261
256void LLVOWater::updateSpatialExtents(LLVector3 &newMin, LLVector3& newMax) 262void LLVOWater::updateSpatialExtents(LLVector3 &newMin, LLVector3& newMax)
257{ 263{
258 LLVector3 pos = getPositionAgent(); 264 LLVector3 pos = getPositionAgent();
diff --git a/linden/indra/newview/llvowater.h b/linden/indra/newview/llvowater.h
index 37480b6..55ce6d7 100644
--- a/linden/indra/newview/llvowater.h
+++ b/linden/indra/newview/llvowater.h
@@ -77,12 +77,13 @@ public:
77 /*virtual*/ BOOL isActive() const; // Whether this object needs to do an idleUpdate. 77 /*virtual*/ BOOL isActive() const; // Whether this object needs to do an idleUpdate.
78 78
79 void setUseTexture(const BOOL use_texture); 79 void setUseTexture(const BOOL use_texture);
80 void setIsEdgePatch(const BOOL edge_patch);
80 BOOL getUseTexture() const { return mUseTexture; } 81 BOOL getUseTexture() const { return mUseTexture; }
81 82 BOOL getIsEdgePatch() const { return mIsEdgePatch; }
82 bool isEdgeWater(void) const { return mPrimitiveCode == LL_VO_EDGE_WATER; }
83 83
84protected: 84protected:
85 BOOL mUseTexture; 85 BOOL mUseTexture;
86 BOOL mIsEdgePatch;
86 LLPipeline::LLRenderTypeMask mRenderType; 87 LLPipeline::LLRenderTypeMask mRenderType;
87}; 88};
88 89
diff --git a/linden/indra/newview/llworld.cpp b/linden/indra/newview/llworld.cpp
index 5026808..17fad2b 100644
--- a/linden/indra/newview/llworld.cpp
+++ b/linden/indra/newview/llworld.cpp
@@ -1105,7 +1105,7 @@ void LLWorld::updateWaterObjects()
1105 U64 region_handle = to_region_handle(x, y); 1105 U64 region_handle = to_region_handle(x, y);
1106 if (!getRegionFromHandle(region_handle)) 1106 if (!getRegionFromHandle(region_handle))
1107 { 1107 {
1108 LLVOWater* waterp = (LLVOWater*)gObjectList.createObjectViewer(LLViewerObject::LL_VO_HOLE_WATER, gAgent.getRegion()); 1108 LLVOWater* waterp = (LLVOWater*)gObjectList.createObjectViewer(LLViewerObject::LL_VO_VOID_WATER, gAgent.getRegion());
1109 waterp->setUseTexture(FALSE); 1109 waterp->setUseTexture(FALSE);
1110 waterp->setPositionGlobal(LLVector3d(x + rwidth / 2, y + rwidth / 2, water_center_z)); 1110 waterp->setPositionGlobal(LLVector3d(x + rwidth / 2, y + rwidth / 2, water_center_z));
1111 waterp->setScale(LLVector3((F32)rwidth, (F32)rwidth, box_height)); 1111 waterp->setScale(LLVector3((F32)rwidth, (F32)rwidth, box_height));
@@ -1140,9 +1140,10 @@ void LLWorld::updateWaterObjects()
1140 { 1140 {
1141 // The edge water objects can be dead because they're attached to the region that the 1141 // The edge water objects can be dead because they're attached to the region that the
1142 // agent was in when they were originally created. 1142 // agent was in when they were originally created.
1143 mEdgeWaterObjects[dir] = (LLVOWater *)gObjectList.createObjectViewer(LLViewerObject::LL_VO_EDGE_WATER, gAgent.getRegion()); 1143 mEdgeWaterObjects[dir] = (LLVOWater *)gObjectList.createObjectViewer(LLViewerObject::LL_VO_VOID_WATER, gAgent.getRegion());
1144 waterp = mEdgeWaterObjects[dir]; 1144 waterp = mEdgeWaterObjects[dir];
1145 waterp->setUseTexture(FALSE); 1145 waterp->setUseTexture(FALSE);
1146 waterp->setIsEdgePatch(TRUE); // Mark that this is edge water and not hole water.
1146 gPipeline.createObject(waterp); 1147 gPipeline.createObject(waterp);
1147 } 1148 }
1148 1149