diff --git a/renderdoc/driver/gl/wrappers/gl_draw_funcs.cpp b/renderdoc/driver/gl/wrappers/gl_draw_funcs.cpp index 5b2f1793e..40f9db52a 100644 --- a/renderdoc/driver/gl/wrappers/gl_draw_funcs.cpp +++ b/renderdoc/driver/gl/wrappers/gl_draw_funcs.cpp @@ -3145,6 +3145,9 @@ bool WrappedOpenGL::Serialise_glClearNamedFramebufferfv(SerialiserType &ser, if(IsReplayingAndReading()) { + if(framebuffer.name == 0) + framebuffer.name = m_FakeBB_FBO; + // use ARB_direct_state_access functions here as we use EXT_direct_state_access elsewhere. If // we are running without ARB_dsa support, these functions are emulated in the obvious way. This // is necessary since these functions can be serialised even if ARB_dsa was not used originally, @@ -3268,6 +3271,9 @@ bool WrappedOpenGL::Serialise_glClearNamedFramebufferiv(SerialiserType &ser, if(IsReplayingAndReading()) { + if(framebuffer.name == 0) + framebuffer.name = m_FakeBB_FBO; + // use ARB_direct_state_access functions here as we use EXT_direct_state_access elsewhere. If // we are running without ARB_dsa support, these functions are emulated in the obvious way. This // is necessary since these functions can be serialised even if ARB_dsa was not used originally, @@ -3382,6 +3388,9 @@ bool WrappedOpenGL::Serialise_glClearNamedFramebufferuiv(SerialiserType &ser, if(IsReplayingAndReading()) { + if(framebuffer.name == 0) + framebuffer.name = m_FakeBB_FBO; + // use ARB_direct_state_access functions here as we use EXT_direct_state_access elsewhere. If // we are running without ARB_dsa support, these functions are emulated in the obvious way. This // is necessary since these functions can be serialised even if ARB_dsa was not used originally, @@ -3485,6 +3494,9 @@ bool WrappedOpenGL::Serialise_glClearNamedFramebufferfi(SerialiserType &ser, GLu if(IsReplayingAndReading()) { + if(framebuffer.name == 0) + framebuffer.name = m_FakeBB_FBO; + // use ARB_direct_state_access functions here as we use EXT_direct_state_access elsewhere. If // we are running without ARB_dsa support, these functions are emulated in the obvious way. This // is necessary since these functions can be serialised even if ARB_dsa was not used originally,