   (let [width     (.-clientWidth node)
         height    (.-clientHeight node)
         driver    (driver/basic-driver gl)
-        program   (dp/program driver program-source)
+        program   program-source
         state (app-state width height)]
     (reset-gl-canvas! node)
     (.enable gl (.-DEPTH_TEST gl))

(ns gampg.learn-gamma.lesson-07
    (: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
  "7. Basic directional and ambient lighting")

    (.clear gl (bit-or (.-COLOR_BUFFER_BIT gl) (.-DEPTH_BUFFER_BIT gl)))
    (let [image (js/Image.)]
      (aset image "onload"
            (fn [] (let [texture {:data       image
                                 :filter     {:min :linear
                                              :mag :nearest}
                                 :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"))))
