Skip to content
Permalink
Browse files

Attempt to ensure framebuffer w/h is always set.

  • Loading branch information
Shinmera committed Jan 1, 2020
1 parent aa59273 commit 01bfaba9353fb581705f83e2b9bc513a8610350b
Showing with 10 additions and 7 deletions.
  1. +10 −7 pipeline.lisp
@@ -157,13 +157,16 @@
(dolist (pass passes)
(when (typep pipeline 'event-loop)
(add-handler pass pipeline))
(setf (framebuffer pass)
(make-instance 'framebuffer
:width (width pass)
:height (height pass)
:attachments (loop for port in (flow:ports pass)
when (typep port 'output)
collect (list (attachment port) (texture port))))))
(let ((output (find :color-attachment0 (flow:ports pass) :key #'attachment)))
(flet ((dimension (func)
(or (funcall func pass) (funcall func (texture output)))))
(setf (framebuffer pass)
(make-instance 'framebuffer
:width (dimension #'width)
:height (dimension #'height)
:attachments (loop for port in (flow:ports pass)
when (typep port 'output)
collect (list (attachment port) (texture port))))))))
;; All done.
(v:info :trial.pipeline "~a pass order: ~a" pipeline passes)
(v:info :trial.pipeline "~a texture count: ~a" pipeline (length textures))

0 comments on commit 01bfaba

Please sign in to comment.
You can’t perform that action at this time.