Fixed problem with shaders and mesh class. I was accidentally setting the opengl context to every time window.Display() was called, screwing up the vertex array object.