Both:
var pixel = gl.readPixels(1,1,1,1,gl.RGBA,gl.UNSIGNED_BYTE);
and:
var pixel;
gl.readPixels(1,1,1,1,gl.RGBA,gl.UNSIGNED_BYTE, pixel);
evaluate pixel to “undefined”
I am trying to implement color-based picking. This occurs on both Webkit Nightly and Chrome.
Anyone got any information on this? Or if I need to use it differently?