(libload "inventor/inventor")
(libload "inventor/inventorxt")

(setq mywindow (soxt_init "lush"))
(setq root  (new soseparator ()))
(setq mycamera (new soperspectivecamera ()))
(setq mymaterial (new somaterial ()))
(setq mylight   (new sodirectionallight ()))
(setq mycone (new socone ()))

(==> root ref)
(==> root addChild :mycamera:p)
(==> root addChild :mylight:p)
(==> (==> mymaterial getmf_diffusecolor) setvalue 1.0 0.0 0.0)
(==> root addChild :mymaterial:p)
(==> root addChild :mycone:p)

(setq myarea (new soxtrenderarea mywindow "test" 1 1 1 ()))
(==> mycamera viewall_node  :root:p  (==> myarea getviewportregion)  1.0)

(==> myarea  setscenegraph :root:p)
(==> myarea show)

(soxt_show mywindow)

