SL-15918 - supplementary fix to prevent screen flickr during captures
parent
9f02f94e80
commit
3e3087a135
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue