Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support latest Makie / GLMakie #173

Open
rasmushenningsson opened this issue Sep 28, 2023 · 14 comments
Open

Support latest Makie / GLMakie #173

rasmushenningsson opened this issue Sep 28, 2023 · 14 comments

Comments

@rasmushenningsson
Copy link

Currently, QML.jl works well with GLMakie.jl v0.6 (and Makie.jl v0.17).
But not with the latest versions - GLMakie.jl v0.8 (and Makie.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.

@ufechner7
Copy link
Member

Very good suggestions! Makie.jl is hard to support because it is still a rapidly moving target.

@barche
Copy link
Collaborator

barche commented Sep 28, 2023

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.

@ufechner7
Copy link
Member

As first step we could investigate the errors that happen if we use Makie 0.18 ...

@pbouffard
Copy link

pbouffard commented Nov 13, 2023

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.

@JamesWrigley
Copy link

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.

@rasmushenningsson
Copy link
Author

@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

@rasmushenningsson
Copy link
Author

Also see QML Roadmap with discussion here: https://github.com/orgs/JuliaGraphics/discussions/4

@rasmushenningsson
Copy link
Author

@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?

@ufechner7
Copy link
Member

Indeed, I don't think there is any planned work on this at the moment. Please correct me if I am wrong.

@barche
Copy link
Collaborator

barche commented May 23, 2024

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.

@rasmushenningsson
Copy link
Author

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.

@JamesWrigley
Copy link

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.

I've spent the last few days integrating Makie with CImGui so I understand things a bit better now 😅

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.

@JamesWrigley
Copy link

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: MakieOrg/Makie.jl#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.

@barche
Copy link
Collaborator

barche commented Jul 31, 2024

Great, thanks a lot for this, this looks like it will make integrating Makie support a lot easier and cleaner!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants