anchor.diff:  ;;--------------------------------------------------------------
   
   (defun make-fbo (&rest fuzzy-attach-args)
  -  (cepl.memory::if-context
  -   (make-fbo-now %pre% fuzzy-attach-args)
  -   (make-uninitialized-fbo)
  -   (remove-if-not #'holds-gl-object-ref-p
  -                  (cepl-utils:flatten fuzzy-attach-args))))
  -
  -(defun make-fbo-now (fbo-obj fuzzy-attach-args)
  -  (%init-fbo fbo-obj)
  -  (if fuzzy-attach-args
  -      (apply #'fbo-gen-attach fbo-obj fuzzy-attach-args)
  -      (error "CEPL: FBOs must have at least one attachment"))
  +
  +  (let ((fbo-obj (pre-gl-init (make-uninitialized-fbo))))
  +    (if fuzzy-attach-args
  +	(apply #'fbo-gen-attach fbo-obj fuzzy-attach-args)
  +	(error "CEPL: FBOs must have at least one attachment"))
  +    (cepl.memory::if-context
  +     (make-fbo-now %pre%)
  +     fbo-obj
  +     (remove-if-not #'holds-gl-object-ref-p
  +		    (cepl-utils:flatten fuzzy-attach-args)))))
  +
  +(defun make-fbo-now (fbo-obj)
  +  (post-gl-init fbo-obj)
  +  (loop :for a :across (%fbo-color-arrays fbo-obj)
  +     :for i :from 0 :do
  +     (when a (setf (attachment fbo-obj i) a)))
  +  (when (attachment fbo-obj :d)
  +    (setf (attachment fbo-obj :d) (attachment fbo-obj :d)))
  +  (%update-fbo-state fbo-obj)
     (check-framebuffer-status fbo-obj)
     fbo-obj)
   
  
positive.code: 
  ;;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  
  (defun %init-fbo (fbo-obj
                    &key id color-arrays color-blending
                      depth-array depth-blending
                      draw-buffer-map  clear-mask
                      is-default blending-params)
    ;;
    (setf (%fbo-id fbo-obj) (or id (first (gl:gen-framebuffers 1))))
    ;;
    (setf (%fbo-color-arrays fbo-obj)
          (or color-arrays (make-fbo-array 'gpu-array-t)))
    ;;
    (setf (%fbo-color-blending fbo-obj)
          (or color-blending (make-fbo-array 'blending-params)))
    ;;
    (setf (%fbo-depth-array fbo-obj) depth-array)
    ;;
    (setf (%fbo-depth-blending fbo-obj) depth-blending)
    ;;
    (setf (%fbo-draw-buffer-map fbo-obj)
          (or draw-buffer-map (foreign-alloc 'cl-opengl-bindings:enum :count
                                             (max-draw-buffers *gl-context*)
                                             :initial-element :none)))
    ;;
    (setf (%fbo-clear-mask fbo-obj)
          (or clear-mask
              (cffi:foreign-bitfield-value
               '%gl::ClearBufferMask '(:color-buffer-bit))))
    ;;
    (setf (%fbo-is-default fbo-obj) is-default)
    ;;
  
negative.code:               :image-format :gl-internal)))
      (let ((result
             (%update-fbo-state
  	    (post-gl-init
  	     (pre-gl-init
  	      (make-uninitialized-fbo)
  	      :is-default t
  	      :color-arrays
  	      (make-array (if double-buffering 2 1)
  			  :element-type 'gpu-array-t :initial-contents
  			  (cons (gen-array dimensions)
  				(when double-buffering
  				  (list (gen-array dimensions)))))
  	      :depth-array (when depth (gen-array dimensions)))
  	     :id 0))))
        (update-clear-mask result)
        (setf %default-framebuffer result
              %current-fbo result)
  