Added example double buffering code.