Skip to content

Commit

Permalink
update samples for newer API, add some restarts
Browse files Browse the repository at this point in the history
  • Loading branch information
3b committed Jul 9, 2012
1 parent 5de9069 commit 1ba8da5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
8 changes: 4 additions & 4 deletions simple-sample.lisp
Expand Up @@ -97,9 +97,9 @@
(when (and (slot-boundp w 'scene)
(scene w))
(let ((*tris* 0))

(xform w)
(recursive-render (scene w) (ai:root-node (scene w)))
(with-simple-restart (continue "continue")
(xform w)
(recursive-render (scene w) (ai:root-node (scene w))))
(when *dump*
(setf *dump* nil)
(format t "drew ~s tris~%" *tris*))))
Expand Down Expand Up @@ -137,7 +137,7 @@
(ai:with-log-to-stdout ()
(let ((scene
(ai:import-into-lisp (cffi-sys:native-namestring (truename file))
:ai-process-preset-target-realtime-quality)))
:processing-flags '(:ai-process-preset-target-realtime-quality))))
(when scene (glut:display-window (make-instance 'ai-sample-window
:scene scene))))))

Expand Down
9 changes: 5 additions & 4 deletions simple-sample2.lisp
Expand Up @@ -210,8 +210,9 @@

(let ((*bone-transforms* (make-hash-table :test 'equal))
(*node-transforms* (make-hash-table :test 'equal)))
(animate-bones w)
(recursive-render w))
(with-simple-restart (continue "continue")
(animate-bones w)
(recursive-render w)))
(when *dump*
(setf *dump* nil)
(format t "drew ~s tris~%" *tris*))))
Expand Down Expand Up @@ -260,9 +261,9 @@
(ai:with-log-to-stdout ()
(let ((scene
(ai:import-into-lisp file
:ai-process-preset-target-realtime-quality)))
:processing-flags '(:ai-process-preset-target-realtime-quality))))
(when scene (glut:display-window (make-instance 'ai-sample2-window
:scene scene))))))

;(ai-sample2)
;(ai-sample2 (cffi-sys:native-namestring (merge-pathnames "src/assimp/test/models/X/dwarf.x" (user-homedir-pathname))))
;(ai-sample2 (cffi-sys:native-namestring (merge-pathnames "src/assimp/test/models-nonbsd/X/dwarf.x" (user-homedir-pathname))))

0 comments on commit 1ba8da5

Please sign in to comment.