Rendering graph with opengl