Thanks for the testing. It is possible that your framerate is
dropping, either because the graph is directed (arrows are a little
expensive to draw), or it's because I have turned anti-aliasing up
pretty high. There are some function calls in glinit, that might do
with some commenting out to make things faster. Currently borders are
drawn as extra vertices too, so turning them off might be a good
option to have.
After messing around with it some more, and finding some bugs I am not
sure this is the best thing for NetworkX. There are a lot of
visualization tools out there and I am not sure we need another poorly
written openGL one in NetworkX. I'm working on a proposal for Google
Summer of Code, that I think the main thrust of will be interfacing
with other systems (like Gephi), perhaps making a standard way of
doing so. The idea would be to make a separate compatible module, so
that NetworkX could continue to focus on algorithms. In that case fos
might be interesting to interface.
Ben.
On Apr 6, 6:31 am, Stephan Gerhard <
enthou...@unidesign.ch> wrote:
> Hi Ben,
>
> Thanks for providing your example code! I tested them, they all seem to work
> (PyOpenGL was easy to install with
> Ubuntu, package python-opengl). However, if I increase the number of nodes,
> the framerate drops quite a bit.
>
> Is there the plan to extend NetworkX to incorporate such OpenGL drawing
> methods?
>
> I work on some very similar code to draw networks using opengl. I was also
> heavily inspired by the NetworkX API.
> It would be really nice if we could agree on some standard API, i.e. of what
> you can provide to a graph drawing methods,
> so that you can "replace" the backend for actual drawing easily.
>
> The project is called fos (seehttp://
fos.me/) - and uses pyglet under the