I’ve got the following problem:
I want to get all samplers out of a program object. But how can I do that? If I loop through all uniform I’m not able to seperate an integer from a sampler. Furthermore I’m not able to find out which sampler type it is.
Ok, I can write my own source which scans the whole GLslang source code but this is REALLY messy.
But is there any other possibility?
I’ve got the following problem:
I want to get all samplers out of a program object. But how can I do that? If I loop through all uniform I’m not able to seperate an integer from a sampler. Furthermore I’m not able to find out which sampler type it is.
Ok, I can write my own source which scans the whole GLslang source code but this is REALLY messy.
But is there any other possibility?
Thanks a lot
Florian Rudolf[/b]
This is unfortunately a known issue. The resolution is in process. It may include additional types representing the different samplers (from Sampler1D through Sampler2DShadow) returned by the <type> parameter of GetActiveUniformARB, which is precisely what you want.
Another alternative to consider until (if) this change is approved is to establish a naming convention for sampler names between application programmers and shader writers. For example:
uniform sampler2D s2Dbase; // a terse convention
uniform sampler2D sampler2D_basemap; // a less terse convention
This is unfortunately a known issue. The resolution is in process. It may include additional types representing the different samplers (from Sampler1D through Sampler2DShadow) returned by the <type> parameter of GetActiveUniformARB, which is precisely what you want.[/b]
Yes, that’s exactly what I want. Do you know how/when this will be included in shader objects extension?