diff options
Diffstat (limited to 'linden/indra/newview/llvosky.h')
-rw-r--r-- | linden/indra/newview/llvosky.h | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/linden/indra/newview/llvosky.h b/linden/indra/newview/llvosky.h index 0ca56dc..568e924 100644 --- a/linden/indra/newview/llvosky.h +++ b/linden/indra/newview/llvosky.h | |||
@@ -4,6 +4,7 @@ | |||
4 | * | 4 | * |
5 | * Copyright (c) 2001-2007, Linden Research, Inc. | 5 | * Copyright (c) 2001-2007, Linden Research, Inc. |
6 | * | 6 | * |
7 | * Second Life Viewer Source Code | ||
7 | * The source code in this file ("Source Code") is provided by Linden Lab | 8 | * The source code in this file ("Source Code") is provided by Linden Lab |
8 | * to you under the terms of the GNU General Public License, version 2.0 | 9 | * to you under the terms of the GNU General Public License, version 2.0 |
9 | * ("GPL"), unless you have obtained a separate licensing agreement | 10 | * ("GPL"), unless you have obtained a separate licensing agreement |
@@ -61,19 +62,12 @@ const F32 INV_NO_STEPS = 1.f/NO_STEPS; | |||
61 | 62 | ||
62 | // constants used in calculation of scattering coeff of clear air | 63 | // constants used in calculation of scattering coeff of clear air |
63 | const F32 sigma = 0.035f; | 64 | const F32 sigma = 0.035f; |
64 | const F32 fsigma = (6+3*sigma)/(6.f-7.f*sigma); | 65 | const F32 fsigma = (6.f + 3.f * sigma) / (6.f-7.f*sigma); |
65 | const F64 Ndens = 2.55e25; | 66 | const F64 Ndens = 2.55e25; |
66 | const F64 Ndens2 = Ndens*Ndens; | 67 | const F64 Ndens2 = Ndens*Ndens; |
67 | 68 | ||
68 | // !!! *FIX: This #define should be in llcommon somewhere... | ||
69 | // We should not be #defining anything with leading underscores and | ||
70 | // much less double leading underscores since that is always vendor | ||
71 | // specific. Change this to something like LL_FORCE_INLINE. | ||
72 | #ifdef __GNUC__ | ||
73 | #define __forceinline inline __attribute__((always_inline)) | ||
74 | #endif | ||
75 | 69 | ||
76 | __forceinline LLColor3 color_div(const LLColor3 &col1, const LLColor3 &col2) | 70 | LL_FORCE_INLINE LLColor3 color_div(const LLColor3 &col1, const LLColor3 &col2) |
77 | { | 71 | { |
78 | return LLColor3( | 72 | return LLColor3( |
79 | col1.mV[0] / col2.mV[0], | 73 | col1.mV[0] / col2.mV[0], |
@@ -140,7 +134,7 @@ private: | |||
140 | public: | 134 | public: |
141 | static F32 getInterpVal() { return sInterpVal; } | 135 | static F32 getInterpVal() { return sInterpVal; } |
142 | static void setInterpVal(const F32 v) { sInterpVal = v; } | 136 | static void setInterpVal(const F32 v) { sInterpVal = v; } |
143 | static BOOL doInterpolate() { return sInterpVal > 0.001; } | 137 | static BOOL doInterpolate() { return sInterpVal > 0.001f; } |
144 | 138 | ||
145 | void bindTexture(BOOL curr = TRUE); | 139 | void bindTexture(BOOL curr = TRUE); |
146 | 140 | ||
@@ -311,7 +305,7 @@ public: | |||
311 | }; | 305 | }; |
312 | 306 | ||
313 | 307 | ||
314 | __forceinline LLColor3 refr_ind_calc(const LLColor3 &wave_length) | 308 | LL_FORCE_INLINE LLColor3 refr_ind_calc(const LLColor3 &wave_length) |
315 | { | 309 | { |
316 | LLColor3 refr_ind; | 310 | LLColor3 refr_ind; |
317 | for (S32 i = 0; i < 3; ++i) | 311 | for (S32 i = 0; i < 3; ++i) |
@@ -325,7 +319,7 @@ __forceinline LLColor3 refr_ind_calc(const LLColor3 &wave_length) | |||
325 | } | 319 | } |
326 | 320 | ||
327 | 321 | ||
328 | __forceinline LLColor3 calc_air_sca_sea_level() | 322 | LL_FORCE_INLINE LLColor3 calc_air_sca_sea_level() |
329 | { | 323 | { |
330 | const static LLColor3 WAVE_LEN(675, 520, 445); | 324 | const static LLColor3 WAVE_LEN(675, 520, 445); |
331 | const static LLColor3 refr_ind = refr_ind_calc(WAVE_LEN); | 325 | const static LLColor3 refr_ind = refr_ind_calc(WAVE_LEN); |
@@ -690,6 +684,7 @@ public: | |||
690 | 684 | ||
691 | public: | 685 | public: |
692 | static F32 sNighttimeBrightness; // [0,2] default = 1.0 | 686 | static F32 sNighttimeBrightness; // [0,2] default = 1.0 |
687 | LLFace *mFace[FACE_COUNT]; | ||
693 | 688 | ||
694 | protected: | 689 | protected: |
695 | LLPointer<LLViewerImage> mSunTexturep; | 690 | LLPointer<LLViewerImage> mSunTexturep; |
@@ -719,8 +714,7 @@ protected: | |||
719 | BOOL mWeatherChange; | 714 | BOOL mWeatherChange; |
720 | F32 mCloudDensity; | 715 | F32 mCloudDensity; |
721 | F32 mWind; | 716 | F32 mWind; |
722 | LLFace *mFace[FACE_COUNT]; | 717 | |
723 | |||
724 | BOOL mInitialized; | 718 | BOOL mInitialized; |
725 | BOOL mForceUpdate; //flag to force instantaneous update of cubemap | 719 | BOOL mForceUpdate; //flag to force instantaneous update of cubemap |
726 | LLVector3 mLastLightingDirection; | 720 | LLVector3 mLastLightingDirection; |