Skip to content

Instantly share code, notes, and snippets.

View allj's full-sized avatar

Jai Setlur allj

  • Toronto, Canada
  • 15:30 (UTC -05:00)
View GitHub Profile
@allj
allj / triangle.nim
Last active April 23, 2017 19:53
A colorful triangle in nim OpenGL.
import os
import opengl
import glfw/wrapper as glfw
template `&`[T](v: var T): ptr[T] = addr(v)
template `*`[T](v: ptr[T]): T = v[]
template `*`[T](v: ref[T]): T = v[]