              {:keys [^ByteBuffer glyph-image-data
                      ^ByteBuffer fg-image-data
                      ^ByteBuffer bg-image-data]} :data
-             :keys [p-matrix-buffer mv-matrix-buffer character-width character-height character->col-row]} gl
+             :keys [p-matrix-buffer mv-matrix-buffer]} gl
             glyph-image-data glyph-image-data
             fg-image-data fg-image-data
             bg-image-data bg-image-data

        (.setColor (Color. 0 0 0 0))
        (.fillRect 0 0 width height))
      ;; Loop through each character, drawing it
      (doseq [[[s underline?] col row]  (character-idxs char-width characters)]
        (let [x ^int (* col char-width)
              y ^int (* (inc row) char-height)
              cx (+ 0 x)
              cy (- y (.getDescent font-metrics))]
          ;(log/info s x y)
        (when (not= s " ")
          ;(println "drawing" s "@" x y "underline?" underline?)
          (doto texture-graphics
            (.setColor white)
            (.setClip cx (+ (- cy char-height) (.getDescent font-metrics)) char-width char-height)
            (.drawString (str s) cx cy)))
        (when underline?
          (let [y (dec y)]
            (doto texture-graphics
              (.setColor white)
              (.drawLine x
                         y
                         (+ x char-width)
                         y))))))
      ;; cleanup texture resource
      ;(ImageIO/write texture-image "jpg", (File. "glyph-texture.jpg"))
      (.dispose texture-graphics)
      {:font-texture-width width
       :font-texture-height height
       :font-texture-image texture-image})))


(defn- buffered-image-byte-buffer [^BufferedImage buffered-image]


(defn- init-display [title screen-width screen-height icon-paths gl-lock destroyed]
  (let [pixel-format       (PixelFormat.)
        context-attributes (doto (ContextAttribs. 4 4)
                             (.withForwardCompatible true)
                             (.withProfileCore true))
        icon-array         (when icon-paths
