I am developing an application which draws an internal graph structure onscreen and offers some edit capatibilities. The current version uses GLUT. This screenshot should make it more clear:
In this run, I put a print on my drawing function to print the i’th time it is drawn. By this i can see it keeps drawing it everytime! Even if i dont move/press anything it will redraw it. It runs fast now, but i realize that my drawing function is somewhat ‘expensive’. It runs trought a list-based graph with lots of recursive calls and evaluations. The graph is read from a binary file and allocated in. The problem is that the user should be able to edit that at any time. This makes it not static.
Also, i’m not sure i skipped some part but does OpenGL automatically redraw the scene as fast as it can? Or maybe it’s just some flaw of my program.
I wonder if there is a way to optimize this. I guess display lists won’t do as they are static. Maybe vertex arrays, but if so, i don’t see how i would be using them. I would like to know if there are any options to optimize that.
Thanks in advance,