问题描述
背景:我想写一个CAD应用程序。我想用Vulkan实现所有渲染。我想使用GTK +。我不想为对象的渲染图像设置一个(可见的)不同的窗口。
因此,我研究并找到了部件,这似乎是做我想做的,但为OpenGL。
是否有相当于 GTKGLArea
?如果没有,是否有另一种方法来实现我的想法?
GtkWindow
和 GtkWidget
,可以通过。 GdkWindow
有。使用您可以获得原始的Vulkan类型,理论上应该可以使用Vulkan呈现。 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?
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.
这篇关于什么是GtkGLArea部件(GTK +)的Vulkan等效物?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!