Package icyllis.modernui.core.awt
Class AWTVK
java.lang.Object
icyllis.modernui.core.awt.AWTVK
Vulkan API. To use the surface,
VK_KHR_SURFACE_EXTENSION_NAME
and getSurfaceExtensionName()
must be enabled extensions.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
checkSupport
(org.lwjgl.vulkan.VkPhysicalDevice physicalDevice, int queueFamilyIndex) Checks if the physical device supports the queue family index.static long
Uses the provided canvas to create a Vulkan surface to draw on.static String
Gets the required surface extension for the platform.
-
Constructor Details
-
AWTVK
public AWTVK()
-
-
Method Details
-
getSurfaceExtensionName
Gets the required surface extension for the platform. Also enableVK_KHR_SURFACE_EXTENSION_NAME
. -
checkSupport
public static boolean checkSupport(org.lwjgl.vulkan.VkPhysicalDevice physicalDevice, int queueFamilyIndex) Checks if the physical device supports the queue family index.- Parameters:
physicalDevice
- the physical device to checkqueueFamilyIndex
- the index of the queue family to test- Returns:
- true if the physical device supports the queue family index
-
create
Uses the provided canvas to create a Vulkan surface to draw on.- Parameters:
canvas
- canvas to render ontoinstance
- vulkan instance- Returns:
- handle of the surface
- Throws:
AWTException
- if the surface creation fails
-