anchor.diff:      (gl:vertex 0.0 0.0 scale)))
   
   (defun reshape (width height)
  -  ;; set viewport to full window
  +  ;; set viewport to full screen
     (gl:viewport 0 0 width height)
     (setf *display-width* width)
     (setf *display-height* height))
  
positive.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))
  
  ;;; Colors helpers
  (defstruct (color (:type (vector float)))
  
negative.code:                        (3 :rgb)
                         (4 :rgba))
                       :unsigned-byte
                       (if data data (cffi::null-pointer)))
      (gl:tex-parameter :texture-2d :texture-min-filter (texture-min-filter tex))
      (gl:tex-parameter :texture-2d :texture-mag-filter (texture-mag-filter tex))
      ;; (gl:tex-parameter :texture-2d :texture-min-lod (texture-min-lod tex))
  