Anonymous avatar Anonymous committed 12e13a8

SH-281 Fix for snapshots showing interface all the time

Comments (0)

Files changed (2)

indra/newview/llviewerdisplay.cpp

 	if (gResizeScreenTexture)
 	{ //skip render on frames where screen texture is resizing
 		gGL.flush();
-		glClear(GL_COLOR_BUFFER_BIT);
-		gViewerWindow->mWindow->swapBuffers();
+		if (!for_snapshot)
+		{
+			glClear(GL_COLOR_BUFFER_BIT);
+			gViewerWindow->mWindow->swapBuffers();
+		}
+	
 		gResizeScreenTexture = FALSE;
 		gPipeline.resizeScreenTexture();
-		return;
+
+		if (!for_snapshot)
+		{
+			return;
+		}
+	}
+
+	if (LLPipeline::sRenderDeferred)
+	{ //hack to make sky show up in deferred snapshots
+		for_snapshot = FALSE;
 	}
 
 	if (LLPipeline::sRenderFrameTest)

indra/newview/llviewerwindow.cpp

 	setCursor(UI_CURSOR_WAIT);
 
 	// Hide all the UI widgets first and draw a frame
-	BOOL prev_draw_ui = gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI);
+	BOOL prev_draw_ui = gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI) ? TRUE : FALSE;
+
+	show_ui = show_ui ? TRUE : FALSE;
 
 	if ( prev_draw_ui != show_ui)
 	{
 
 				if (LLPipeline::sRenderDeferred)
 				{
-					display(do_rebuild, scale_factor, subfield, FALSE);
+					display(do_rebuild, scale_factor, subfield, TRUE);
 				}
 				else
 				{
 					display(do_rebuild, scale_factor, subfield, TRUE);
-					// Required for showing the GUI in snapshots?  See DEV-16350 for details. JC
+					// Required for showing the GUI in snapshots and performing bloom composite overlay
+					// Call even if show_ui is FALSE
 					render_ui(scale_factor, subfield);
 				}
 			}
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.