et glayer = xrGLFactory.getSubImage(quadLayer1, frame);
          gl.bindFramebuffer(gl.FRAMEBUFFER, fb);
          gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, glayer.colorTexture, 0);

          if (quadTexture1Width != 0 && quadTexture1Height != 0) {
            stereoUtil.blit(false, quadTexture1, 0, 0, 1, 1, quadTexture1Width, quadTexture1Height);
          }
        }

        if (quadLayer2.needsRedraw) {
          let fb = gl.createFramebuffer();
          let glayer 