Draw and update graphs in real time with OpenGL