rewrote vertex array code for meshes in the same way we do it now for post-processing (much simpler, pretty much same speed, and takes a bit less memory)