Browse Source

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 years ago
parent
commit
6a529fca4b
1 changed files with 1 additions and 1 deletions
  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.
 					for (bx::StringView fragDepth = bx::findIdentifierMatch(temp, "gl_FragDepth")
 						; !fragDepth.isEmpty()
-						; fragDepth = bx::findIdentifierMatch(fragDepth, "gl_FragDepth")
+						; fragDepth = bx::findIdentifierMatch(fragDepth.getPtr(), "gl_FragDepth")
 						)
 					{
 						char* insert = const_cast<char*>(fragDepth.getPtr() );