From 86bd3ad9ad7dff7062e7f0bd6ef8d0bda2de7aee Mon Sep 17 00:00:00 2001 From: Justin Murray <33846034+syntheticmagus@users.noreply.github.com> Date: Fri, 12 Jun 2020 21:16:06 -0700 Subject: [PATCH] Broadened bypass mechanism for bgfx default headers in the OpenGL renderer. This reflects the fact that, if the first line of a shader is already a #version declaration, we never want to write lines above that regardless of what version is declared. (#2168) --- src/renderer_gl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/renderer_gl.cpp b/src/renderer_gl.cpp index 8e13ae5b7..097f22869 100644 --- a/src/renderer_gl.cpp +++ b/src/renderer_gl.cpp @@ -5824,7 +5824,7 @@ namespace bgfx { namespace gl if (0 != m_id) { if (GL_COMPUTE_SHADER != m_type - && 0 != bx::strCmp(code, "#version 430", 12) ) // #2000 + && 0 != bx::strCmp(code, "#version", 8) ) // #2000 { int32_t tempLen = code.getLength() + (4<<10); char* temp = (char*)alloca(tempLen);