Identifying when ofShader hasn't linked


I am working on an app where users can select and run shaders from a folder. I want to be able to report back if a given shader fails to link (due to syntax etc) however I can not figure out how to identify when this has happened (besides reading from the console):

from experiments i can see that load() returns true even when [ error ] ofShader: checkProgramLinkStatus(): program failed to link is printed, as does isLoaded().

it also appears that LinkProgram() also returns true despite this error.

I understand that in general openframeworks does not throw errors in a way a try-catch could help?

Is there something im missing or another way to do this ?


that sounds like a bug, load should return false when it can’t load the shader. can you open an issue on github?


thanks for the info, thats good to know. (i thought perhaps there was a difference under the hood between ‘loading’ and ‘linking’…) yes i will create an issue now


I think the problem i am describing is already addressed in this existing issue/pull request :
is there anything more I should do ?