More thorough VBO teardown in resetVertexBuffers/stopGL. Also, found cases where gGL.init failed to be called when it should have been.

This commit is contained in:
Shyotl
2015-06-01 17:58:19 -05:00
parent 142322528c
commit 0688cda8d2
8 changed files with 41 additions and 10 deletions

View File

@@ -1737,7 +1737,6 @@ LLViewerWindow::LLViewerWindow(
}
LLVertexBuffer::initClass(gSavedSettings.getBOOL("RenderVBOEnable"), gSavedSettings.getBOOL("RenderVBOMappingDisable"));
LL_INFOS("RenderInit") << "LLVertexBuffer initialization done." << LL_ENDL ;
gGL.init() ;
LLImageGL::initClass(LLViewerTexture::MAX_GL_IMAGE_CATEGORY) ;
if (LLFeatureManager::getInstance()->isSafe()
@@ -5307,6 +5306,8 @@ void LLViewerWindow::stopGL(BOOL save_state)
gGLManager.mIsDisabled = TRUE;
stop_glerror();
gGL.resetVertexBuffers();
llinfos << "Remaining allocated texture memory: " << LLImageGL::sGlobalTextureMemoryInBytes << " bytes" << llendl;
}
@@ -5323,6 +5324,7 @@ void LLViewerWindow::restoreGL(const std::string& progress_message)
llinfos << "Restoring GL..." << llendl;
gGLManager.mIsDisabled = FALSE;
gGL.init();
initGLDefaults();
gGL.refreshState(); //Singu Note: Call immediately. Cached states may have prevented initGLDefaults from actually applying changes.
LLGLState::restoreGL();