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


;; OpenGL and SDL

(when (or (member "-h" argv)
          (member "--help" argv))
  (writing "$stderr" 
   (render-brace-text 0 72
   '{<p> Synopsis: ,,(basename (car argv)) [-h]{<br>}
     A triangle displayed using OpenGL in an SDL window.
     The triangle can be rotated under user control.
     Option "-h" shows this message. 
     }))
  (exit 0))


(libload "libc/constants")
(libload "opengl/opengl")
(libload "sdl/libsdl")

(writing "/dev/null" (libload "sdl/demos/sdlgl-demo-01"))

(sdlgl-demo)

