               i         (* 4 (+ (* texture-columns row) col))
               [x y]     (get character->col-row [chr (contains? style :underline)])]
           ;(log/info "Drawing at col row" col row "character from atlas col row" x y c "(index=" i ")")
-          (.put glyph-image-data (+ i 0) x)
-          (.put glyph-image-data (+ i 1) y)
-          (.put glyph-image-data (+ i 2) 0)
-          (.put glyph-image-data (+ i 3) 0)
-          (.put fg-image-data    (+ i 0) fg-r)
-          (.put fg-image-data    (+ i 1) fg-g)
-          (.put fg-image-data    (+ i 2) fg-b)
-          (.put fg-image-data    (+ i 3) 0)
-          (.put bg-image-data    (+ i 0) bg-r)
-          (.put bg-image-data    (+ i 1) bg-g)
-          (.put bg-image-data    (+ i 2) bg-b)
-          (.put bg-image-data    (+ i 3) 0)))
+          (when (zero? col)
+            (.position glyph-image-data i)
+            (.position fg-image-data i)
+            (.position bg-image-data i))
+          (.put glyph-image-data (unchecked-byte x))
+          (.put glyph-image-data (unchecked-byte y))
+          (.put glyph-image-data (unchecked-byte 0))
+          (.put glyph-image-data (unchecked-byte 0))
+          (.put fg-image-data    (unchecked-byte fg-r))
+          (.put fg-image-data    (unchecked-byte fg-g))
+          (.put fg-image-data    (unchecked-byte fg-b))
+          (.put fg-image-data    (unchecked-byte 0))
+          (.put bg-image-data    (unchecked-byte bg-r))
+          (.put bg-image-data    (unchecked-byte bg-g))
+          (.put bg-image-data    (unchecked-byte bg-b))
+          (.put bg-image-data    (unchecked-byte 0))))
+      (.position glyph-image-data (.limit glyph-image-data))
+      (.position fg-image-data (.limit fg-image-data))
+      (.position bg-image-data (.limit bg-image-data))
+      (.flip glyph-image-data)
+      (.flip fg-image-data)
+      (.flip bg-image-data)
       ; Send updated glyph texture to gl
       (GL13/glActiveTexture GL13/GL_TEXTURE1)
       (GL11/glBindTexture GL11/GL_TEXTURE_2D glyph-texture)

           program-id :program-id
           {:keys [u-MVMatrix u-PMatrix u-font u-glyphs u-fg u-bg font-size term-dim font-tex-dim
            font-texture-width font-texture-height glyph-tex-dim glyph-texture-width glyph-texture-height ]} :uniforms
           {:keys [glyph-image-data fg-image-data bg-image-data vertex-pos-data vertex-texture-coords-data]} :data
           :keys [p-matrix-buffer mv-matrix-buffer]} gl]
      (GL20/glUseProgram program-id)
      (GL20/glUniformMatrix4 u-PMatrix false p-matrix-buffer)
      (GL20/glUniformMatrix4 u-MVMatrix false mv-matrix-buffer)

                                     (reset! normal-font
                                             (make-font filename Font/PLAIN font-size)))
                         :options {:recursive true}}])
      ;; Poll keyboard in background thread and offer input to key-chan
      (future (go-loop []
                (Display/processMessages)
                (when (Keyboard/next)
                  (when (Keyboard/getEventKeyState)
                    (async/>! key-chan (Keyboard/getEventCharacter))))
                (recur)))
      ;; Create and return terminal
      (OpenGlTerminal. columns
                       rows
