From a184d2cbc46206f8b141c23b9427919ce243c6bb Mon Sep 17 00:00:00 2001 From: Armin Weatherwax Date: Sat, 16 Oct 2010 13:21:51 +0200 Subject: fix bug #450 Terrain textures render rainbow --- linden/indra/newview/llvlcomposition.cpp | 12 ++++++------ linden/indra/newview/llvlcomposition.h | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'linden') 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 // Load Terrain Textures - Original ones // Load from file as OpenSim-based grids don't include these yet -- MC - setDetailTextureID(0, TERRAIN_DIRT_DETAIL.asString()+".j2c", TRUE, TRUE); - setDetailTextureID(1, TERRAIN_GRASS_DETAIL.asString()+".j2c", TRUE, TRUE); - setDetailTextureID(2, TERRAIN_MOUNTAIN_DETAIL.asString()+".j2c", TRUE, TRUE); - setDetailTextureID(3, TERRAIN_ROCK_DETAIL.asString()+".j2c", TRUE, TRUE); + setDetailTextureID(0, TERRAIN_DIRT_DETAIL.asString()+".j2c", TRUE, FALSE, 0, 0, TERRAIN_DIRT_DETAIL); + setDetailTextureID(1, TERRAIN_GRASS_DETAIL.asString()+".j2c", TRUE, FALSE, 0, 0, TERRAIN_GRASS_DETAIL); + setDetailTextureID(2, TERRAIN_MOUNTAIN_DETAIL.asString()+".j2c", TRUE, FALSE, 0, 0, TERRAIN_MOUNTAIN_DETAIL); + setDetailTextureID(3, TERRAIN_ROCK_DETAIL.asString()+".j2c", TRUE, FALSE, 0, 0, TERRAIN_ROCK_DETAIL); // Initialize the texture matrix to defaults. for (S32 i = 0; i < CORNER_COUNT; ++i) @@ -112,13 +112,13 @@ void LLVLComposition::setDetailTextureID(S32 corner, const LLUUID& id) mRawImages[corner] = NULL; } -void LLVLComposition::setDetailTextureID(S32 corner, const std::string& filename, const bool& usemipmap, const bool& levelimmediate) +void LLVLComposition::setDetailTextureID(S32 corner, const std::string& filename, const bool& usemipmap, const bool& levelimmediate, LLGLint internal_format, LLGLenum primary_format, const LLUUID& force_id) { if(filename.empty()) { return; } - mDetailTextures[corner] = gImageList.getImageFromFile(filename, usemipmap, levelimmediate); + mDetailTextures[corner] = gImageList.getImageFromFile(filename, usemipmap, levelimmediate, internal_format, primary_format, force_id); mDetailTextures[corner]->setNoDelete() ; mRawImages[corner] = NULL; } 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: F32 getHeightRange(S32 corner); void setDetailTextureID(S32 corner, const LLUUID& id); - void setDetailTextureID(S32 corner, const std::string& filename, const bool& usemipmap, const bool& levelimmediate); + void setDetailTextureID(S32 corner, const std::string& filename, const bool& usemipmap, const bool& levelimmediate, LLGLint internal_format, LLGLenum primary_format, const LLUUID& force_id); void setStartHeight(S32 corner, F32 start_height); void setHeightRange(S32 corner, F32 range); -- cgit v1.1