 (defn -main [& args]
   (with-cleanup destroy
     (create)
-    (run (s/load-shader-program "resources/gol"))))
+    (run (s/load-shader-program "resources/gol")
+      l/torus-step)))


  (:require [petulant-life.rendering :as r]
            [petulant-life.config :as c]
            [petulant-life.shader :as s]))

;; Initializing the OpenGL window.
(defn create []

         life-board)))

;; Running the simulation / graphics.
(defn run [shader stepper]
  (loop [board #{[2 0] [2 1] [2 2] [1 2] [0 1]}]
   (when-not (Display/isCloseRequested)
     (GL11/glClear GL11/GL_COLOR_BUFFER_BIT)
     (r/draw-rectangles (life->screen 50 10 board)
                        shader
                        [0 1 0 1])

     (Display/update)
     (Thread/sleep 300)
     (recur (stepper board)))))

(defmacro with-cleanup [close-fn & body]
  `(try
