anchor.diff:  ;;------------------------------------------------------------
   
   (defmacro with-viewport (viewport &body body)
  -  (alexandria:with-gensyms (old-viewport vp ctx)
  +  (alexandria:with-gensyms (old-viewport vp ctx unbind)
       `(with-cepl-context (,ctx)
          (let* ((,old-viewport (current-viewport))
  -              (,vp ,viewport))
  -         (%set-current-viewport ,ctx ,vp)
  +              (,vp ,viewport)
  +              (,unbind (%set-current-viewport ,ctx ,vp)))
            (unwind-protect (progn ,@body)
  -           (%set-current-viewport ,ctx ,old-viewport))))))
  +           (when ,unbind
  +             (%set-current-viewport ,ctx ,old-viewport)))))))
   
   ;;{TODO} how are we meant to set origin?
   ;;       Well attachments dont have position so it wouldnt make sense
  
positive.code: 
  (defn-inline %set-current-viewport ((cepl-context cepl-context)
                                      (viewport viewport))
      viewport
    (declare (optimize (speed 3) (debug 1) (safety 1))
             (inline viewport-eql)
             (profile t))
    (%with-cepl-context-slots (current-viewport) cepl-context
      (if (viewport-eql current-viewport viewport)
          viewport
          (progn
            (%gl:viewport
             (%viewport-origin-x viewport) (%viewport-origin-y viewport)
             (%viewport-resolution-x viewport) (%viewport-resolution-y viewport))
            (setf current-viewport viewport)))))
  
  (defn current-viewport () viewport
    (declare (optimize (speed 3) (debug 1) (safety 1))
             (inline viewport-eql)
             (profile t))
    (%with-cepl-context-slots (current-viewport) (cepl-context)
      (or current-viewport
          (error "No default framebuffer found ~a"
                 (if (and (boundp '*gl-context*)
                          (symbol-value '*gl-context*))
                     "but we do have a gl context. This is a bug"
                     "because the GL context is not yet available")))))
  
  ;;------------------------------------------------------------
  
  
negative.code:                    ,@body))
  
  
  (defn viewport-params-to-vec4 (&optional (viewport viewport (current-viewport)))
      vec4
    (declare (profile t))
    (v4:make (float (%viewport-origin-x viewport) 0f0)
             (float (%viewport-origin-y viewport) 0f0)
             (float (%viewport-resolution-x viewport) 0f0)
             (float (%viewport-resolution-y viewport) 0f0)))
  