# gl with video in? # 1 >trace # first, load GL and grabber stuff load-opengl load-image load-matrix # need to create render context first # 512 384 display 320 240 display # setup transform matrices for 3d rendering 3d # this defines the cube and 1cube words "cube.pf" load # move window top right # 1024 320 - 0 movewindow # 512 0 movewindow 0 0 movewindow # frame counter 0 variable! frame : tickframe frame @ 1 + frame ! ; # cheezy demo rotation : demorot frame @ >float dup .13 / rotx dup .14 / roty dup .15 / rotz drop ; : lcolor 1 pack >matrix color ; .3 constant x : [[ m-push ; : ]] m-pop ; # main animation loop : anim (1. .5 .3 .1) lcolor # set drawing color 1 blend 0 depth # enable blending, disable depth test [[ 3. transz 0 light ]] # helmet lighting demorot # rotate 3. scale 50 for [[ normal x * transx normal x * transz normal x * transy 1cube ]] next tickframe # update counter ; # register animation loop, and run opengl system as tick ' anim is drawer # run gdb-attach debug # fall into interactive mode interactive