aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llvlcomposition.cpp
diff options
context:
space:
mode:
authorMcCabe Maxsted2010-08-16 16:55:04 -0700
committerMcCabe Maxsted2010-08-16 16:55:04 -0700
commitd76b75c113857ec50aa4896e9b3bd8c6d1cb06eb (patch)
tree8c8884384270fcdf7a2517b544fd93a20639fd00 /linden/indra/newview/llvlcomposition.cpp
parentLoad IMG_DEFAULT_SELECTED locally rather than from the server (fixes the sele... (diff)
downloadmeta-impy-d76b75c113857ec50aa4896e9b3bd8c6d1cb06eb.zip
meta-impy-d76b75c113857ec50aa4896e9b3bd8c6d1cb06eb.tar.gz
meta-impy-d76b75c113857ec50aa4896e9b3bd8c6d1cb06eb.tar.bz2
meta-impy-d76b75c113857ec50aa4896e9b3bd8c6d1cb06eb.tar.xz
Load other missing UUIDs from OpenSim from file instead
Diffstat (limited to 'linden/indra/newview/llvlcomposition.cpp')
-rw-r--r--linden/indra/newview/llvlcomposition.cpp20
1 files changed, 16 insertions, 4 deletions
diff --git a/linden/indra/newview/llvlcomposition.cpp b/linden/indra/newview/llvlcomposition.cpp
index e12504c..535c504 100644
--- a/linden/indra/newview/llvlcomposition.cpp
+++ b/linden/indra/newview/llvlcomposition.cpp
@@ -72,10 +72,11 @@ LLVLComposition::LLVLComposition(LLSurface *surfacep, const U32 width, const F32
72 mSurfacep = surfacep; 72 mSurfacep = surfacep;
73 73
74 // Load Terrain Textures - Original ones 74 // Load Terrain Textures - Original ones
75 setDetailTextureID(0, TERRAIN_DIRT_DETAIL); 75 // Load from file as OpenSim-based grids don't include these yet -- MC
76 setDetailTextureID(1, TERRAIN_GRASS_DETAIL); 76 setDetailTextureID(0, TERRAIN_DIRT_DETAIL.asString()+".j2c", TRUE, TRUE);
77 setDetailTextureID(2, TERRAIN_MOUNTAIN_DETAIL); 77 setDetailTextureID(1, TERRAIN_GRASS_DETAIL.asString()+".j2c", TRUE, TRUE);
78 setDetailTextureID(3, TERRAIN_ROCK_DETAIL); 78 setDetailTextureID(2, TERRAIN_MOUNTAIN_DETAIL.asString()+".j2c", TRUE, TRUE);
79 setDetailTextureID(3, TERRAIN_ROCK_DETAIL.asString()+".j2c", TRUE, TRUE);
79 80
80 // Initialize the texture matrix to defaults. 81 // Initialize the texture matrix to defaults.
81 for (S32 i = 0; i < CORNER_COUNT; ++i) 82 for (S32 i = 0; i < CORNER_COUNT; ++i)
@@ -111,6 +112,17 @@ void LLVLComposition::setDetailTextureID(S32 corner, const LLUUID& id)
111 mRawImages[corner] = NULL; 112 mRawImages[corner] = NULL;
112} 113}
113 114
115void LLVLComposition::setDetailTextureID(S32 corner, const std::string& filename, const bool& usemipmap, const bool& levelimmediate)
116{
117 if(filename.empty())
118 {
119 return;
120 }
121 mDetailTextures[corner] = gImageList.getImageFromFile(filename, usemipmap, levelimmediate);
122 mDetailTextures[corner]->setNoDelete() ;
123 mRawImages[corner] = NULL;
124}
125
114BOOL LLVLComposition::generateHeights(const F32 x, const F32 y, 126BOOL LLVLComposition::generateHeights(const F32 x, const F32 y,
115 const F32 width, const F32 height) 127 const F32 width, const F32 height)
116{ 128{