aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/lldrawpoolterrain.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/newview/lldrawpoolterrain.cpp')
-rw-r--r--linden/indra/newview/lldrawpoolterrain.cpp22
1 files changed, 12 insertions, 10 deletions
diff --git a/linden/indra/newview/lldrawpoolterrain.cpp b/linden/indra/newview/lldrawpoolterrain.cpp
index 8ac053c..7586b76 100644
--- a/linden/indra/newview/lldrawpoolterrain.cpp
+++ b/linden/indra/newview/lldrawpoolterrain.cpp
@@ -4,6 +4,7 @@
4 * 4 *
5 * Copyright (c) 2002-2007, Linden Research, Inc. 5 * Copyright (c) 2002-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
@@ -47,6 +48,7 @@
47#include "llviewerimagelist.h" // To get alpha gradients 48#include "llviewerimagelist.h" // To get alpha gradients
48#include "llworld.h" 49#include "llworld.h"
49#include "pipeline.h" 50#include "pipeline.h"
51#include "llglslshader.h"
50 52
51const F32 DETAIL_SCALE = 1.f/16.f; 53const F32 DETAIL_SCALE = 1.f/16.f;
52int DebugDetailMap = 0; 54int DebugDetailMap = 0;
@@ -168,10 +170,10 @@ void LLDrawPoolTerrain::render(S32 pass)
168 gPipeline.disableLights(); 170 gPipeline.disableLights();
169 if ((mVertexShaderLevel > 0)) 171 if ((mVertexShaderLevel > 0))
170 { 172 {
171 gPipeline.mHighlightProgram.bind(); 173 gHighlightProgram.bind();
172 gPipeline.mHighlightProgram.vertexAttrib4f(LLPipeline::GLSL_MATERIAL_COLOR,1,1,1,1); 174 gHighlightProgram.vertexAttrib4f(LLShaderMgr::MATERIAL_COLOR,1,1,1,1);
173 renderOwnership(); 175 renderOwnership();
174 gPipeline.mTerrainProgram.bind(); 176 gTerrainProgram.bind();
175 } 177 }
176 else 178 else
177 { 179 {
@@ -222,9 +224,9 @@ void LLDrawPoolTerrain::renderFull4TUShader()
222 // Stage 0: detail texture 0 224 // Stage 0: detail texture 0
223 // 225 //
224 226
225 S32 detailTex0 = gPipeline.mTerrainProgram.enableTexture(LLPipeline::GLSL_TERRAIN_DETAIL0); 227 S32 detailTex0 = gTerrainProgram.enableTexture(LLShaderMgr::TERRAIN_DETAIL0);
226 S32 detailTex1 = gPipeline.mTerrainProgram.enableTexture(LLPipeline::GLSL_TERRAIN_DETAIL1); 228 S32 detailTex1 = gTerrainProgram.enableTexture(LLShaderMgr::TERRAIN_DETAIL1);
227 S32 rampTex = gPipeline.mTerrainProgram.enableTexture(LLPipeline::GLSL_TERRAIN_ALPHARAMP); 229 S32 rampTex = gTerrainProgram.enableTexture(LLShaderMgr::TERRAIN_ALPHARAMP);
228 230
229 LLViewerImage::bindTexture(detail_texture0p,detailTex0); 231 LLViewerImage::bindTexture(detail_texture0p,detailTex0);
230 232
@@ -341,9 +343,9 @@ void LLDrawPoolTerrain::renderFull4TUShader()
341 } 343 }
342 344
343 // Disable multitexture 345 // Disable multitexture
344 gPipeline.mTerrainProgram.disableTexture(LLPipeline::GLSL_TERRAIN_ALPHARAMP); 346 gTerrainProgram.disableTexture(LLShaderMgr::TERRAIN_ALPHARAMP);
345 gPipeline.mTerrainProgram.disableTexture(LLPipeline::GLSL_TERRAIN_DETAIL0); 347 gTerrainProgram.disableTexture(LLShaderMgr::TERRAIN_DETAIL0);
346 gPipeline.mTerrainProgram.disableTexture(LLPipeline::GLSL_TERRAIN_DETAIL1); 348 gTerrainProgram.disableTexture(LLShaderMgr::TERRAIN_DETAIL1);
347 349
348 glClientActiveTextureARB(GL_TEXTURE3_ARB); 350 glClientActiveTextureARB(GL_TEXTURE3_ARB);
349 glActiveTextureARB(GL_TEXTURE3_ARB); 351 glActiveTextureARB(GL_TEXTURE3_ARB);
@@ -1080,5 +1082,5 @@ LLColor3 LLDrawPoolTerrain::getDebugColor() const
1080 1082
1081S32 LLDrawPoolTerrain::getMaterialAttribIndex() 1083S32 LLDrawPoolTerrain::getMaterialAttribIndex()
1082{ 1084{
1083 return gPipeline.mTerrainProgram.mAttribute[LLPipeline::GLSL_MATERIAL_COLOR]; 1085 return gTerrainProgram.mAttribute[LLShaderMgr::MATERIAL_COLOR];
1084} 1086}