LLVLComposition::LLVLComposition(LLSurface *surfacep, const U32 width, const F32 scale) : LLViewerLayer(width, scale), mParamsReady(FALSE) { mSurfacep = surfacep; // Load Terrain Textures - Original ones setDetailTextureID(0, TERRAIN_DIRT_DETAIL); setDetailTextureID(1, TERRAIN_GRASS_DETAIL); setDetailTextureID(2, TERRAIN_MOUNTAIN_DETAIL); setDetailTextureID(3, TERRAIN_ROCK_DETAIL); static const LLCachedControl<F32> terrain_color_start_height("TerrainColorStartHeight", 20.f); static const LLCachedControl<F32> terrain_color_height_range("TerrainColorHeightRange", 60.f); // Initialize the texture matrix to defaults. for (S32 i = 0; i < CORNER_COUNT; ++i) { mStartHeight[i] = terrain_color_start_height; mHeightRange[i] = terrain_color_height_range; } mTexScaleX = width/16.f; mTexScaleY = width/16.f; mTexturesLoaded = FALSE; }
LLVLComposition::LLVLComposition(LLSurface *surfacep, const U32 width, const F32 scale) : LLViewerLayer(width, scale), mParamsReady(FALSE) { mSurfacep = surfacep; // Load Terrain Textures - Original ones setDetailTextureID(0, TERRAIN_DIRT_DETAIL); setDetailTextureID(1, TERRAIN_GRASS_DETAIL); setDetailTextureID(2, TERRAIN_MOUNTAIN_DETAIL); setDetailTextureID(3, TERRAIN_ROCK_DETAIL); // Initialize the texture matrix to defaults. for (S32 i = 0; i < CORNER_COUNT; ++i) { //Zwag: I'm making these static values because they are a LARGE performance problem // right now, and I've never heard of anyone changing them, they are not referenced // elsewhere, and have not changed in defaults since the original source code release. // We can move these back to signal connected statics if they really become important // variables in the future. mStartHeight[i] = 20.f;//gSavedSettings.getF32("TerrainColorStartHeight"); mHeightRange[i] = 60.f;//gSavedSettings.getF32("TerrainColorHeightRange"); } mTexScaleX = 16.f; mTexScaleY = 16.f; mTexturesLoaded = FALSE; }
LLVLComposition::LLVLComposition(LLSurface *surfacep, const U32 width, const F32 scale) : LLViewerLayer(width, scale), mParamsReady(FALSE) { mSurfacep = surfacep; // Load Terrain Textures - Original ones setDetailTextureID(0, TERRAIN_DIRT_DETAIL); setDetailTextureID(1, TERRAIN_GRASS_DETAIL); setDetailTextureID(2, TERRAIN_MOUNTAIN_DETAIL); setDetailTextureID(3, TERRAIN_ROCK_DETAIL); // Initialize the texture matrix to defaults. for (S32 i = 0; i < CORNER_COUNT; ++i) { mStartHeight[i] = gSavedSettings.getF32("TerrainColorStartHeight"); mHeightRange[i] = gSavedSettings.getF32("TerrainColorHeightRange"); } mTexScaleX = 16.f; mTexScaleY = 16.f; mTexturesLoaded = FALSE; }