+(define view-type
+ (make-record-type "view"
+ '(id controllers meshes)
+ (lambda (record port)
+ (format port "#<view: ~a controllers / ~a meshes>"
+ (length (hash-map->list (lambda x x) (view-controllers record)))
+ (length (hash-map->list (lambda x x) (view-meshes record)))))))
+
+(define view? (record-predicate view-type))
+(define view-id (record-accessor view-type 'id))
+(define view-controllers (record-accessor view-type 'controllers))
+(define view-meshes (record-accessor view-type 'meshes))
+(define (make-view) ((record-constructor view-type) (gensym) (make-hash-table) (make-hash-table)))
+
+
+(define active-views (make-hash-table))
+