Made the engine more compatible with OpenGL 2