#!/bin/sh
exec lush "$0" "$@"
!#

;; OpenGL teapot demo

(when (or (member "-h" argv)
          (member "--help" argv))
  (writing "$stderr" 
   (render-brace-text 0 72
   '{<p> Synopsis: ,,(basename (car argv)) [-h]{<br>}
     A rotating teapot demo that shows Lush's interface to the
     OpenGL/GLUT API for 3D graphics.
     Option "-h" shows this message. The only way to terminate this 
     program is to hit CTRL-C in the console window.
     }))
  (exit 0))


(libload "opengl/glut")

(writing "/dev/null" (libload "opengl/demos/glut-demo"))

(printf "this script demonstrates the OpenGL/GLUT interface\n")
(printf "hit CTRL-C to exit\n")
(glut-demo-start)
(wait t)
