Open rasmushenningsson opened 11 months ago
Very good suggestions! Makie.jl is hard to support because it is still a rapidly moving target.
The plan is to move the Makie support into a separate package. I don't think it's a simple fix to upgrade. Having a separate package will allow us to formally set compat bounds also, currently the limits set in the examples repository are the valid ones.
As first step we could investigate the errors that happen if we use Makie 0.18 ...
Just to add a data point, and in case anyone was wondering, the Makie 0.20 beta which has some breaking changes, still suffers from this same error. @SimonDanisch FYI.
I looked into this ages ago, though unfortunately my discussions with @barche about it are lost to the Slack-hole. As far as I remember, the major blocker is that Makie support depends on QMLScreen
subtyping GLMakie.GLScreen
: https://github.com/JuliaGraphics/QML.jl/blob/main/src/makie_support.jl#L51
And in Makie 0.18 (or 0.19, my memory is fuzzy) support for the abstract GLMakie.GLScreen
was dropped in favour of a concrete Screen
type that all methods now require: https://github.com/MakieOrg/Makie.jl/blob/master/GLMakie/src/screen.jl#L159
To add support for more recent versions I think Makie would have to add back support for that abstract type.
@JamesWrigley also mentioned on slack that there is a Google Summer Of Code project for this: https://julialang.org/jsoc/gsoc/gui/#qml_and_makie_integration
Also see QML Roadmap with discussion here: https://github.com/orgs/JuliaGraphics/discussions/4
@JamesWrigley also mentioned on slack that there is a Google Summer Of Code project for this: https://julialang.org/jsoc/gsoc/gui/#qml_and_makie_integration
The 2024 GSOC projects have been announced (https://julialang.org/blog/2024/05/gsoc-2024-fellows/), but QML and Makie integration is not included in the list.
Does this mean that there is no planned work on this at the moment?
Indeed, I don't think there is any planned work on this at the moment. Please correct me if I am wrong.
We had no viable GSOC proposals for this topic, but it is still pretty high on my todo list for QML.jl. I can’t give a timeline though.
I'm happy to hear that it's still something you want to do! I completely understand that it's not easy to find the time.
I looked into this ages ago, though unfortunately my discussions with @barche about it are lost to the Slack-hole. As far as I remember, the major blocker is that Makie support depends on
QMLScreen
subtypingGLMakie.GLScreen
: https://github.com/JuliaGraphics/QML.jl/blob/main/src/makie_support.jl#L51And in Makie 0.18 (or 0.19, my memory is fuzzy) support for the abstract
GLMakie.GLScreen
was dropped in favour of a concreteScreen
type that all methods now require: https://github.com/MakieOrg/Makie.jl/blob/master/GLMakie/src/screen.jl#L159To add support for more recent versions I think Makie would have to add back support for that abstract type.
I've spent the last few days integrating Makie with CImGui so I understand things a bit better now :sweat_smile:
If I read the code correctly QML.jl currently creates its own Screen
and rendering functions, but I think with Makie's current design the integration will be simpler because we only need to worry about the OpenGL window bits (the QML window in this case) and forwarding input (mouse buttons etc) from the window, no need to reimplement the rendering code or anything. What stopped me from re-using more of GLMakie than I currently do is GLMakie assuming that it owns Screen.glscreen
and trying to do things like resizing the window or setting window hints. I'd like to make a PR to GLMakie at some point to indicate whether or not the Screen
owns the window, and that should make integration even simpler.
I'd like to make a PR to GLMakie at some point to indicate whether or not the
Screen
owns the window, and that should make integration even simpler.
Done: https://github.com/MakieOrg/Makie.jl/pull/4073 If anyone wants to get started on fixing the Makie integration in QML.jl, I outlined the basic steps that are necessary in the new docs in the PR.
Great, thanks a lot for this, this looks like it will make integrating Makie support a lot easier and cleaner!
Currently,
QML.jl
works well withGLMakie.jl
v0.6 (andMakie.jl
v0.17). But not with the latest versions -GLMakie.jl
v0.8 (andMakie.jl
v0.19).The error message is "
GLScreen
not defined". Hopefully, this is a rather small fix if you're familiar with the setup, but I'm not certain.Later, it would also be nice to use the new Package Extensions rather than
Requires.jl
for Makie support - which among other things makes it possible to put compat bounds for Makie/GLMakie.