diff options
author | Callum Prentice <callum@lindenlab.com> | 2021-08-31 15:23:38 -0700 |
---|---|---|
committer | Callum Prentice <callum@lindenlab.com> | 2021-08-31 15:23:38 -0700 |
commit | 3e3087a135d71527379ce9e60ea7f01cef9670bf (patch) | |
tree | 97f7ba56096e47fe2bcd192974453ef0560855c9 /indra | |
parent | 9f02f94e805869951232a6052230a37c444a68b4 (diff) |
SL-15918 - supplementary fix to prevent screen flickr during captures
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llviewerwindow.cpp | 27 |
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); } |