Permalink
Browse files

Make shader entities issue an event for changed classes

  • Loading branch information...
Shinmera committed Oct 31, 2018
1 parent 396db1f commit ed318276bf040f987e514dc91f44f1ec9d4145fc
Showing with 4 additions and 5 deletions.
  1. +1 −1 context.lisp
  2. +0 −2 entity.lisp
  3. +3 −2 shader-entity.lisp
View
@@ -154,7 +154,7 @@
this context *context*))))))
(defmethod handle (event (global (eql T)))
(unless (boundp *context*)
(when (boundp '*context*)
(handle event (handler *context*))))
(defclass resize (event)
View
@@ -20,5 +20,3 @@
(defmethod matches (a (b entity))
(matches b a))
;; FIXME: send out redefinition signals
View
@@ -83,11 +83,12 @@
(unless (c2mop:class-finalized-p super)
(c2mop:finalize-inheritance super)))
(setf (effective-shaders class) (compute-effective-shaders class))
(setf (effective-shader-class class) (compute-effective-shader-class class)))
(setf (effective-shader-class class) (compute-effective-shader-class class))
(handle (make-instance 'class-changed :changed-class class) T))
(defmethod (setf direct-shaders) :after (value (class shader-entity-class))
(when (c2mop:class-finalized-p class)
(reinitialize-instance class)))
(c2mop:finalize-inheritance class)))
(defmethod effective-shaders ((class symbol))
(effective-shaders (find-class class)))

0 comments on commit ed31827

Please sign in to comment.