Permalink
Browse files

Don't know if this is right, will need to test these anyway though.

  • Loading branch information...
Shinmera committed Mar 11, 2018
1 parent b5fcfae commit c7bc7125ca0625d31d40eb64b278d065e16d8fb4
Showing with 6 additions and 9 deletions.
  1. +4 −0 render-texture.lisp
  2. +2 −9 scene-buffer.lisp
@@ -18,6 +18,10 @@
(defmethod pack ((render-texture render-texture))
(pack-pipeline render-texture render-texture))
(defmethod resize :after ((render-texture render-texture) width height)
(setf (width render-texture) width)
(setf (height render-texture) height))
(defmethod texture ((render-texture render-texture))
(let ((pass (aref (passes render-texture) (1- (length (passes render-texture))))))
(texture (find :color-attachment0 (flow:ports pass)
@@ -6,19 +6,12 @@
(in-package #:org.shirakumo.fraf.trial)
(defclass scene-buffer (render-texture scene)
(defclass scene-buffer (render-texture pipelined-scene)
((render-pass :initform (make-instance 'render-pass) :accessor render-pass))
(:default-initargs
:width (error "WIDTH required.")
:height (error "HEIGHT required.")))
(defmethod initialize-instance :after ((buffer scene-buffer) &key)
(register (render-pass buffer) buffer)
(enter (render-pass buffer) buffer)
(pack buffer))
(defmethod enter :after ((subject shader-entity) (buffer scene-buffer))
(register-object-for-pass buffer subject))
(defmethod paint ((pass shader-pass) (buffer scene-buffer))
(for:for ((object over buffer))
(paint object pass)))

0 comments on commit c7bc712

Please sign in to comment.