-
Notifications
You must be signed in to change notification settings - Fork 80
Conversation
works for me. |
Lgtm. Do you have an idea on how to get CI passing? |
@vtjnash i do not have any experience with CI. |
@kuldeepdhaka , @vtjnash maybe a wrong libgtk? |
@lobingera hum, CI probebly has older version of libgtk (less than 3.16.7) |
@kuldeepdhaka: I am interested in this work. Did you test this with some actual drawing of OpenGL commands? Did you use the package ModernGL.jl for that? |
@tknopp You can find the code in the PR file |
thats was my point: in order to make this useful one would have to overload the render method and apply some openGL commands. And my question was, if you have already tried that. @SimonDanisch: In Gtk one can embed OpenGL commands by implementing a function like the following:
Would it be staight forward to use all you GL packages with this or is your stuff tightly integrated with GLFW? |
After a short glimps at GdkGLContext it seems like everything is in place to work smoothly ;) Someone would need to port all these callbacks to retun similar signals for GDK. Related: |
Nice Simon. It seems that this requires some pluggable architecture in GLWindow, right? |
It was created with modularity in mind, but time constraints and other priorities have compromised this noble goal so far ;) I'll gladly try to fix things up when someone has an example application ;) |
Seems reasonable. Might be best to have something like const libgtk_version = VersionNumber(
ccall((:gtk_get_major_version,Gtk.libgtk),Cint, ()),
ccall((:gtk_get_minor_version,Gtk.libgtk),Cint, ()),
ccall((:gtk_get_micro_version,Gtk.libgtk),Cint, ())) run early in Gtk's load sequence. |
@kuldeepdhaka: With #237 being merged you can now make a version check |
a version check isn't really needed unless the API changed. Otherwise, the function call will just fail, so there's no real need to pre-declare the failure (maybe other than to add a comment to the docs that if you get a function-not-found, check the gtk version) |
Really? I thought that the Gtk type construction macros check within the lib to determine whether the symbols are there, no? |
oh right, it does use that information to build the supertype tree. well, nevermind me then. |
GtkGLArea was introduced in Gtk3 as part of library. Earlier, (Gtk2) it was a separate library.
done! |
Since CI is now happy I would merge if there are no further objects. Not 100% sure about the newly created examples directory. Until now we use the test directory and the documentation for theses things but I can see that it can be handy to have an isolated, runnable example file. @kuldeepdhaka Have you used this for actually draw something? |
@tknopp im not drawing anything. |
Yes I see that the example code does not draw anything. My question is whether you plan to use this for drawing something? Or did you just want to wrap the bindings to make Gtk.jl more complete? |
... i'd be interested in doing examples if the interface is functional ... |
@lobingera: That would be great. As a proof of concept this should be not to complicated. The documentation https://developer.gnome.org/gtk3/3.16/GtkGLArea.html#GtkGLArea-struct suggests that one signal_connects the |
GtkGLArea was introduced in Gtk3 as part of library.
Earlier, (Gtk2) it was a separate library.