Browse files


  • Loading branch information...
Shinmera committed Jun 17, 2018
1 parent cd27fe5 commit 817cb1e6f74703e829b4028c38dd908b05ec8567
Showing with 6 additions and 2 deletions.
  1. +1 −1 display.lisp
  2. +2 −1 resources/framebuffer.lisp
  3. +3 −0 shader-entity.lisp
@@ -57,10 +57,10 @@
;; other threads to grab it.
(let ((context (context target)))
(with-context (context :reentrant T)
(gl:viewport 0 0 (width context) (height context))
(let ((c (clear-color target)))
(gl:clear-color (vx c) (vy c) (vz c) (if (vec4-p c) (vw c) 0.0)))
(gl:clear :color-buffer :depth-buffer :stencil-buffer)
(gl:viewport 0 0 (width context) (height context))
(swap-buffers context))))
@@ -32,7 +32,8 @@
(check-framebuffer-attachment attachment)
(check-type texture texture)
(check-allocated texture)
(v:debug :trial.framebuffer "Attaching ~a as ~a to ~a." texture attachment framebuffer)
(v:debug :trial.framebuffer "Attaching ~a~@[:~a~] as ~a to ~a."
texture layer attachment framebuffer)
(if layer
(%gl:framebuffer-texture-layer :framebuffer attachment (gl-name texture) level layer)
(%gl:framebuffer-texture :framebuffer attachment (gl-name texture) level))
@@ -115,6 +115,9 @@
:shaders (loop for (type source) on (effective-shaders class) by #'cddr
collect (make-instance 'shader :source source :type type))))
(defmethod make-class-shader-program ((class symbol))
(make-class-shader-program (find-class class)))
(defmacro define-class-shader ((class type &optional (priority 0)) &body definitions)
`(setf (class-shader ,type ',class)
(list ,priority (progn ,@definitions))))

0 comments on commit 817cb1e

Please sign in to comment.