Rationalise gl vertex setting. Added read texture function.
First commit.