Commit df3d8a34 authored by Rye Mutt's avatar Rye Mutt 🍞
Browse files

Fix issues #40 and #41 color format set incorrectly on render target

parent 719923fd
...@@ -4697,7 +4697,8 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei ...@@ -4697,7 +4697,8 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei
if ((image_width <= gGLManager.mGLMaxTextureSize && image_height <= gGLManager.mGLMaxTextureSize) && if ((image_width <= gGLManager.mGLMaxTextureSize && image_height <= gGLManager.mGLMaxTextureSize) &&
(image_width > window_width || image_height > window_height) && LLPipeline::sRenderDeferred && !show_ui) (image_width > window_width || image_height > window_height) && LLPipeline::sRenderDeferred && !show_ui)
{ {
if (scratch_space.allocate(image_width, image_height, GL_DEPTH_COMPONENT24, true, true)) const 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_width = gPipeline.mDeferredScreen.getWidth();
original_height = gPipeline.mDeferredScreen.getHeight(); original_height = gPipeline.mDeferredScreen.getHeight();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment