Parsing glGetShaderInfoLog() to get error info. Is this reliable, or is there a better way?
- by m4ttbush
I want to get a list of errors and their line numbers so I can display the error information different to how it's formatted in the error string, and also show the line in error.
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 then the error description up to the next newline.
But the OpenGL docs say "Application developers should not expect different OpenGL implementations to produce identical information logs."
Which 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 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?
Thanks!