diff options
Diffstat (limited to 'src/gl')
-rw-r--r-- | src/gl/texture.lisp | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/gl/texture.lisp b/src/gl/texture.lisp index 0aa698f..2b555a6 100644 --- a/src/gl/texture.lisp +++ b/src/gl/texture.lisp @@ -2,11 +2,17 @@ (in-package #:wheelwork) -(defclass/std texture () - ((width height id mipmap :with :r :i) - (internal-format image-format :ri :with :std :rgba) - (wrap-s wrap-t :ri :with :std :repeat) - (min-filter mag-filter :ri :with :std :nearest))) +;; 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))) |