From 36e53ae0cd5aca07b95730bf145fb339759020cb Mon Sep 17 00:00:00 2001 From: baldurk Date: Tue, 29 Apr 2025 12:09:51 +0100 Subject: [PATCH] Ensure color format is always set for GL pixel history framebuffers --- renderdoc/driver/gl/gl_pixelhistory.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/renderdoc/driver/gl/gl_pixelhistory.cpp b/renderdoc/driver/gl/gl_pixelhistory.cpp index dba3b3bf4..6b04a7e85 100644 --- a/renderdoc/driver/gl/gl_pixelhistory.cpp +++ b/renderdoc/driver/gl/gl_pixelhistory.cpp @@ -166,6 +166,9 @@ const CopyFramebuffer &getCopyFramebuffer(WrappedOpenGL *driver, GLuint curStencil; GLint stencilType; + if(colorFormat == eGL_NONE) + colorFormat = eGL_RGBA8; + driver->glGetFramebufferAttachmentParameteriv(eGL_DRAW_FRAMEBUFFER, eGL_DEPTH_ATTACHMENT, eGL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME, (GLint *)&curDepth);