diff options
Diffstat (limited to 'linden/indra/newview/llviewerparceloverlay.cpp')
-rw-r--r-- | linden/indra/newview/llviewerparceloverlay.cpp | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/linden/indra/newview/llviewerparceloverlay.cpp b/linden/indra/newview/llviewerparceloverlay.cpp index 281b644..ad34b6a 100644 --- a/linden/indra/newview/llviewerparceloverlay.cpp +++ b/linden/indra/newview/llviewerparceloverlay.cpp | |||
@@ -58,7 +58,6 @@ LLViewerParcelOverlay::LLViewerParcelOverlay(LLViewerRegion* region, F32 region_ | |||
58 | mDirty( FALSE ), | 58 | mDirty( FALSE ), |
59 | mTimeSinceLastUpdate(), | 59 | mTimeSinceLastUpdate(), |
60 | mOverlayTextureIdx(-1), | 60 | mOverlayTextureIdx(-1), |
61 | mLineImageID( gViewerArt.getString("propertyline.tga") ), | ||
62 | mVertexCount(0), | 61 | mVertexCount(0), |
63 | mVertexArray(NULL), | 62 | mVertexArray(NULL), |
64 | mColorArray(NULL) | 63 | mColorArray(NULL) |
@@ -750,20 +749,15 @@ S32 LLViewerParcelOverlay::renderPropertyLines () | |||
750 | LLGLSNoTexture gls_no_texture; | 749 | LLGLSNoTexture gls_no_texture; |
751 | LLGLDepthTest mDepthTest(GL_TRUE); | 750 | LLGLDepthTest mDepthTest(GL_TRUE); |
752 | 751 | ||
753 | // JC - This doesn't work. | ||
754 | //gGLSUITextureDepth.set(); | ||
755 | //LLViewerImage* image = gImageList.getImage( mLineImageID ); | ||
756 | //image->bindTexture(); | ||
757 | |||
758 | // Find camera height off the ground (not from zero) | 752 | // Find camera height off the ground (not from zero) |
759 | F32 ground_height_at_camera = land.resolveHeightGlobal( gAgent.getCameraPositionGlobal() ); | 753 | F32 ground_height_at_camera = land.resolveHeightGlobal( gAgent.getCameraPositionGlobal() ); |
760 | F32 camera_z = gCamera->getOrigin().mV[VZ]; | 754 | F32 camera_z = LLViewerCamera::getInstance()->getOrigin().mV[VZ]; |
761 | F32 camera_height = camera_z - ground_height_at_camera; | 755 | F32 camera_height = camera_z - ground_height_at_camera; |
762 | 756 | ||
763 | camera_height = llclamp(camera_height, 0.f, 100.f); | 757 | camera_height = llclamp(camera_height, 0.f, 100.f); |
764 | 758 | ||
765 | // Pull lines toward camera by 1 cm per meter off the ground. | 759 | // Pull lines toward camera by 1 cm per meter off the ground. |
766 | const LLVector3& CAMERA_AT = gCamera->getAtAxis(); | 760 | const LLVector3& CAMERA_AT = LLViewerCamera::getInstance()->getAtAxis(); |
767 | F32 pull_toward_camera_scale = 0.01f * camera_height; | 761 | F32 pull_toward_camera_scale = 0.01f * camera_height; |
768 | LLVector3 pull_toward_camera = CAMERA_AT; | 762 | LLVector3 pull_toward_camera = CAMERA_AT; |
769 | pull_toward_camera *= -pull_toward_camera_scale; | 763 | pull_toward_camera *= -pull_toward_camera_scale; |
@@ -791,7 +785,7 @@ S32 LLViewerParcelOverlay::renderPropertyLines () | |||
791 | 785 | ||
792 | // Set up a cull plane 2 * PARCEL_GRID_STEP_METERS behind | 786 | // Set up a cull plane 2 * PARCEL_GRID_STEP_METERS behind |
793 | // the camera. The cull plane normal is the camera's at axis. | 787 | // the camera. The cull plane normal is the camera's at axis. |
794 | LLVector3 cull_plane_point = gCamera->getAtAxis(); | 788 | LLVector3 cull_plane_point = LLViewerCamera::getInstance()->getAtAxis(); |
795 | cull_plane_point *= -2.f * PARCEL_GRID_STEP_METERS; | 789 | cull_plane_point *= -2.f * PARCEL_GRID_STEP_METERS; |
796 | cull_plane_point += camera_region; | 790 | cull_plane_point += camera_region; |
797 | 791 | ||