# gl with video in? # first, load GL and grabber stuff load-opengl load-image load-matrix # "/home/tom/libpf/script/shapes.pf" load # need to create render context first # 512 384 display 320 240 display # setup transform matrices for 3d rendering 3d # move window top right 1024 320 - 0 movewindow # 512 0 movewindow # this needs to be loaded after context is created (display list) "cube.pf" load # script to use in inner loop variable _script : go _script ! ; "demo/stuff/demo.pf" go # frame counter 0 variable! frame () variable! state # cheezy demo rotation : demorot frame @ >float dup .13 / rotx dup .14 / roty dup .15 / rotz drop ; # main animation loop : anim mark # mark dictionary try _script @ load # load and execute the script recover drop # in case something goes wrong: . cr # print last error message endtry empty # discard script from memory frame @ 1 + frame ! ; # register animation loop, and run opengl system as tick ' anim is drawer run # fall into interactive mode interactive