Pulled the terrain shader generation into its own functions

VBO and shader setup moved to respective functions. This cleans things
up and allows multiple shaders to be setup and multiple vbos without
overlap.