essedTexSubImage3D", fnSub3D);
} while (false);

do {
  debug("");
  debug("readPixels");

  gl.bindFramebuffer(gl.FRAMEBUFFER, null);

  var testColor = [10, 20, 30, 40];
  gl.clearColor(testColor[0]/255.0,
                testColor[1]/255.0,
                testColor[2]/255.0,
                testColor[3]/255.0);
  gl.clear(gl.COLOR_BUFFER_BIT);
  var readPixelView = new Uint8Array(6);

  function doReadPixels(viewOffset) {
    gl.readPixels(0, 0, 1, 1, gl.RGBA, gl.UNSIGNED_BYTE, readPixelView, viewOffset