# gl with video in? # first, load GL and grabber stuff load-opengl load-grab load-image # need to create render context first 320 240 display # setup transform matrices for 3d rendering 3d # move window top left 0 0 movewindow # variable to record black level 0. variable! black # function that records black level : black! grab intensity black ! ; # very simple animation: : anim grab dup # grab a video image from input 4 histo # compute histogram color # use as color intensity # compute intensity black @ - # subtract black image intensity 150. * # scale square ; # use as size of square # enable it as drawing routine ' anim is drawer # this is defined in the opengl code and # sets the graphics word ( wich calls 'drawer' as a hook ) as the current # scheduler tick ( see opengl.pf ) run # fall into interactive mode interactive