소스 검색

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)

Justin Murray 5 년 전
부모
커밋
86bd3ad9ad
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/renderer_gl.cpp

+ 1 - 1
src/renderer_gl.cpp

@@ -5824,7 +5824,7 @@ namespace bgfx { namespace gl
 		if (0 != m_id)
 		if (0 != m_id)
 		{
 		{
 			if (GL_COMPUTE_SHADER != m_type
 			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);
 				int32_t tempLen = code.getLength() + (4<<10);
 				char* temp = (char*)alloca(tempLen);
 				char* temp = (char*)alloca(tempLen);