summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerwindow.cpp
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2020-03-19 12:53:05 +0000
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2020-03-19 12:53:05 +0000
commit62be7c38965deb79cbd984cfd4546be040f9c465 (patch)
tree492a84da19dc4ba05d41fdc083ad5f579f39b2ee /indra/newview/llviewerwindow.cpp
parent9a6dcc011c54f65e5da3c3b92074386946d8f291 (diff)
parent328329fceab6b18dd7dda6f7ce9a3d4788fd7c54 (diff)
Merged master into sl-11445_fmodstudio
Diffstat (limited to 'indra/newview/llviewerwindow.cpp')
-rw-r--r--indra/newview/llviewerwindow.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index f4c2e93a45..ff5dff1c9b 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -4717,7 +4717,8 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei
if ((image_width <= gGLManager.mGLMaxTextureSize && image_height <= gGLManager.mGLMaxTextureSize) &&
(image_width > window_width || image_height > window_height) && LLPipeline::sRenderDeferred && !show_ui)
{
- if (scratch_space.allocate(image_width, image_height, GL_DEPTH_COMPONENT, true, true))
+ U32 color_fmt = type == LLSnapshotModel::SNAPSHOT_TYPE_DEPTH ? GL_DEPTH_COMPONENT : GL_RGBA;
+ if (scratch_space.allocate(image_width, image_height, color_fmt, true, true))
{
original_width = gPipeline.mDeferredScreen.getWidth();
original_height = gPipeline.mDeferredScreen.getHeight();