Top |
Functions
VkDevice | gdk_vulkan_context_get_device () |
uint32_t | gdk_vulkan_context_get_draw_index () |
VkSemaphore | gdk_vulkan_context_get_draw_semaphore () |
VkImage | gdk_vulkan_context_get_image () |
VkFormat | gdk_vulkan_context_get_image_format () |
VkInstance | gdk_vulkan_context_get_instance () |
uint32_t | gdk_vulkan_context_get_n_images () |
VkPhysicalDevice | gdk_vulkan_context_get_physical_device () |
VkQueue | gdk_vulkan_context_get_queue () |
uint32_t | gdk_vulkan_context_get_queue_family_index () |
Description
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.
Functions
gdk_vulkan_context_get_device ()
VkDevice
gdk_vulkan_context_get_device (GdkVulkanContext *context
);
Gets the Vulkan device that this context is using.
gdk_vulkan_context_get_draw_index ()
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.
gdk_vulkan_context_get_draw_semaphore ()
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.
gdk_vulkan_context_get_image ()
VkImage gdk_vulkan_context_get_image (GdkVulkanContext *context
,guint id
);
Gets the image with index id
that this context is using.
gdk_vulkan_context_get_image_format ()
VkFormat
gdk_vulkan_context_get_image_format (GdkVulkanContext *context
);
Gets the image format that this context is using.
gdk_vulkan_context_get_instance ()
VkInstance
gdk_vulkan_context_get_instance (GdkVulkanContext *context
);
Gets the Vulkan instance that is associated with context
.
gdk_vulkan_context_get_n_images ()
uint32_t
gdk_vulkan_context_get_n_images (GdkVulkanContext *context
);
Gets the number of images that this context is using in its swap chain.
gdk_vulkan_context_get_physical_device ()
VkPhysicalDevice
gdk_vulkan_context_get_physical_device
(GdkVulkanContext *context
);
Gets the Vulkan physical device that this context is using.
gdk_vulkan_context_get_queue ()
VkQueue
gdk_vulkan_context_get_queue (GdkVulkanContext *context
);
Gets the Vulkan queue that this context is using.
gdk_vulkan_context_get_queue_family_index ()
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()
.
Types and Values
GdkVulkanContext
typedef struct _GdkVulkanContext GdkVulkanContext;
The GdkVulkanContext struct contains only private fields and should not be accessed directly.
Signal Details
The “images-updated”
signal
void 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.
Parameters
context |
the object on which the signal is emitted |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last