anchor.diff:              [0, DefaultSemantic.Colors, Renderbuffer(ctx, 0, V2i.Zero, RenderbufferFormat.Rgba8, samples, 0L) :> IFramebufferOutput], None
           ) 
       let mutable defaultOutput = defaultFramebuffer |> OutputDescription.ofFramebuffer
  +
  +    let mutable stereoFramebuffer : Option<OutputDescription * Framebuffer * Texture * Texture> = None
  +    let clearTask = runtime.CompileClear(fboSignature, Mod.constant C4f.Black, Mod.constant 1.0)
   
       let avgFrameTime = RunningMean(3)
       let sizes = Mod.init (V2i(base.ClientSize.Width, base.ClientSize.Height))
  
positive.code:             | _ -> failwith "invalid depth-stencil mode"
  
      let fboSignature =
          FramebufferSignature(
              runtime,
              Map.ofList [0, (DefaultSemantic.Colors, { format = RenderbufferFormat.Rgba8; samples = samples })],
              Map.empty,
              depthSignature,
              None,
              1,
              Set.empty
          )
  
  
  
negative.code:                 if size <> sizes.Value then
                      transact (fun () -> Mod.change sizes size)
  
                  if graphicsMode.Stereo then
                      let outputDesc, colorTex = 
                          match stereoFramebuffer with    
                          | Some (outputDesc, _, c, _) when c.Size.XY = size -> 
                              outputDesc, c
                          | _ -> 
                              match stereoFramebuffer with
                              | Some (_, f, c, d) -> 
                                  ctx.Delete f
                                  ctx.Delete c
                                  ctx.Delete d
                              | _ -> ()
                              let c = ctx.CreateTexture(V3i(size,1), TextureDimension.Texture2D, TextureFormat.Rgba8, 2, 1, samples)
                              let d = ctx.CreateTexture(V3i(size,1), TextureDimension.Texture2D, TextureFormat.Depth24Stencil8, 2, 1, samples)
                              let f = 
                                  runtime.CreateFramebuffer(
                                      fboSignature,
                                      [   
                                          DefaultSemantic.Colors, c.[TextureAspect.Color,0,*] :> IFramebufferOutput
                                          DefaultSemantic.Depth,  d.[TextureAspect.Depth,0,*] :> IFramebufferOutput
                                      ]
                                  ) |> unbox<Framebuffer>
                              let o = OutputDescription.ofFramebuffer f
                              stereoFramebuffer <- Some (o,f,c,d)
                              o, c
                      
                      clearTask.Run(AdaptiveToken.Top, RenderToken.Empty, outputDesc)
                      task.Run(AdaptiveToken.Top, RenderToken.Empty, outputDesc)
  
                      let fSrc = GL.GenFramebuffer()
                      GL.BindFramebuffer(FramebufferTarget.DrawFramebuffer, 0)
                      GL.BindFramebuffer(FramebufferTarget.ReadFramebuffer, fSrc)
                      
                      GL.FramebufferTextureLayer(FramebufferTarget.ReadFramebuffer, FramebufferAttachment.ColorAttachment0, colorTex.Handle, 0, 0)
                      GL.DrawBuffer(DrawBufferMode.BackLeft)
                      GL.BlitFramebuffer(0, 0, colorTex.Size.X, colorTex.Size.Y, 0, 0, colorTex.Size.X, colorTex.Size.Y, ClearBufferMask.ColorBufferBit, BlitFramebufferFilter.Nearest)
  
                      GL.FramebufferTextureLayer(FramebufferTarget.ReadFramebuffer, FramebufferAttachment.ColorAttachment0, colorTex.Handle, 0, 1)
                      GL.DrawBuffer(DrawBufferMode.BackRight)
                      GL.BlitFramebuffer(0, 0, colorTex.Size.X, colorTex.Size.Y, 0, 0, colorTex.Size.X, colorTex.Size.Y, ClearBufferMask.ColorBufferBit, BlitFramebufferFilter.Nearest)
  
                      GL.BindFramebuffer(FramebufferTarget.ReadFramebuffer, 0)
                      GL.DeleteFramebuffer(fSrc)
  
                  else
                      defaultFramebuffer.Size <- V2i(x.ClientSize.Width, x.ClientSize.Height)
                      defaultOutput <- { defaultOutput with viewport = Box2i(V2i.OO, defaultFramebuffer.Size - V2i.II) }
  
                      GL.ColorMask(true, true, true, true)
                      GL.DepthMask(true)
                      GL.Viewport(0,0,x.ClientSize.Width, x.ClientSize.Height)
                      GL.ClearColor(0.0f, 0.0f, 0.0f, 1.0f)
                      GL.ClearDepth(1.0)
                      GL.Clear(ClearBufferMask.ColorBufferBit ||| ClearBufferMask.DepthBufferBit ||| ClearBufferMask.StencilBufferBit)
  
                      let desc = OutputDescription.ofFramebuffer defaultFramebuffer
                      task.Run(AdaptiveToken.Top, RenderToken.Empty, defaultOutput)
                          
  
                  x.SwapBuffers()
  