anchor.diff:                 (+ (* y (cos angle)) (* x (sin angle))))))
     (unless (and (zerop center-x) (zerop center-y))
       (translate-shape shape center-x center-y 0.0)))
  +
  +(defun scale-shape-2d (shape sx sy)
  +  (loop for i from 0 below (length (shape-vertices shape)) by 3 do
  +       (let ((x (aref (shape-vertices shape) i))
  +             (y (aref (shape-vertices shape) (+ i 1))))
  +         (setf (aref (shape-vertices shape) i) (* x sx)
  +               (aref (shape-vertices shape) (+ i 1)) (* y sy)))))
   
   (defun render-shape (shape &optional (primitive (shape-primitive shape)))
     (gl:begin primitive)
  
positive.code: 
  ;;; Bounding box
  (defstruct bbox
    valid
    x-min y-min z-min
    x-max y-max z-max)
  
negative.code: (defun end-draw ()
    (update-fps)
    (gl:flush))
  
  ;;; FBO
  (defun create-gl-buffer (width height)
    (let ((w (min (nearest-power-of-two width)
                  (gl:get-integer :max-texture-size)))
          (h (min (nearest-power-of-two height)
                  (gl:get-integer :max-texture-size)))
          (framebuffer (first (gl:gen-framebuffers-ext 1)))
          (depthbuffer (first (gl:gen-renderbuffers-ext 1)))
          (texture (first (gl:gen-textures 1))))
      (gl:bind-framebuffer-ext :framebuffer-ext framebuffer)
      ;; setup and attach texture
      (gl:bind-texture :texture-2d texture)
      (gl:tex-parameter :texture-2d :texture-min-filter :linear-mipmap-linear)
      (gl:tex-parameter :texture-2d :texture-mag-filter :linear)
      (gl:tex-image-2d :texture-2d 0 :rgba w h 0 :rgba :unsigned-byte (cffi:null-pointer))
      (gl:generate-mipmap-ext :texture-2d)
      (gl:bind-texture :texture-2d 0)
      (gl:framebuffer-texture-2d-ext :framebuffer-ext
                                     :color-attachment0-ext
                                     :texture-2d
                                     texture
                                     0)
      ;; setup and attach depth buffer
      (gl:bind-renderbuffer-ext :renderbuffer-ext depthbuffer)
      (gl:renderbuffer-storage-ext :renderbuffer-ext :depth-component24 w h)
      (gl:framebuffer-renderbuffer-ext :framebuffer-ext
                                       :depth-attachment-ext
                                       :renderbuffer-ext
                                       depthbuffer)
      ;; validate framebuffer
      (let ((framebuffer-status (gl:check-framebuffer-status-ext :framebuffer-ext)))
        (unless (gl::enum= framebuffer-status :framebuffer-complete-ext)
          (error "Framebuffer not complete: ~A." framebuffer-status)))
      framebuffer))
  
  
  ;;; 2D view
  (defstruct 2d-view
  