Fixed issues with changing AA and AF...

-AF change no longer reloads the window to apply. Doing such isn't needed anymore.
-AA change no longer reloads the window to apply, IFF RenderUseFBO is true.
-AA change, IFF RenderUseFBO is false, reloads window. Texture issues under this scenario should be resolved.
-LLComboBox now updates control_name it's linked to, automatically.
-New LLComboBox Behavor when paired with new AA/AF application changes renders LLFloaterHardwareSettings::apply() pointless, EXCEPT for when changing AA while FBOs are off.
This commit is contained in:
Shyotl
2011-04-23 00:58:27 -05:00
parent 98c2b7e11f
commit 0b1b7c6618
4 changed files with 38 additions and 21 deletions

View File

@@ -301,11 +301,13 @@ S32 LLImageGL::updateBoundTexMem()const
//static
void LLImageGL::destroyGL(BOOL save_state)
{
deleteDeadTextures(); //Dump unimportant textures.
for (S32 stage = 0; stage < gGLManager.mNumTextureUnits; stage++)
{
gGL.getTexUnit(stage)->unbind(LLTexUnit::TT_TEXTURE);
}
int stored_count = 0;
sAllowReadBackRaw = true ;
for (std::set<LLImageGL*>::iterator iter = sImageList.begin();
iter != sImageList.end(); iter++)
@@ -320,18 +322,24 @@ void LLImageGL::destroyGL(BOOL save_state)
{
glimage->mSaveData = NULL ;
}
else
stored_count++;
}
glimage->destroyGLTexture();
stop_glerror();
}
}
llinfos << "Storing " << stored_count << " images..." << llendl;
sAllowReadBackRaw = false ;
deleteDeadTextures();//Now, actually call glDeleteTextures for everything.
}
//static
void LLImageGL::restoreGL()
{
int recovered_count = 0;
for (std::set<LLImageGL*>::iterator iter = sImageList.begin();
iter != sImageList.end(); iter++)
{
@@ -346,10 +354,12 @@ void LLImageGL::restoreGL()
{
glimage->createGLTexture(glimage->mCurrentDiscardLevel, glimage->mSaveData, 0, TRUE, glimage->getCategory());
stop_glerror();
recovered_count++;
}
glimage->mSaveData = NULL; // deletes data
}
}
llinfos << "Restored " << recovered_count << " images" << llendl;
}
//static
@@ -1281,7 +1291,7 @@ BOOL LLImageGL::readBackRaw(S32 discard_level, LLImageRaw* imageraw, bool compre
llverify(gGL.getTexUnit(0)->bindManual(mBindTarget, mTexName));
//debug code, leave it there commented.
//checkTexSize() ;
checkTexSize() ;
LLGLint glwidth = 0;
glGetTexLevelParameteriv(mTarget, gl_discard, GL_TEXTURE_WIDTH, (GLint*)&glwidth);