hack in some simple code to write out vertices+indices to a file