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

Stance on higher level frameworks #113

Closed
notgull opened this issue Mar 18, 2023 · 4 comments
Closed

Stance on higher level frameworks #113

notgull opened this issue Mar 18, 2023 · 4 comments

Comments

@notgull
Copy link
Member

notgull commented Mar 18, 2023

In #105, I said that we should decide what we want to do about higher level frameworks, such as GTK, Qt, or others. However, it is difficult to know what level of abstraction to operate at. For instance, when it comes to GTK, do you provide:

  • A pointer to the GtkWidget, the highest level abstraction,
  • A pointer to the GdkSurface, since that's the windowing system used underneath.
  • Since the underlying system window is usually exposed in some way by the framework, say that the higher level framework should just fill out the RawWindowHandle with that corresponding raw window.

Thoughts? I'm leaning more towards option #3 the more I think about it.

@kchibisov
Copy link
Member

A general question, how such frameworks integrate with OpenGL/Vulkan, frow what I understand they have their own abstractions and you can't simply use OpenGL/Vulkan with them like you can with winit, so raw window handle for them is sort of weird?

@Lokathor
Copy link
Contributor

SDL requires you to flag a window as intended for gl/vk/metal during window creation because the platform sometimes needs to know ahead of time, but otherwise leaves it up to you.

@ids1024
Copy link
Member

ids1024 commented Mar 20, 2023

What is the goal of this? Having access to the underlying X/Wayland/etc. connection could sometimes be useful with things like GTK. You could then use it to communicate with X or Wayland for various purposes. But I don't know if you could create an EGL or Vulkan context for a GTK widow without conflicting with what GTK is trying to do. In principle Wgpu could have a backend that sets up a GtkGLArea. (Apparently GdkVulkanContext exists; I guess you'd somehow use that with a custom widget?)

Probably best not to add anything like this without a clear idea of what it would be used for and how.

@notgull
Copy link
Member Author

notgull commented Mar 21, 2023

Seems like the overall opinion is "we don't need it". I'll move forwards with that in mind. Closing this issue for now.

@notgull notgull closed this as not planned Won't fix, can't repro, duplicate, stale Mar 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants