From 02b3f3d0a1b789293fdc6a88bb37b67cc8f644d2 Mon Sep 17 00:00:00 2001 From: marauder2k7 Date: Fri, 10 Apr 2026 08:34:59 +0100 Subject: [PATCH] Update gfxGLDevice.cpp clearing the active program caused issues during a target bake as we call glClear after setting the shader etc. As this warning id 131204 seems to be a product of doing this, everything i read up on it says it is safe to silence it. --- Engine/source/gfx/gl/gfxGLDevice.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Engine/source/gfx/gl/gfxGLDevice.cpp b/Engine/source/gfx/gl/gfxGLDevice.cpp index c5b166a0e..efe84e873 100644 --- a/Engine/source/gfx/gl/gfxGLDevice.cpp +++ b/Engine/source/gfx/gl/gfxGLDevice.cpp @@ -104,6 +104,12 @@ void APIENTRY glDebugCallback( if (severity == GL_DEBUG_SEVERITY_NOTIFICATION) return; + // This warning id appears safe to ignore, we clear states + // but leave programs active when rendering to a target + // this produces a warning during glClear + if (id == 131204) + return; + const char* srcStr = "UNKNOWN"; const char* typeStr = "UNKNOWN"; const char* sevStr = "UNKNOWN"; @@ -640,10 +646,6 @@ void GFXGLDevice::copyResource(GFXTextureObject* pDst, GFXCubemap* pSrc, const U void GFXGLDevice::clear(U32 flags, const LinearColorF& color, F32 z, U32 stencil) { - glUseProgram(0); - mCurrentShader = NULL; - mCurrentConstBuffer = NULL; - // Make sure we have flushed our render target state. _updateRenderTargets();