Fixed LLGLState::checkStates() failing upon context re-creation:

-After new context creation, immediately call LLRender::refreshState() after LLViewerWindow::initGLDefaults() in order to force states to apply.
--LLRender::initGLDefaults optimizes out gl calls by caching states, but the cached values are only applicable to the old context, not the new, so this optimization must be skipped (LLRender::mDirty).
-LLViewerWindow::mStatesDirty also triggered a redundant shader reload, since restoreGL also called setShaders().
Fixed somewhat annoying flicker of a single frame whilst recovering from screen resizing.
-Skip frame if LLViewerWindow::checkSettings() called LLViewerWindow::reshape. (reshape will set gWindowResized to true)
--True optimal fix will require some refactoring.
Reworked how window position is saved in LLViewerWindow::changeDisplaySettings. Hopefully reduces chances of odd behavior (had WindowX and WindowY get stuck at massive negative values before)
This commit is contained in:
Shyotl
2012-10-25 20:42:58 -05:00
parent 67ee544231
commit 1a741b97d2
5 changed files with 47 additions and 19 deletions

View File

@@ -449,7 +449,7 @@ protected:
class LLDebugText* mDebugText; // Internal class for debug text
bool mResDirty;
bool mStatesDirty;
//bool mStatesDirty; //Singu Note: No longer needed. State update is now in restoreGL.
bool mIsFullscreenChecked; // Did the user check the fullscreen checkbox in the display settings
U32 mCurrResolutionIndex;