Преглед изворни кода

Fix usage of bx::findIdentifierMatch for gl_FragDepth (#2533)

When trying to find all the instances of gl_FragDepth
and replace them with bgfx_FragDepth it only finds
the first instance.
kingscallop пре 4 година
родитељ
комит
6a529fca4b
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      src/renderer_gl.cpp

+ 1 - 1
src/renderer_gl.cpp

@@ -6199,7 +6199,7 @@ namespace bgfx { namespace gl
 					// Replace all instances of gl_FragDepth with bgfx_FragDepth.
 					// Replace all instances of gl_FragDepth with bgfx_FragDepth.
 					for (bx::StringView fragDepth = bx::findIdentifierMatch(temp, "gl_FragDepth")
 					for (bx::StringView fragDepth = bx::findIdentifierMatch(temp, "gl_FragDepth")
 						; !fragDepth.isEmpty()
 						; !fragDepth.isEmpty()
-						; fragDepth = bx::findIdentifierMatch(fragDepth, "gl_FragDepth")
+						; fragDepth = bx::findIdentifierMatch(fragDepth.getPtr(), "gl_FragDepth")
 						)
 						)
 					{
 					{
 						char* insert = const_cast<char*>(fragDepth.getPtr() );
 						char* insert = const_cast<char*>(fragDepth.getPtr() );