Skip to content

Commit

Permalink
Ensure debug-draw allocates itself
Browse files Browse the repository at this point in the history
  • Loading branch information
Shinmera committed Jan 17, 2025
1 parent 04e298e commit f3850c1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions debug.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,10 @@ void main(){
(stage (flats-vao draw) area)
(stage (text-render draw) area))

(defmethod render :before ((draw debug-draw) target)
(unless (allocated-p (shader-program draw))
(commit draw (loader +main+) :unload NIL)))

(defmethod render ((draw debug-draw) (program shader-program))
(when (logbitp 1 (dirty draw))
(resize-buffer-data (caar (bindings (points-vao draw))) T))
Expand Down

0 comments on commit f3850c1

Please sign in to comment.