Matrix library adapted for use with OpenGL