added frame selection with mouse, move debug/fps info into a buffer