     
     (let [image (js/Image.)]
       (aset image "onload"
-            (fn [] (let [texture {:data {:data image
-                                        :filter {:min :linear
-                                                 :mag :linear-mipmap-nearest}
-                                        :flip-y true
-                                        :texture-id 0}}]
+            (fn [] (let [texture {:data image
+                                 :filter {:min :linear
+                                          :mag :linear}
+                                 :flip-y true
+                                 :texture-id 0}]
                     (animate (draw-fn gl driver program) tick (assoc-in state [:scene :texture] texture)))))
       (aset image "src" "/images/crate.gif"))))

(ns ^:figwheel-load gampg.learn-gamma.lesson-06
    (:require [clojure.string :as s]
            [gamma.api :as g]
            [gamma.program :as p]
            [gamma.tools :as gt]
            [gamma-driver.drivers.basic :as driver]
            [gamma-driver.protocols :as dp]
            [goog.webgl :as ggl]
            [thi.ng.geom.core :as geom]
            [thi.ng.geom.core.matrix :as mat :refer [M44]]
            [thi.ng.geom.webgl.arrays :as arrays]))

(def title
  "6. Keyboard input and texture filters")

   {:vertex-shader   {(g/gl-position) (-> u-p-matrix
                                          (g/* u-mv-matrix)
                                          (g/* (g/vec4 a-position 1)))
                      v-texture-coord a-texture-coord}
    :fragment-shader {(g/gl-frag-color)
                      (g/texture2D u-sampler (g/vec2 (g/swizzle v-texture-coord :st)))}}))

(defn get-perspective-matrix
  "Be sure to 
