aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden
diff options
context:
space:
mode:
authorArmin Weatherwax2010-10-16 13:21:51 +0200
committerArmin Weatherwax2010-10-16 13:21:51 +0200
commita184d2cbc46206f8b141c23b9427919ce243c6bb (patch)
treef6ece2f61979b0405efde11813ef47b4f19e42c4 /linden
parentChanged version to Experimental 2010.10.09 (diff)
downloadmeta-impy-a184d2cbc46206f8b141c23b9427919ce243c6bb.zip
meta-impy-a184d2cbc46206f8b141c23b9427919ce243c6bb.tar.gz
meta-impy-a184d2cbc46206f8b141c23b9427919ce243c6bb.tar.bz2
meta-impy-a184d2cbc46206f8b141c23b9427919ce243c6bb.tar.xz
fix bug #450 Terrain textures render rainbow
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/llvlcomposition.cpp12
-rw-r--r--linden/indra/newview/llvlcomposition.h2
2 files changed, 7 insertions, 7 deletions
diff --git a/linden/indra/newview/llvlcomposition.cpp b/linden/indra/newview/llvlcomposition.cpp
index 535c504..afd9b95 100644
--- a/linden/indra/newview/llvlcomposition.cpp
+++ b/linden/indra/newview/llvlcomposition.cpp
@@ -73,10 +73,10 @@ LLVLComposition::LLVLComposition(LLSurface *surfacep, const U32 width, const F32
73 73
74 // Load Terrain Textures - Original ones 74 // Load Terrain Textures - Original ones
75 // Load from file as OpenSim-based grids don't include these yet -- MC 75 // Load from file as OpenSim-based grids don't include these yet -- MC
76 setDetailTextureID(0, TERRAIN_DIRT_DETAIL.asString()+".j2c", TRUE, TRUE); 76 setDetailTextureID(0, TERRAIN_DIRT_DETAIL.asString()+".j2c", TRUE, FALSE, 0, 0, TERRAIN_DIRT_DETAIL);
77 setDetailTextureID(1, TERRAIN_GRASS_DETAIL.asString()+".j2c", TRUE, TRUE); 77 setDetailTextureID(1, TERRAIN_GRASS_DETAIL.asString()+".j2c", TRUE, FALSE, 0, 0, TERRAIN_GRASS_DETAIL);
78 setDetailTextureID(2, TERRAIN_MOUNTAIN_DETAIL.asString()+".j2c", TRUE, TRUE); 78 setDetailTextureID(2, TERRAIN_MOUNTAIN_DETAIL.asString()+".j2c", TRUE, FALSE, 0, 0, TERRAIN_MOUNTAIN_DETAIL);
79 setDetailTextureID(3, TERRAIN_ROCK_DETAIL.asString()+".j2c", TRUE, TRUE); 79 setDetailTextureID(3, TERRAIN_ROCK_DETAIL.asString()+".j2c", TRUE, FALSE, 0, 0, TERRAIN_ROCK_DETAIL);
80 80
81 // Initialize the texture matrix to defaults. 81 // Initialize the texture matrix to defaults.
82 for (S32 i = 0; i < CORNER_COUNT; ++i) 82 for (S32 i = 0; i < CORNER_COUNT; ++i)
@@ -112,13 +112,13 @@ void LLVLComposition::setDetailTextureID(S32 corner, const LLUUID& id)
112 mRawImages[corner] = NULL; 112 mRawImages[corner] = NULL;
113} 113}
114 114
115void LLVLComposition::setDetailTextureID(S32 corner, const std::string& filename, const bool& usemipmap, const bool& levelimmediate) 115void LLVLComposition::setDetailTextureID(S32 corner, const std::string& filename, const bool& usemipmap, const bool& levelimmediate, LLGLint internal_format, LLGLenum primary_format, const LLUUID& force_id)
116{ 116{
117 if(filename.empty()) 117 if(filename.empty())
118 { 118 {
119 return; 119 return;
120 } 120 }
121 mDetailTextures[corner] = gImageList.getImageFromFile(filename, usemipmap, levelimmediate); 121 mDetailTextures[corner] = gImageList.getImageFromFile(filename, usemipmap, levelimmediate, internal_format, primary_format, force_id);
122 mDetailTextures[corner]->setNoDelete() ; 122 mDetailTextures[corner]->setNoDelete() ;
123 mRawImages[corner] = NULL; 123 mRawImages[corner] = NULL;
124} 124}
diff --git a/linden/indra/newview/llvlcomposition.h b/linden/indra/newview/llvlcomposition.h
index 4ae296c..eb61bfd 100644
--- a/linden/indra/newview/llvlcomposition.h
+++ b/linden/indra/newview/llvlcomposition.h
@@ -67,7 +67,7 @@ public:
67 F32 getHeightRange(S32 corner); 67 F32 getHeightRange(S32 corner);
68 68
69 void setDetailTextureID(S32 corner, const LLUUID& id); 69 void setDetailTextureID(S32 corner, const LLUUID& id);
70 void setDetailTextureID(S32 corner, const std::string& filename, const bool& usemipmap, const bool& levelimmediate); 70 void setDetailTextureID(S32 corner, const std::string& filename, const bool& usemipmap, const bool& levelimmediate, LLGLint internal_format, LLGLenum primary_format, const LLUUID& force_id);
71 void setStartHeight(S32 corner, F32 start_height); 71 void setStartHeight(S32 corner, F32 start_height);
72 void setHeightRange(S32 corner, F32 range); 72 void setHeightRange(S32 corner, F32 range);
73 73