glsl: just support single dimension for now
glsl: initialise index counter in for loop