diff options
Diffstat (limited to 'linden/indra/newview/lldrawpoolterrain.cpp')
-rw-r--r-- | linden/indra/newview/lldrawpoolterrain.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/linden/indra/newview/lldrawpoolterrain.cpp b/linden/indra/newview/lldrawpoolterrain.cpp index 2cd2fdb..ccfbd2d 100644 --- a/linden/indra/newview/lldrawpoolterrain.cpp +++ b/linden/indra/newview/lldrawpoolterrain.cpp | |||
@@ -51,7 +51,7 @@ | |||
51 | #include "llviewerimagelist.h" // To get alpha gradients | 51 | #include "llviewerimagelist.h" // To get alpha gradients |
52 | #include "llworld.h" | 52 | #include "llworld.h" |
53 | #include "pipeline.h" | 53 | #include "pipeline.h" |
54 | #include "llglslshader.h" | 54 | #include "llviewershadermgr.h" |
55 | #include "llrender.h" | 55 | #include "llrender.h" |
56 | 56 | ||
57 | const F32 DETAIL_SCALE = 1.f/16.f; | 57 | const F32 DETAIL_SCALE = 1.f/16.f; |
@@ -101,7 +101,7 @@ LLDrawPool *LLDrawPoolTerrain::instancePool() | |||
101 | 101 | ||
102 | void LLDrawPoolTerrain::prerender() | 102 | void LLDrawPoolTerrain::prerender() |
103 | { | 103 | { |
104 | mVertexShaderLevel = LLShaderMgr::getVertexShaderLevel(LLShaderMgr::SHADER_ENVIRONMENT); | 104 | mVertexShaderLevel = LLViewerShaderMgr::instance()->getVertexShaderLevel(LLViewerShaderMgr::SHADER_ENVIRONMENT); |
105 | if (mVertexShaderLevel > 0) | 105 | if (mVertexShaderLevel > 0) |
106 | { | 106 | { |
107 | sDetailMode = 1; | 107 | sDetailMode = 1; |
@@ -239,7 +239,7 @@ void LLDrawPoolTerrain::renderFullShader() | |||
239 | // | 239 | // |
240 | // detail texture 0 | 240 | // detail texture 0 |
241 | // | 241 | // |
242 | S32 detail0 = sShader->enableTexture(LLShaderMgr::TERRAIN_DETAIL0); | 242 | S32 detail0 = sShader->enableTexture(LLViewerShaderMgr::TERRAIN_DETAIL0); |
243 | LLViewerImage::bindTexture(detail_texture0p,detail0); | 243 | LLViewerImage::bindTexture(detail_texture0p,detail0); |
244 | gGL.getTexUnit(0)->activate(); | 244 | gGL.getTexUnit(0)->activate(); |
245 | 245 | ||
@@ -257,7 +257,7 @@ void LLDrawPoolTerrain::renderFullShader() | |||
257 | // | 257 | // |
258 | // detail texture 1 | 258 | // detail texture 1 |
259 | // | 259 | // |
260 | S32 detail1 = sShader->enableTexture(LLShaderMgr::TERRAIN_DETAIL1); | 260 | S32 detail1 = sShader->enableTexture(LLViewerShaderMgr::TERRAIN_DETAIL1); |
261 | LLViewerImage::bindTexture(detail_texture1p,detail1); | 261 | LLViewerImage::bindTexture(detail_texture1p,detail1); |
262 | 262 | ||
263 | /// ALPHA TEXTURE COORDS 0: | 263 | /// ALPHA TEXTURE COORDS 0: |
@@ -268,7 +268,7 @@ void LLDrawPoolTerrain::renderFullShader() | |||
268 | 268 | ||
269 | // detail texture 2 | 269 | // detail texture 2 |
270 | // | 270 | // |
271 | S32 detail2 = sShader->enableTexture(LLShaderMgr::TERRAIN_DETAIL2); | 271 | S32 detail2 = sShader->enableTexture(LLViewerShaderMgr::TERRAIN_DETAIL2); |
272 | LLViewerImage::bindTexture(detail_texture2p,detail2); | 272 | LLViewerImage::bindTexture(detail_texture2p,detail2); |
273 | glEnable(GL_TEXTURE_2D); | 273 | glEnable(GL_TEXTURE_2D); |
274 | 274 | ||
@@ -282,7 +282,7 @@ void LLDrawPoolTerrain::renderFullShader() | |||
282 | // | 282 | // |
283 | // detail texture 3 | 283 | // detail texture 3 |
284 | // | 284 | // |
285 | S32 detail3 = sShader->enableTexture(LLShaderMgr::TERRAIN_DETAIL3); | 285 | S32 detail3 = sShader->enableTexture(LLViewerShaderMgr::TERRAIN_DETAIL3); |
286 | LLViewerImage::bindTexture(detail_texture3p,detail3); | 286 | LLViewerImage::bindTexture(detail_texture3p,detail3); |
287 | 287 | ||
288 | /// ALPHA TEXTURE COORDS 2: | 288 | /// ALPHA TEXTURE COORDS 2: |
@@ -295,18 +295,18 @@ void LLDrawPoolTerrain::renderFullShader() | |||
295 | // | 295 | // |
296 | // Alpha Ramp | 296 | // Alpha Ramp |
297 | // | 297 | // |
298 | S32 alpha_ramp = sShader->enableTexture(LLShaderMgr::TERRAIN_ALPHARAMP); | 298 | S32 alpha_ramp = sShader->enableTexture(LLViewerShaderMgr::TERRAIN_ALPHARAMP); |
299 | LLViewerImage::bindTexture(m2DAlphaRampImagep,alpha_ramp); | 299 | LLViewerImage::bindTexture(m2DAlphaRampImagep,alpha_ramp); |
300 | 300 | ||
301 | // GL_BLEND disabled by default | 301 | // GL_BLEND disabled by default |
302 | drawLoop(); | 302 | drawLoop(); |
303 | 303 | ||
304 | // Disable multitexture | 304 | // Disable multitexture |
305 | sShader->disableTexture(LLShaderMgr::TERRAIN_ALPHARAMP); | 305 | sShader->disableTexture(LLViewerShaderMgr::TERRAIN_ALPHARAMP); |
306 | sShader->disableTexture(LLShaderMgr::TERRAIN_DETAIL0); | 306 | sShader->disableTexture(LLViewerShaderMgr::TERRAIN_DETAIL0); |
307 | sShader->disableTexture(LLShaderMgr::TERRAIN_DETAIL1); | 307 | sShader->disableTexture(LLViewerShaderMgr::TERRAIN_DETAIL1); |
308 | sShader->disableTexture(LLShaderMgr::TERRAIN_DETAIL2); | 308 | sShader->disableTexture(LLViewerShaderMgr::TERRAIN_DETAIL2); |
309 | sShader->disableTexture(LLShaderMgr::TERRAIN_DETAIL3); | 309 | sShader->disableTexture(LLViewerShaderMgr::TERRAIN_DETAIL3); |
310 | 310 | ||
311 | LLImageGL::unbindTexture(alpha_ramp, GL_TEXTURE_2D); | 311 | LLImageGL::unbindTexture(alpha_ramp, GL_TEXTURE_2D); |
312 | gGL.getTexUnit(4)->activate(); | 312 | gGL.getTexUnit(4)->activate(); |