Skip to content

Instantly share code, notes, and snippets.

@nixeagle
Created July 14, 2010 19:43
Show Gist options
  • Save nixeagle/475944 to your computer and use it in GitHub Desktop.
Save nixeagle/475944 to your computer and use it in GitHub Desktop.
(defun draw-thing ()
(gl:with-gl-array-values (arr1 'vertex '(x y z))
'(#(5.0 5.0 -5.0) #(5.0 -5.0 -5.0)
#(-5.0 -5.0 -5.0) #(-5.0 5.0 -5.0)
#(5.0 5.0 5.0) #(5.0 -5.0 5.0)
#(-5.0 -5.0 5.0) #(-5.0 5.0 5.0))
(gl:bind-gl-vertex-array arr1)
;(gl:rotate 1 1 1 3)
(gl:polygon-mode :front-and-back :line)
(gl:with-gl-array-values (arr2 :unsigned-int)
'(0 1 2 3 4 7 6 5 0 4 5 1 1 5 6 2 2 6 7 3 4 0 3 7)
(gl:draw-elements :polygon arr2))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment