summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llviewerwindow.cpp27
1 files changed, 22 insertions, 5 deletions
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index b67842d7a1..d924898d1c 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -5198,13 +5198,30 @@ BOOL LLViewerWindow::simpleSnapshot(LLImageRaw* raw, S32 image_width, S32 image_
}
}
- const U32 subfield = 0;
- const bool do_rebuild = true;
- const F32 zoom = 1.0;
- const bool for_snapshot = TRUE;
-
+ // we render the scene more than once since this helps
+ // greatly with the objects not being drawn in the
+ // snapshot when they are drawn in the scene. This is
+ // evident when you set this value via the debug setting
+ // called 360CaptureNumRenderPasses to 1. The theory is
+ // that the missing objects are caused by the sUseOcclusion
+ // property in pipeline but that the use in pipeline.cpp
+ // lags by a frame or two so rendering more than once
+ // appears to help a lot.
for (int i = 0; i < num_render_passes; ++i)
{
+ // turning this flag off here prohibits the screen swap
+ // to present the new page to the viewer - this stops
+ // the black flash in between captures when the number
+ // of render passes is more than 1. We need to also
+ // set it here because code in LLViewerDisplay resets
+ // it to TRUE each time.
+ gDisplaySwapBuffers = FALSE;
+
+ // actually render the scene
+ const U32 subfield = 0;
+ const bool do_rebuild = true;
+ const F32 zoom = 1.0;
+ const bool for_snapshot = TRUE;
display(do_rebuild, zoom, subfield, for_snapshot);
}