Selectable cloud textures (from Alchemy)

Option is in Clouds tab of the Advanced Sky Editor.
This commit is contained in:
Inusaito Sayori
2015-05-19 06:57:26 -04:00
parent 9ed99176f7
commit 63d7e18456
9 changed files with 93 additions and 2 deletions

View File

@@ -47,6 +47,7 @@
#include "llviewerregion.h"
#include "llface.h"
#include "llrender.h"
#include "llviewercontrol.h"
LLPointer<LLViewerTexture> LLDrawPoolWLSky::sCloudNoiseTexture = NULL;
@@ -59,7 +60,11 @@ static LLGLSLShader* star_shader = NULL;
LLDrawPoolWLSky::LLDrawPoolWLSky(void) :
LLDrawPool(POOL_WL_SKY)
{
const std::string cloudNoiseFilename(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "windlight", "clouds2.tga"));
std::string cloudNoiseFilename(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "windlight/clouds", gSavedSettings.getString("AlchemyWLCloudTexture")));
if (!gDirUtilp->fileExists(cloudNoiseFilename))
{
cloudNoiseFilename = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "windlight/clouds", "Default.tga");
}
llinfos << "loading WindLight cloud noise from " << cloudNoiseFilename << llendl;
LLPointer<LLImageFormatted> cloudNoiseFile(LLImageFormatted::createFromExtension(cloudNoiseFilename));