         height         (.getHeight buffered-image)
         texture-id     (GL11/glGenTextures)
         texture-buffer ^ByteBuffer (zimgutil/buffered-image-byte-buffer buffered-image)]
-     ;;(.order texture-buffer (ByteOrder/nativeOrder))
      (GL11/glBindTexture GL11/GL_TEXTURE_2D texture-id)
      (GL11/glPixelStorei GL11/GL_UNPACK_ALIGNMENT 1)
      (GL11/glTexParameteri GL11/GL_TEXTURE_2D GL11/GL_TEXTURE_MIN_FILTER GL11/GL_NEAREST)


(defn- xy-texture-id [^long width ^long height ^long layers ^ByteBuffer texture-buffer]
  (let [texture-id (GL11/glGenTextures)]
    ;;(.order texture-buffer (ByteOrder/nativeOrder))
    (GL11/glBindTexture GL30/GL_TEXTURE_2D_ARRAY texture-id)
    (GL11/glTexParameteri GL30/GL_TEXTURE_2D_ARRAY GL11/GL_TEXTURE_MIN_FILTER GL11/GL_NEAREST)
    (GL11/glTexParameteri GL30/GL_TEXTURE_2D_ARRAY GL11/GL_TEXTURE_MAG_FILTER GL11/GL_NEAREST)

      (.scale matrix (Vector3f. (get s 0) (get s 1) (get s 2)))
      (.clear matrix-buffer)
      (.get matrix matrix-buffer)
      matrix-buffer)))

(defn- init-buffers []
