6

I'd like to develop an application targeting modern popular Linux distributions that uses GTK for its UI, but also the Vulkan API to render a 3D model. Ideally I'd like to use the gtkmm C++ wrapper for GTK, and the Vulkan C++ API.

What ways do I currently have to do this?

I know that I can get a Vulkan context using SDL2 and other similar low level libraries, and I can get an OpenGL context using GTK. But I haven't found resources for combining these two approaches.

To start, I'm not limited to developing on or targeting any particular Linux distribution. Although any insights into why a particular environment makes this easier or more difficult are appreciated.

Edit:

I'm aware of this question: What is the Vulkan equivalent of the GtkGLArea widget (GTK+)?

However, many months have passed since its most recent update. My Google searching does not indicate that the state of affairs has changed, but I would like to be proven wrong. In addition, I intentionally phrased my question more broadly. I don't necessarily want just a GtkVulkanArea widget. I want to know of any valid way to combine Gtk and Vulkan. For example, is it possible to embed a Gtk event loop and widgets in an SDL2 window? What about the other way around? Again, my Google searching has not been very helpful, and I hope someone knowledgeable on this topic will answer.

Filipp
  • 1,843
  • 12
  • 26
  • 3
    Possible duplicate of [What is the Vulkan equivalent of the GtkGLArea widget (GTK+)?](https://stackoverflow.com/questions/45191254/what-is-the-vulkan-equivalent-of-the-gtkglarea-widget-gtk) – krOoze Mar 13 '18 at 14:15
  • This is not a duplicate. I am aware of that question, and am explicitly re-asking in case there have been updates since then, such as development on GTK4. – Filipp Mar 13 '18 at 17:06
  • "explicitly re-asking" -- I am not sure where you got so sharp a razor to split that hair, but alright. – krOoze Mar 13 '18 at 18:24
  • I should instead say that I was aware of that question, was dissatisfied with the lack of updates in the months since, and decided to re-ask it. I don't like the word duplicate because it suggests lazily asking a commonly answered question without research, which is not the case here. – Filipp Mar 14 '18 at 02:00
  • `I don't like the word duplicate because it suggests lazily asking a commonly answered question without research, which is not the case here.` - You have wrong understanding of "duplicate" word, look into [help center](https://stackoverflow.com/help/duplicates). – Tsyvarev Mar 14 '18 at 09:41
  • @Tsyvarev Your link does not define duplicate. It even says: "There are many ways to ask the same question, and a user might not be able to find the answer if they're asking it a different way.", which is basically what OP is saying. I would think, though, though that if OP is not satisfied with the answer from the [similar question](https://stackoverflow.com/questions/45191254/what-is-the-vulkan-equivalent-of-the-gtkglarea-widget-gtk), he should edit his question to add the link and explain why it does not solve his issue, to help potential users that might want to answer. – BobMorane Apr 02 '18 at 15:31
  • 1
    @BobMorane: What you cite from the help center, is *still a duplicate*. But on Stack Overflow **duplication is not necessarily bad** (from [there](https://stackoverflow.blog/2010/11/16/dr-strangedupe-or-how-i-learned-to-stop-worrying-and-love-duplication/)). This is what the asker miss. I agree with you in that referencing similar question in the given one and explaining why it doesn't help would improve the given question. – Tsyvarev Apr 03 '18 at 07:23
  • This question was already answered there, though. I'd use Qt, because it has QVulkanWindow. – DexterHaxxor May 24 '19 at 11:53
  • 2
    @MichalŠtein "Use Qt" is not an answer to "How do I use Vulkan and GTK together?" – Ethan Reesor Jun 05 '21 at 21:05

0 Answers0