diff options
author | Jacek Antonelli | 2008-08-15 23:45:42 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-08-15 23:45:42 -0500 |
commit | ce28e056c20bf2723f565bbf464b87781ec248a2 (patch) | |
tree | ef7b0501c4de4b631a916305cbc2a5fdc125e52d /linden/indra/newview/llvosky.cpp | |
parent | Second Life viewer sources 1.19.1.4b (diff) | |
download | meta-impy-ce28e056c20bf2723f565bbf464b87781ec248a2.zip meta-impy-ce28e056c20bf2723f565bbf464b87781ec248a2.tar.gz meta-impy-ce28e056c20bf2723f565bbf464b87781ec248a2.tar.bz2 meta-impy-ce28e056c20bf2723f565bbf464b87781ec248a2.tar.xz |
Second Life viewer sources 1.20.2
Diffstat (limited to '')
-rw-r--r-- | linden/indra/newview/llvosky.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/linden/indra/newview/llvosky.cpp b/linden/indra/newview/llvosky.cpp index 37f6f30..8e60010 100644 --- a/linden/indra/newview/llvosky.cpp +++ b/linden/indra/newview/llvosky.cpp | |||
@@ -439,7 +439,7 @@ void LLVOSky::initCubeMap() | |||
439 | { | 439 | { |
440 | mCubeMap->init(images); | 440 | mCubeMap->init(images); |
441 | } | 441 | } |
442 | else if (gSavedSettings.getBOOL("RenderWater") && gGLManager.mHasCubeMap && gFeatureManagerp->isFeatureAvailable("RenderCubeMap")) | 442 | else if (gSavedSettings.getBOOL("RenderWater") && gGLManager.mHasCubeMap && LLFeatureManager::getInstance()->isFeatureAvailable("RenderCubeMap")) |
443 | { | 443 | { |
444 | mCubeMap = new LLCubeMap(); | 444 | mCubeMap = new LLCubeMap(); |
445 | mCubeMap->init(images); | 445 | mCubeMap->init(images); |
@@ -477,7 +477,7 @@ void LLVOSky::restoreGL() | |||
477 | calcAtmospherics(); | 477 | calcAtmospherics(); |
478 | 478 | ||
479 | if (gSavedSettings.getBOOL("RenderWater") && gGLManager.mHasCubeMap | 479 | if (gSavedSettings.getBOOL("RenderWater") && gGLManager.mHasCubeMap |
480 | && gFeatureManagerp->isFeatureAvailable("RenderCubeMap")) | 480 | && LLFeatureManager::getInstance()->isFeatureAvailable("RenderCubeMap")) |
481 | { | 481 | { |
482 | LLCubeMap* cube_map = getCubeMap(); | 482 | LLCubeMap* cube_map = getCubeMap(); |
483 | 483 | ||
@@ -1102,7 +1102,7 @@ BOOL LLVOSky::updateSky() | |||
1102 | { | 1102 | { |
1103 | if (mForceUpdate) | 1103 | if (mForceUpdate) |
1104 | { | 1104 | { |
1105 | updateFog(gCamera->getFar()); | 1105 | updateFog(LLViewerCamera::getInstance()->getFar()); |
1106 | for (int side = 0; side < 6; side++) | 1106 | for (int side = 0; side < 6; side++) |
1107 | { | 1107 | { |
1108 | for (int tile = 0; tile < NUM_TILES; tile++) | 1108 | for (int tile = 0; tile < NUM_TILES; tile++) |
@@ -1331,7 +1331,7 @@ BOOL LLVOSky::updateGeometry(LLDrawable *drawable) | |||
1331 | } | 1331 | } |
1332 | } | 1332 | } |
1333 | 1333 | ||
1334 | const LLVector3 &look_at = gCamera->getAtAxis(); | 1334 | const LLVector3 &look_at = LLViewerCamera::getInstance()->getAtAxis(); |
1335 | LLVector3 right = look_at % LLVector3::z_axis; | 1335 | LLVector3 right = look_at % LLVector3::z_axis; |
1336 | LLVector3 up = right % look_at; | 1336 | LLVector3 up = right % look_at; |
1337 | right.normVec(); | 1337 | right.normVec(); |
@@ -1343,7 +1343,7 @@ BOOL LLVOSky::updateGeometry(LLDrawable *drawable) | |||
1343 | mMoon.setDraw(updateHeavenlyBodyGeometry(drawable, FACE_MOON, FALSE, mMoon, cos_max_angle, up, right)); | 1343 | mMoon.setDraw(updateHeavenlyBodyGeometry(drawable, FACE_MOON, FALSE, mMoon, cos_max_angle, up, right)); |
1344 | 1344 | ||
1345 | const F32 water_height = gAgent.getRegion()->getWaterHeight() + 0.01f; | 1345 | const F32 water_height = gAgent.getRegion()->getWaterHeight() + 0.01f; |
1346 | // gWorldPointer->getWaterHeight() + 0.01f; | 1346 | // LLWorld::getInstance()->getWaterHeight() + 0.01f; |
1347 | const F32 camera_height = mCameraPosAgent.mV[2]; | 1347 | const F32 camera_height = mCameraPosAgent.mV[2]; |
1348 | const F32 height_above_water = camera_height - water_height; | 1348 | const F32 height_above_water = camera_height - water_height; |
1349 | 1349 | ||
@@ -1691,9 +1691,9 @@ F32 dtClip(const LLVector3& v0, const LLVector3& v1, F32 far_clip2) | |||
1691 | void LLVOSky::updateReflectionGeometry(LLDrawable *drawable, F32 H, | 1691 | void LLVOSky::updateReflectionGeometry(LLDrawable *drawable, F32 H, |
1692 | const LLHeavenBody& HB) | 1692 | const LLHeavenBody& HB) |
1693 | { | 1693 | { |
1694 | const LLVector3 &look_at = gCamera->getAtAxis(); | 1694 | const LLVector3 &look_at = LLViewerCamera::getInstance()->getAtAxis(); |
1695 | // const F32 water_height = gAgent.getRegion()->getWaterHeight() + 0.001f; | 1695 | // const F32 water_height = gAgent.getRegion()->getWaterHeight() + 0.001f; |
1696 | // gWorldPointer->getWaterHeight() + 0.001f; | 1696 | // LLWorld::getInstance()->getWaterHeight() + 0.001f; |
1697 | 1697 | ||
1698 | LLVector3 to_dir = HB.getDirection(); | 1698 | LLVector3 to_dir = HB.getDirection(); |
1699 | LLVector3 hb_pos = to_dir * (HORIZON_DIST - 10); | 1699 | LLVector3 hb_pos = to_dir * (HORIZON_DIST - 10); |
@@ -1824,7 +1824,7 @@ void LLVOSky::updateReflectionGeometry(LLDrawable *drawable, F32 H, | |||
1824 | side = 2; | 1824 | side = 2; |
1825 | } | 1825 | } |
1826 | 1826 | ||
1827 | //const F32 far_clip = (gCamera->getFar() - 0.01) / far_clip_factor; | 1827 | //const F32 far_clip = (LLViewerCamera::getInstance()->getFar() - 0.01) / far_clip_factor; |
1828 | const F32 far_clip = 512; | 1828 | const F32 far_clip = 512; |
1829 | const F32 far_clip2 = far_clip*far_clip; | 1829 | const F32 far_clip2 = far_clip*far_clip; |
1830 | 1830 | ||
@@ -2022,10 +2022,10 @@ void LLVOSky::updateFog(const F32 distance) | |||
2022 | LLColor4 target_fog(0.f, 0.2f, 0.5f, 0.f); | 2022 | LLColor4 target_fog(0.f, 0.2f, 0.5f, 0.f); |
2023 | 2023 | ||
2024 | const F32 water_height = gAgent.getRegion()->getWaterHeight(); | 2024 | const F32 water_height = gAgent.getRegion()->getWaterHeight(); |
2025 | // gWorldPointer->getWaterHeight(); | 2025 | // LLWorld::getInstance()->getWaterHeight(); |
2026 | F32 camera_height = gAgent.getCameraPositionAgent().mV[2]; | 2026 | F32 camera_height = gAgent.getCameraPositionAgent().mV[2]; |
2027 | 2027 | ||
2028 | F32 near_clip_height = gCamera->getAtAxis().mV[VZ] * gCamera->getNear(); | 2028 | F32 near_clip_height = LLViewerCamera::getInstance()->getAtAxis().mV[VZ] * LLViewerCamera::getInstance()->getNear(); |
2029 | camera_height += near_clip_height; | 2029 | camera_height += near_clip_height; |
2030 | 2030 | ||
2031 | F32 fog_distance = 0.f; | 2031 | F32 fog_distance = 0.f; |