diff options
| author | Dave Parks <davep@lindenlab.com> | 2011-09-26 18:31:55 -0500 |
|---|---|---|
| committer | Dave Parks <davep@lindenlab.com> | 2011-09-26 18:31:55 -0500 |
| commit | 54ba56dbe995a3d215f85932c83948145a871ac4 (patch) | |
| tree | c6162c3b56599db1b21f707e1c8b0b6f04a85064 /indra/llrender/llimagegl.cpp | |
| parent | 56191701bcbc0ef1b6872cc6bfac1d18f636fd12 (diff) | |
SH-2244 changes to run in a core context on AMD hardware without generating deprecation or performance warnings
Diffstat (limited to 'indra/llrender/llimagegl.cpp')
| -rw-r--r-- | indra/llrender/llimagegl.cpp | 12 |
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 { |
