1 ! Copyright (C) 2009 Slava Pestov.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: accessors kernel ;
6 ! A pen that caches vertex arrays, etc
7 TUPLE: caching-pen last-dim ;
9 GENERIC: recompute-pen ( gadget pen -- )
11 : compute-pen ( gadget pen -- )
12 2dup [ dim>> ] [ last-dim>> ] bi* eq? [
15 [ swap dim>> >>last-dim drop ] [ recompute-pen ] 2bi