Class VulkanBackend

java.lang.Object
dev.engine.graphics.vulkan.VulkanBackend

public final class VulkanBackend extends Object
Vulkan backend factory. Requires a WindowToolkit that supports Vulkan surface creation.
var platform = DesktopPlatform.builder().build();
new MyGame().launch(config.toBuilder()
    .graphicsBackend(VulkanBackend.factory(toolkit, surfaceCreator, vkBindings))
    .build());
  • Method Details

    • factory

      public static GraphicsBackendFactory factory(WindowToolkit toolkit, VulkanBackend.SurfaceCreator surfaceCreator, VkBindings vk)
      Creates a Vulkan backend factory using the given window toolkit. The caller provides a surface creation function since it's toolkit-specific.
      Parameters:
      toolkit - the window toolkit (e.g., GLFW with NO_API hints)
      surfaceCreator - given (VkInstance handle, nativeWindowHandle) returns VkSurfaceKHR handle
      vk - the Vulkan bindings implementation
    • factory

      public static GraphicsBackendFactory factory(WindowToolkit toolkit, VulkanBackend.SurfaceCreator surfaceCreator, VkBindings vk, int presentMode)
      Creates a Vulkan backend factory with a specific present mode.
      Parameters:
      presentMode - one of VkBindings.VK_PRESENT_MODE_FIFO_KHR (vsync), VK_PRESENT_MODE_MAILBOX_KHR (triple-buffered), or VK_PRESENT_MODE_IMMEDIATE_KHR (no vsync)