samplerArraySetter method
dynamic
samplerArraySetter(
- OpenGLContextES gl,
- dynamic type,
- dynamic unit,
- dynamic location,
- int size,
Implementation
samplerArraySetter(OpenGLContextES gl, type, unit, location, int size) {
var bindPoint = getBindPointForSamplerType(gl, type);
var units = Int32List(size);
for (var ii = 0; ii < size; ++ii) {
units[ii] = unit + ii;
}
return (List textures) {
// gl.uniform1iv(location, units);
// textures.forEach((textureOrPair, index) {
// gl.activeTexture(gl.TEXTURE0 + units[index]);
// var texture = 0;
// if (textureOrPair is WebGLTexture) {
// texture = textureOrPair;
// } else {
// texture = textureOrPair.texture;
// gl.bindSampler(unit, textureOrPair.sampler);
// }
// gl.bindTexture(bindPoint, texture);
// });
};
}