-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Matteo Sisti Sette wrote:
Hi,
Is it legal to load the same shader (i.e. the same .vert and .frag files) multiple times? I.e. have an abstraction with a [glsl_vertex], a [glsl_fragment] and a [glsl_program], and multiple instances of this abstraction?
yes, i'm using this myself.
I ask this because I did this and pd crashes as soon as I open the gemwin. I had some trivial errors in the shader files before, and I got the compiler error messages without crashes, but then I corrected the error and now it crashes. Obviously there may be a lot of other reasons for the crash but I have to guess.
obviously it shouldn't crash at all. could you post the crashing patch? (preferrably in the sf bug tracker)
Is there another way to use the same shader in multiple places? For example, I see [glsl_program] outputs an id in its right outlet: can I perhaps use that ID to use that shader elsewhere? If so, how?
i don't think it's currently possible to use the ID output by glsl_program. good idea though.
By the way, I should probably ask a more basic question: is it legal to have more than one [glsl_program]s (meaning a [glsl_vertex] a [glsl_fragment] and a [glsl_program]), no matter whether with the same or different shader programs, "under" the same [gemhead], provided that they are in different "subchains" with [separator]s?
it's legal, even without your restriction.
fgmasdr IOhannes