blob: 2b555a609b801e00bb5f858fd12807cab8c41c6e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
;;;; texture.lisp
(in-package #:wheelwork)
;; TODO: make deftypes for keyword valued slots
(def:class texture ()
(width height :prefix :ro :type float)
((id "Texture id assigned by gl:gen-texture")
:prefix :ro :type (unsigned-byte 32))
((mipmap "Whether to generate mipmap")
:prefix :ro :type boolean :initform nil)
(internal-format image-format :ro :prefix :type keyword :initform :rgba)
(wrap-s wrap-t :prefix :ro :type keyword :initform :repeat)
(min-filter mag-filter :prefix :ro :type keyword :initform :nearest))
(defmethod cleanup ((texture texture))
(gl:delete-texture (texture-id texture)))
|