Using Julia & GTK for 3D-Plots/ Visuals

Hi All!

I’m currently working on a building a GUI using Julia & GTK, but I would like to display 3D-plots and 3D visuals (animations or CAD models) to my GUI. How can I display these visuals onto my GUI?

Many Thanks,
Rae

1 Like

ping @sdanisch :slight_smile:

Yes, GLVisualize can in theory be used for that…
It offers already quite a few GUI options even without GTK.
GTK support is on it’s way, but best would be if I just release Visualize.jl, which already has GTK support - but not all features from GLVisualize.jl yet.
I’m working on this, but need to find time and prioritize other projects right now :frowning:

3 Likes

It would be great if it could be integrate into Immerse.jl (figure manager + interactivity), you can even put the figures in a GtkNotebook and you have a pretty decent plotting system.

It uses Gadfly at the moment but I guess it wouldn’t be too hard to have something where you can switch the backend. Basically “Plottify” Immerse.

Just to put another option on the table, QML.jl should work with the latest GLVisualize master on 0.6 again, see the example here. It’s also possible to combine raw OpenGL directly with 2D QML elements as shown in the OpenGL Triangle example here (QML here).

1 Like

Well, as nice as Immerse.jl is, it’s not really 3d :frowning:

I mean integrating Visualize.jl with Immerse (as an optional backend). Basically you would have the plotting layer with Gtk-compatible backends (Gadfly, Visualize, GR, …), then the figures/interactivity layer with Immerse (or another package), and finally applications can use the whole thing this as a widget.

I am not fully sure if we need yet another layer with different backends. More important is a proper integration with Gtk. I use the combination Winston+Gtk which works absolutely smoothly since Winston just uses Cairo in its backend. This covers 1D graphs and plotting 2D images quite well. If Vizualize.jl will handle this in the future this would be great but for me it would be more important if Visualize.jl could fill the missing gap of 3D visualization that is currently missing.

I have not used Immerse so far but some interactive feature would indeed pretty helpful. Currently I am doing data picking on the Cairo surface to get some interactivity.

So, correct me if I am wrong – and I would love to be – but there isn’t a widget or any straight forward way to include a 3D plot in a Gtk GUI, using any of the current Julia plotting packages?
@sdanisch @tim.holy @tobias.knopp

Is there a way to use Gtk.GtkGLArea widget as a container for a GLVisualize rendering?
In GLVisualize, one creates a window with glscreen(), can it be piped into the Gtk widget?

GLVisualize.jl is tight to GLFW. But as @sdanisch indicated above he has already integrated Visualize.jl with Gtk. I am also very eager to see a code example of this :slight_smile:

One issue with GtkGLArea will be that it was not supported on OS X last time I tried. But this might be a general issue with Apple not supporting OpenGL anymore…