summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruslantproductengine <ruslantproductengine@lindenlab.com>2015-10-27 18:06:36 +0200
committerruslantproductengine <ruslantproductengine@lindenlab.com>2015-10-27 18:06:36 +0200
commit501033f521f2de7c47525996541e179670222792 (patch)
treec55883066556e0bd19c74600fc66eef8eaa4288d
parent7563bb647048725e144fea34ea3cba426eed0ad1 (diff)
MAINT-3491 FIXED If ALM is enabled while in wireframe mode, disabling wireframe mode results in a black screen.
-rwxr-xr-xindra/newview/llappviewer.cpp5
-rwxr-xr-xindra/newview/llappviewer.h1
-rwxr-xr-xindra/newview/llviewermenu.cpp15
3 files changed, 20 insertions, 1 deletions
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index fbf2a04bcc..260a3d8ce4 100755
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -327,7 +327,10 @@ BOOL gDisconnected = FALSE;
// used to restore texture state after a mode switch
LLFrameTimer gRestoreGLTimer;
BOOL gRestoreGL = FALSE;
-BOOL gUseWireframe = FALSE;
+BOOL gUseWireframe = FALSE;
+
+//use for remember deferred mode in wireframe switch
+BOOL gInitialDeferredModeForWireframe = FALSE;
// VFS globals - see llappviewer.h
LLVFS* gStaticVFS = NULL;
diff --git a/indra/newview/llappviewer.h b/indra/newview/llappviewer.h
index 718871138e..ad5268496b 100755
--- a/indra/newview/llappviewer.h
+++ b/indra/newview/llappviewer.h
@@ -375,6 +375,7 @@ extern BOOL gDisconnected;
extern LLFrameTimer gRestoreGLTimer;
extern BOOL gRestoreGL;
extern BOOL gUseWireframe;
+extern BOOL gInitialDeferredModeForWireframe;
// VFS globals - gVFS is for general use
// gStaticVFS is read-only and is shipped w/ the viewer
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 38d62dee5e..de219edcff 100755
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -1245,9 +1245,24 @@ class LLAdvancedToggleWireframe : public view_listener_t
bool handleEvent(const LLSD& userdata)
{
gUseWireframe = !(gUseWireframe);
+
+ if (gUseWireframe)
+ {
+ gInitialDeferredModeForWireframe = LLPipeline::sRenderDeferred;
+ }
+
gWindowResized = TRUE;
LLPipeline::updateRenderDeferred();
gPipeline.resetVertexBuffers();
+
+ if (!gUseWireframe && !gInitialDeferredModeForWireframe && LLPipeline::sRenderDeferred != gInitialDeferredModeForWireframe && gPipeline.isInit())
+ {
+ LLPipeline::refreshCachedSettings();
+ gPipeline.releaseGLBuffers();
+ gPipeline.createGLBuffers();
+ LLViewerShaderMgr::instance()->setShaders();
+ }
+
return true;
}
};