summaryrefslogtreecommitdiff
path: root/indra/llrender/llimagegl.cpp
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2011-09-26 18:32:12 -0500
committerDave Parks <davep@lindenlab.com>2011-09-26 18:32:12 -0500
commit8dbfa022778f2a7fcd5d2b527045724551279412 (patch)
tree4e88cb98b66cff493887a93572ffc4c39c951a8e /indra/llrender/llimagegl.cpp
parentc7a16ef091409f55427f7cf0e9057130b47d2574 (diff)
parent54ba56dbe995a3d215f85932c83948145a871ac4 (diff)
merge
Diffstat (limited to 'indra/llrender/llimagegl.cpp')
-rw-r--r--indra/llrender/llimagegl.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/indra/llrender/llimagegl.cpp b/indra/llrender/llimagegl.cpp
index 12089e5ad3..cbdb8f83f6 100644
--- a/indra/llrender/llimagegl.cpp
+++ b/indra/llrender/llimagegl.cpp
@@ -725,9 +725,12 @@ void LLImageGL::setImage(const U8* data_in, BOOL data_hasmips)
}
else if (!is_compressed)
{
- if (mAutoGenMips && !LLRender::sGLCoreProfile) //auto-generating mipmaps is deprecated in GL 3.0
+ if (mAutoGenMips)
{
- glTexParameteri(LLTexUnit::getInternalType(mBindTarget), GL_GENERATE_MIPMAP_SGIS, TRUE);
+ if (!glGenerateMipmap)
+ {
+ glTexParameteri(LLTexUnit::getInternalType(mBindTarget), GL_GENERATE_MIPMAP_SGIS, TRUE);
+ }
stop_glerror();
{
// LLFastTimer t2(FTM_TEMP4);
@@ -756,6 +759,11 @@ void LLImageGL::setImage(const U8* data_in, BOOL data_hasmips)
stop_glerror();
}
}
+
+ if (glGenerateMipmap)
+ {
+ glGenerateMipmap(LLTexUnit::getInternalType(mBindTarget));
+ }
}
else
{