![]() |
![]() |
![]() |
![]() |
GdkVulkanContext is an object representing the platform-specific Vulkan draw context.
GdkVulkanContexts are created for a GdkSurface using
gdk_surface_create_vulkan_context()
, and the context will match the
the characteristics of the surface.
Support for GdkVulkanContext is platform-specific, context creation
can fail, returning NULL
context.
VkDevice
gdk_vulkan_context_get_device (GdkVulkanContext *context
);
Gets the Vulkan device that this context is using.
uint32_t
gdk_vulkan_context_get_draw_index (GdkVulkanContext *context
);
Gets the index of the image that is currently being drawn.
This function can only be used between gdk_draw_context_begin_frame()
and
gdk_draw_context_end_frame()
calls.
VkSemaphore
gdk_vulkan_context_get_draw_semaphore (GdkVulkanContext *context
);
Gets the Vulkan semaphore that protects access to the image that is currently being drawn.
This function can only be used between gdk_draw_context_begin_frame()
and
gdk_draw_context_end_frame()
calls.
VkImage gdk_vulkan_context_get_image (GdkVulkanContext *context
,guint id
);
Gets the image with index id
that this context is using.
VkFormat
gdk_vulkan_context_get_image_format (GdkVulkanContext *context
);
Gets the image format that this context is using.
VkInstance
gdk_vulkan_context_get_instance (GdkVulkanContext *context
);
Gets the Vulkan instance that is associated with context
.
uint32_t
gdk_vulkan_context_get_n_images (GdkVulkanContext *context
);
Gets the number of images that this context is using in its swap chain.
VkPhysicalDevice
gdk_vulkan_context_get_physical_device
(GdkVulkanContext *context
);
Gets the Vulkan physical device that this context is using.
VkQueue
gdk_vulkan_context_get_queue (GdkVulkanContext *context
);
Gets the Vulkan queue that this context is using.
uint32_t
gdk_vulkan_context_get_queue_family_index
(GdkVulkanContext *context
);
Gets the family index for the queue that this context is using.
See vkGetPhysicalDeviceQueueFamilyProperties()
.
typedef struct _GdkVulkanContext GdkVulkanContext;
The GdkVulkanContext struct contains only private fields and should not be accessed directly.
“images-updated”
signalvoid user_function (GdkVulkanContext *context, gpointer user_data)
This signal is emitted when the images managed by this context have changed. Usually this means that the swapchain had to be recreated, for example in response to a change of the surface size.
context |
the object on which the signal is emitted |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last