diff options
author | Colin Okay <colin@cicadas.surf> | 2022-06-30 06:12:29 -0500 |
---|---|---|
committer | Colin Okay <colin@cicadas.surf> | 2022-06-30 06:12:29 -0500 |
commit | 7bbcc1cce6dbda1c6f5ad84f956c188ce639100d (patch) | |
tree | 3cb562514cea4af99a0673828776e5b1a7ec0337 | |
parent | 73dc07ed1dd3462e545a71bbcc388c27185f0279 (diff) |
[modify] projected-matrix no longer generic
-rw-r--r-- | src/core-units/unit.lisp | 8 | ||||
-rw-r--r-- | src/protocol.lisp | 5 |
2 files changed, 4 insertions, 9 deletions
diff --git a/src/core-units/unit.lisp b/src/core-units/unit.lisp index 939293b..6ccd31e 100644 --- a/src/core-units/unit.lisp +++ b/src/core-units/unit.lisp @@ -64,8 +64,8 @@ (mat:nmscale m (vec:vec uw uh 1.0)))) m)) -(defmethod projected-matrix ((thing unit)) - (or (cached-projected-matrix thing) - (setf (cached-projected-matrix thing) +(defun projected-matrix (unit) + (or (cached-projected-matrix unit) + (setf (cached-projected-matrix unit) (mat:marr (mat:m* (application-projection *application*) - (model-matrix thing)))))) + (model-matrix unit)))))) diff --git a/src/protocol.lisp b/src/protocol.lisp index 52d2525..24a34c2 100644 --- a/src/protocol.lisp +++ b/src/protocol.lisp @@ -35,11 +35,6 @@ (:documentation "Returns the model matrix for THING, representing its position, scale, and orientation in the scene")) -(defgeneric projected-matrix (thing) - (:documentation "Returns the raw array of the model matrix after it - has been prjected by the application's projecion matrix. Used to - pass to GLSL shader programs.")) - (defgeneric ensure-loaded (asset) (:documentation "Ensures that the asset is loaded into memory and ready for use. Returns the asset.")) |