What is the Vulkan equivalent of the GtkGLArea widget (GTK+)?

£可爱£侵袭症+ 提交于 2019-12-07 09:22:52

问题


Background: I want to write a CAD application. I want to implement all rendering with Vulkan. And I want to use GTK+.

I don't want a (visible) different window for the rendered image of the object.

So I researched and found the GtkGLArea widget, which seems to do what I want, but for OpenGL.

Is there an equivalent to GTKGLArea? If not, is there another way to implement what I'm thinking of?


回答1:


There is a GdkWindow which I believe is behind many Gtk graphic types such as GtkWindow and GtkWidget and obtainable with gtk_*_get_window(). GdkWindow has gdk_window_create_vulkan_context(). With GdkVulkanContext you can get raw Vulkan types and theoretically should be able to render to with Vulkan.



来源:https://stackoverflow.com/questions/45191254/what-is-the-vulkan-equivalent-of-the-gtkglarea-widget-gtk

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!