summaryrefslogtreecommitdiff
path: root/indra/llrender/llcubemap.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llrender/llcubemap.cpp')
-rw-r--r--indra/llrender/llcubemap.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/indra/llrender/llcubemap.cpp b/indra/llrender/llcubemap.cpp
index 40d15280d3..cc61158aa6 100644
--- a/indra/llrender/llcubemap.cpp
+++ b/indra/llrender/llcubemap.cpp
@@ -183,8 +183,7 @@ void LLCubeMap::initEnvironmentMap(const std::vector<LLPointer<LLImageRaw> >& ra
llassert(rawimages[i]->getHeight() == resolution);
llassert(rawimages[i]->getComponents() == components);
-
- mImages[i] = new LLImageGL(resolution, resolution, components, FALSE);
+ mImages[i] = new LLImageGL(resolution, resolution, components, TRUE);
mImages[i]->setTarget(mTargets[i], LLTexUnit::TT_CUBE_MAP);
mRawImages[i] = rawimages[i];
mImages[i]->createGLTexture(0, mRawImages[i], texname);
@@ -195,6 +194,11 @@ void LLCubeMap::initEnvironmentMap(const std::vector<LLPointer<LLImageRaw> >& ra
mImages[i]->setSubImage(mRawImages[i], 0, 0, resolution, resolution);
}
+ enableTexture(0);
+ bind();
+ mImages[0]->setFilteringOption(LLTexUnit::TFO_ANISOTROPIC);
+ glEnable(GL_TEXTURE_CUBE_MAP_SEAMLESS);
+ glGenerateMipmap(GL_TEXTURE_CUBE_MAP);
gGL.getTexUnit(0)->disable();
disable();
}