I want to get a list of errors and their line numbers so I can display the error information differently from how it's formatted in the error string and also to show the line in the output.
It looks easy enough to just parse the result of glGetShaderInfoLog(), look for
ERROR:, then read the next number up to
:, and then the next, and finally the error description up to the next newline.
However, the OpenGL docs say:
Application developers should not expect different OpenGL implementations to produce identical information logs.
This makes me worry that my code may behave incorrectly on different systems. I don't need them to be identical, I just need them to follow the same format.
So is there a better way to get a list of errors with the line number separate, is it safe to assume that they'll always follow the "ERROR: 0:123:" format, or is there simply no reliable way to do this?