Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
25 lines (19 sloc) 731 Bytes
(in-package #:flight-sim)
(defun draw-triangle (tri colors)
(declare (type shape-vector tri))
(declare (type shape-vector colors))
(gl:with-primitive :triangles
(let ((c (aref colors 0)))
(gl:color (aref c 0) (aref c 1) (aref c 2)))
(let ((v (aref tri 0)))
(gl:vertex (aref v 0) (aref v 1) (aref v 2)))
(let ((c (aref colors 1)))
(gl:color (aref c 0) (aref c 1) (aref c 2)))
(let ((v (aref tri 1)))
(gl:vertex (aref v 0) (aref v 1) (aref v 2)))
(let ((c (aref colors 2)))
(gl:color (aref c 0) (aref c 1) (aref c 2)))
(let ((v (aref tri 2)))
(gl:vertex (aref v 0) (aref v 1) (aref v 2)))))
;(defun draw-entity (entity)
(defgeneric draw (object time))
Jump to Line
Something went wrong with that request. Please try again.