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)

This commit is contained in:
Justin Murray
2020-06-12 21:16:06 -07:00
committed by GitHub
parent 77557f9c72
commit 86bd3ad9ad

View File

@@ -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);