aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/interactive-units
diff options
context:
space:
mode:
authorColin Okay <colin@cicadas.surf>2022-06-30 07:35:16 -0500
committerColin Okay <colin@cicadas.surf>2022-06-30 07:35:16 -0500
commite0fc8f0f7a8b4756226cfb5e1c7581e411420228 (patch)
tree57213d8d2997e34d1ba674360b870d4223cd4908 /src/interactive-units
parent56b743bbfe56823bfe482a4f4e579512041918d2 (diff)
[refactor] factored out affine from unit; made container a unit;
Diffstat (limited to 'src/interactive-units')
-rw-r--r--src/interactive-units/bitmap.lisp3
-rw-r--r--src/interactive-units/text.lisp2
2 files changed, 3 insertions, 2 deletions
diff --git a/src/interactive-units/bitmap.lisp b/src/interactive-units/bitmap.lisp
index 95dfff5..cc4b4f7 100644
--- a/src/interactive-units/bitmap.lisp
+++ b/src/interactive-units/bitmap.lisp
@@ -2,7 +2,7 @@
(in-package #:wheelwork)
-(defclass/std bitmap (unit interactive)
+(defclass/std bitmap (affine interactive)
((texture :ri :std (error "A bitmap requires a texture."))
(vao shader :with :r :static)))
@@ -57,6 +57,7 @@
(gl:delete-program shader))
(setf vao nil
shader nil)))
+
(defmethod render ((bitmap bitmap))
(with-slots (texture vao shader) bitmap
(gl:active-texture 0)
diff --git a/src/interactive-units/text.lisp b/src/interactive-units/text.lisp
index 1cecdbf..caba48e 100644
--- a/src/interactive-units/text.lisp
+++ b/src/interactive-units/text.lisp
@@ -2,7 +2,7 @@
(in-package #:wheelwork)
-(defclass/std text (unit interactive)
+(defclass/std text (affine interactive)
((font :with :ri :std (error "A font is required") :type font)
(content :with :ri :std "")
(color :with :std #(1.0 1.0 1.0 1.0))