diff options
author | Jacek Antonelli | 2008-12-01 17:39:58 -0600 |
---|---|---|
committer | Jacek Antonelli | 2008-12-01 17:40:06 -0600 |
commit | 7abecb48babe6a6f09bf6692ba55076546cfced9 (patch) | |
tree | 8d18a88513fb97adf32c10aae78f4be1984942db /linden/indra/newview/llviewershadermgr.cpp | |
parent | Second Life viewer sources 1.21.6 (diff) | |
download | meta-impy-7abecb48babe6a6f09bf6692ba55076546cfced9.zip meta-impy-7abecb48babe6a6f09bf6692ba55076546cfced9.tar.gz meta-impy-7abecb48babe6a6f09bf6692ba55076546cfced9.tar.bz2 meta-impy-7abecb48babe6a6f09bf6692ba55076546cfced9.tar.xz |
Second Life viewer sources 1.22.0-RC
Diffstat (limited to '')
-rw-r--r-- | linden/indra/newview/llviewershadermgr.cpp | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/linden/indra/newview/llviewershadermgr.cpp b/linden/indra/newview/llviewershadermgr.cpp index a654120..44f6abe 100644 --- a/linden/indra/newview/llviewershadermgr.cpp +++ b/linden/indra/newview/llviewershadermgr.cpp | |||
@@ -108,7 +108,7 @@ GLint gAvatarMatrixParam; | |||
108 | LLViewerShaderMgr::LLViewerShaderMgr() : | 108 | LLViewerShaderMgr::LLViewerShaderMgr() : |
109 | mVertexShaderLevel(SHADER_COUNT, 0) | 109 | mVertexShaderLevel(SHADER_COUNT, 0) |
110 | { | 110 | { |
111 | /// Make sure WL Sky is the first program | 111 | /// Make sure WL Sky is the first program |
112 | mShaderList.push_back(&gWLSkyProgram); | 112 | mShaderList.push_back(&gWLSkyProgram); |
113 | mShaderList.push_back(&gWLCloudProgram); | 113 | mShaderList.push_back(&gWLCloudProgram); |
114 | mShaderList.push_back(&gAvatarProgram); | 114 | mShaderList.push_back(&gAvatarProgram); |
@@ -139,28 +139,28 @@ LLViewerShaderMgr * LLViewerShaderMgr::instance() | |||
139 | if(NULL == sInstance) | 139 | if(NULL == sInstance) |
140 | { | 140 | { |
141 | sInstance = new LLViewerShaderMgr(); | 141 | sInstance = new LLViewerShaderMgr(); |
142 | } | ||
143 | |||
144 | return static_cast<LLViewerShaderMgr*>(sInstance); | ||
145 | } | 142 | } |
146 | 143 | ||
144 | return static_cast<LLViewerShaderMgr*>(sInstance); | ||
145 | } | ||
146 | |||
147 | void LLViewerShaderMgr::initAttribsAndUniforms(void) | 147 | void LLViewerShaderMgr::initAttribsAndUniforms(void) |
148 | { | 148 | { |
149 | if (mReservedAttribs.empty()) | 149 | if (mReservedAttribs.empty()) |
150 | { | 150 | { |
151 | mReservedAttribs.push_back("materialColor"); | 151 | mReservedAttribs.push_back("materialColor"); |
152 | mReservedAttribs.push_back("specularColor"); | 152 | mReservedAttribs.push_back("specularColor"); |
153 | mReservedAttribs.push_back("binormal"); | 153 | mReservedAttribs.push_back("binormal"); |
154 | 154 | ||
155 | mAvatarAttribs.reserve(5); | 155 | mAvatarAttribs.reserve(5); |
156 | mAvatarAttribs.push_back("weight"); | 156 | mAvatarAttribs.push_back("weight"); |
157 | mAvatarAttribs.push_back("clothing"); | 157 | mAvatarAttribs.push_back("clothing"); |
158 | mAvatarAttribs.push_back("gWindDir"); | 158 | mAvatarAttribs.push_back("gWindDir"); |
159 | mAvatarAttribs.push_back("gSinWaveParams"); | 159 | mAvatarAttribs.push_back("gSinWaveParams"); |
160 | mAvatarAttribs.push_back("gGravity"); | 160 | mAvatarAttribs.push_back("gGravity"); |
161 | 161 | ||
162 | mAvatarUniforms.push_back("matrixPalette"); | 162 | mAvatarUniforms.push_back("matrixPalette"); |
163 | 163 | ||
164 | mReservedUniforms.reserve(24); | 164 | mReservedUniforms.reserve(24); |
165 | mReservedUniforms.push_back("diffuseMap"); | 165 | mReservedUniforms.push_back("diffuseMap"); |
166 | mReservedUniforms.push_back("specularMap"); | 166 | mReservedUniforms.push_back("specularMap"); |
@@ -186,16 +186,16 @@ void LLViewerShaderMgr::initAttribsAndUniforms(void) | |||
186 | mReservedUniforms.push_back("cloud_scale"); | 186 | mReservedUniforms.push_back("cloud_scale"); |
187 | mReservedUniforms.push_back("gamma"); | 187 | mReservedUniforms.push_back("gamma"); |
188 | mReservedUniforms.push_back("scene_light_strength"); | 188 | mReservedUniforms.push_back("scene_light_strength"); |
189 | 189 | ||
190 | mWLUniforms.push_back("camPosLocal"); | 190 | mWLUniforms.push_back("camPosLocal"); |
191 | 191 | ||
192 | mTerrainUniforms.reserve(5); | 192 | mTerrainUniforms.reserve(5); |
193 | mTerrainUniforms.push_back("detail_0"); | 193 | mTerrainUniforms.push_back("detail_0"); |
194 | mTerrainUniforms.push_back("detail_1"); | 194 | mTerrainUniforms.push_back("detail_1"); |
195 | mTerrainUniforms.push_back("detail_2"); | 195 | mTerrainUniforms.push_back("detail_2"); |
196 | mTerrainUniforms.push_back("detail_3"); | 196 | mTerrainUniforms.push_back("detail_3"); |
197 | mTerrainUniforms.push_back("alpha_ramp"); | 197 | mTerrainUniforms.push_back("alpha_ramp"); |
198 | 198 | ||
199 | mGlowUniforms.push_back("glowDelta"); | 199 | mGlowUniforms.push_back("glowDelta"); |
200 | mGlowUniforms.push_back("glowStrength"); | 200 | mGlowUniforms.push_back("glowStrength"); |
201 | 201 | ||
@@ -204,7 +204,7 @@ void LLViewerShaderMgr::initAttribsAndUniforms(void) | |||
204 | mGlowExtractUniforms.push_back("lumWeights"); | 204 | mGlowExtractUniforms.push_back("lumWeights"); |
205 | mGlowExtractUniforms.push_back("warmthWeights"); | 205 | mGlowExtractUniforms.push_back("warmthWeights"); |
206 | mGlowExtractUniforms.push_back("warmthAmount"); | 206 | mGlowExtractUniforms.push_back("warmthAmount"); |
207 | 207 | ||
208 | mShinyUniforms.push_back("origin"); | 208 | mShinyUniforms.push_back("origin"); |
209 | 209 | ||
210 | mWaterUniforms.reserve(12); | 210 | mWaterUniforms.reserve(12); |
@@ -222,9 +222,9 @@ void LLViewerShaderMgr::initAttribsAndUniforms(void) | |||
222 | mWaterUniforms.push_back("kd"); | 222 | mWaterUniforms.push_back("kd"); |
223 | mWaterUniforms.push_back("refScale"); | 223 | mWaterUniforms.push_back("refScale"); |
224 | mWaterUniforms.push_back("waterHeight"); | 224 | mWaterUniforms.push_back("waterHeight"); |
225 | } | 225 | } |
226 | } | 226 | } |
227 | 227 | ||
228 | 228 | ||
229 | //============================================================================ | 229 | //============================================================================ |
230 | // Set Levels | 230 | // Set Levels |
@@ -1087,12 +1087,12 @@ BOOL LLViewerShaderMgr::loadShadersWindLight() | |||
1087 | } | 1087 | } |
1088 | 1088 | ||
1089 | std::string LLViewerShaderMgr::getShaderDirPrefix(void) | 1089 | std::string LLViewerShaderMgr::getShaderDirPrefix(void) |
1090 | { | 1090 | { |
1091 | return gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "shaders/class"); | 1091 | return gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "shaders/class"); |
1092 | } | 1092 | } |
1093 | 1093 | ||
1094 | void LLViewerShaderMgr::updateShaderUniforms(LLGLSLShader * shader) | 1094 | void LLViewerShaderMgr::updateShaderUniforms(LLGLSLShader * shader) |
1095 | { | 1095 | { |
1096 | LLWLParamManager::instance()->updateShaderUniforms(shader); | 1096 | LLWLParamManager::instance()->updateShaderUniforms(shader); |
1097 | LLWaterParamManager::instance()->updateShaderUniforms(shader); | 1097 | LLWaterParamManager::instance()->updateShaderUniforms(shader); |
1098 | } | 1098 | } |