Skip to content

Commit

Permalink
Add print-object to vertex-array
Browse files Browse the repository at this point in the history
  • Loading branch information
Shinmera committed Mar 13, 2018
1 parent 68c5d2c commit 191b7e5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions resources/vertex-array.lisp
Expand Up @@ -12,6 +12,10 @@
(:default-initargs
:bindings (error "BINDINGS required.")))

(defmethod print-object ((array vertex-array) stream)
(print-unreadable-object (array stream :type T :identity T)
(format stream "~@[~a~]" (size array))))

(defmethod destructor ((array vertex-array))
(let ((vao (gl-name array)))
(lambda () (when vao (gl:delete-vertex-arrays (list vao))))))
Expand Down

0 comments on commit 191b7e5

Please sign in to comment.