Identifying when ofShader hasn't linked


#1

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 ?


#2

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


#3

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


#4

I think the problem i am describing is already addressed in this existing issue/pull request : https://github.com/openframeworks/openFrameworks/pull/3734
is there anything more I should do ?