vulkan-utils-0.5.11.0: Utils for the vulkan package
Safe HaskellNone
LanguageHaskell2010

Vulkan.Utils.WindowAdapter

Description

Bridge between a boot sequence and a particular window-library backend. A boot helper written against WindowAdapter stays oblivious to which library is in use; the window packages each provide a constructor for their own window type — glfwAdapter in Vulkan.Utils.Init.GLFW.Window (vulkan-init-glfw) and sdl2Adapter in Vulkan.Utils.Init.SDL2.Window (vulkan-init-sdl2).

Synopsis

Documentation

data WindowAdapter (m :: Type -> Type) Source #

The window-library operations a boot sequence needs.

Constructors

WindowAdapter 

Fields

  • waAllocateInstance :: Maybe ApplicationInfo -> [InstanceRequirement] -> [InstanceRequirement] -> m Instance

    Create an instance satisfying the window library's requirements plus the given required and optional ones.

  • waAllocateSurface :: Instance -> m SurfaceKHR

    Create a surface for the window, destroyed with the resource scope.

  • waDrawableSize :: m Extent2D

    The window's current drawable size, for the swapchain extent.