;;;; 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)))