Is this a reliable method of parsing glGetShaderInfoLog()?
Posted
by
m4ttbush
on Game Development
See other posts from Game Development
or by m4ttbush
Published on 2012-10-10T13:35:59Z
Indexed on
2012/10/15
21:50 UTC
Read the original article
Hit count: 150
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?
© Game Development or respective owner