switched to OpenGL version 3.2 and added time based animation