diff options
author | Dave Parks <davep@lindenlab.com> | 2011-05-19 20:38:39 -0500 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2011-05-19 20:38:39 -0500 |
commit | 51bb3c15c8ac6c85ed1a7e8526ba6b60794ac29e (patch) | |
tree | fb69cb7a3c1a98d271e0ee53880c7ad93a568502 /indra/llrender/llrender.cpp | |
parent | 6898b2c6d53fc04384f194d264c1c61bbc08c90f (diff) |
SH-469 WIP -- get rid of LLMultiSampleBuffer and use GL_ARB_texture_multisample instead.
Diffstat (limited to 'indra/llrender/llrender.cpp')
-rw-r--r-- | indra/llrender/llrender.cpp | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/indra/llrender/llrender.cpp b/indra/llrender/llrender.cpp index 49e10c4790..d5eb3979c3 100644 --- a/indra/llrender/llrender.cpp +++ b/indra/llrender/llrender.cpp @@ -53,7 +53,8 @@ static GLenum sGLTextureType[] = { GL_TEXTURE_2D, GL_TEXTURE_RECTANGLE_ARB, - GL_TEXTURE_CUBE_MAP_ARB + GL_TEXTURE_CUBE_MAP_ARB, + GL_TEXTURE_2D_MULTISAMPLE }; static GLint sGLAddressMode[] = @@ -121,12 +122,18 @@ void LLTexUnit::refreshState(void) glActiveTextureARB(GL_TEXTURE0_ARB + mIndex); if (mCurrTexType != TT_NONE) { - glEnable(sGLTextureType[mCurrTexType]); + if (mCurrTexType != LLTexUnit::TT_MULTISAMPLE_TEXTURE) + { + glEnable(sGLTextureType[mCurrTexType]); + } glBindTexture(sGLTextureType[mCurrTexType], mCurrTexture); } else { - glDisable(GL_TEXTURE_2D); + if (mCurrTexType != LLTexUnit::TT_MULTISAMPLE_TEXTURE) + { + glDisable(GL_TEXTURE_2D); + } glBindTexture(GL_TEXTURE_2D, 0); } @@ -167,7 +174,10 @@ void LLTexUnit::enable(eTextureType type) mCurrTexType = type; gGL.flush(); - glEnable(sGLTextureType[type]); + if (type != LLTexUnit::TT_MULTISAMPLE_TEXTURE) + { + glEnable(sGLTextureType[type]); + } } } @@ -180,7 +190,10 @@ void LLTexUnit::disable(void) activate(); unbind(mCurrTexType); gGL.flush(); - glDisable(sGLTextureType[mCurrTexType]); + if (mCurrTexType != LLTexUnit::TT_MULTISAMPLE_TEXTURE) + { + glDisable(sGLTextureType[mCurrTexType]); + } mCurrTexType = TT_NONE; } } @@ -399,7 +412,7 @@ void LLTexUnit::setTextureAddressMode(eTextureAddressMode mode) void LLTexUnit::setTextureFilteringOption(LLTexUnit::eTextureFilterOptions option) { - if (mIndex < 0 || mCurrTexture == 0) return; + if (mIndex < 0 || mCurrTexture == 0 || mCurrTexType == LLTexUnit::TT_MULTISAMPLE_TEXTURE) return; gGL.flush(); |