anchor.diff:                            ',color-mask-indices
                             ',tex-unit-ids
                             ',buffer-targets
  -                          ',scissor-viewport-indices))))))
  +                          ',scissor-viewport-indices
  +                          ',ubo-indices
  +                          ',ssbo-indices))))))
   
   (defn restore-state ((context cepl-context)
                        (program boolean)
  
positive.code:                                         color-mask-indices
                                          tex-unit-ids
                                          buffer-targets
                                          scissor-viewport-indices)
                                         &body body)
    (assert (member program '(t nil)))
    (assert (member stencil '(t nil)))
  
negative.code:        :when buffer
         :do (setf (gpu-buffer-bound context target) buffer))
  
      ;; array-of-ubo-bindings-buffer-ids
      (loop :for ubo-binding-point :in ubo-indices
         :for ubo-id := (aref array-of-ubo-bindings-buffer-ids ubo-binding-point)
         :do
         (unless (unknown-gl-id-p ubo-id)
           (let* ((range-index (the array-index (* ubo-id 2)))
                  (offset (aref array-of-ubo-binding-ranges range-index))
                  (size (aref array-of-ubo-binding-ranges (+ range-index 1))))
             (%gl:bind-buffer-range
              :uniform-buffer ubo-binding-point ubo-id offset size))))
  
      ;; array-of-ssbo-bindings-buffer-ids
      (loop :for ssbo-binding-point :in ssbo-indices
         :for ssbo-id := (aref array-of-ssbo-bindings-buffer-ids ssbo-binding-point)
         :do
         (unless (unknown-gl-id-p ssbo-id)
           (let* ((range-index (the array-index (* ssbo-id 2)))
                  (offset (aref array-of-ssbo-binding-ranges range-index))
                  (size (aref array-of-ssbo-binding-ranges (+ range-index 1))))
             (%gl:bind-buffer-range
              :uniform-buffer ssbo-binding-point ssbo-id offset size))))
  
      ;; need, but dont know how to handle yet
      ;;
      ;; current-blend-params
      ;; these are per fbo (usually)
      ;;
      ;; I dont think this can be done
      ;; array-of-transform-feedback-bindings-buffer-ids
  