Skip to content

Instantly share code, notes, and snippets.

@ztellman
Created January 10, 2010 00:38
Show Gist options
  • Save ztellman/273243 to your computer and use it in GitHub Desktop.
Save ztellman/273243 to your computer and use it in GitHub Desktop.
(ns example.wiki.triangle1
(:use [penumbra.opengl])
(:require [penumbra.app :as app]))
(defn reshape [[x y width height] state]
(frustum-view 60.0 (/ (double width) height) 1.0 100.0)
(load-identity)
state)
(defn display [[delta time] state]
(translate 0 -0.93 -3)
(draw-triangles
(color 1 0 0) (vertex 1 0)
(color 0 1 0) (vertex -1 0)
(color 0 0 1) (vertex 0 1.86)))
(app/start
{:display display, :reshape reshape}
{})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment