Modulesdl2-2.5.5.0Haskell2010
SDL.Video.Vulkan
- 3 types
- 6 values
- Packagesdl2-2.5.5.0
- Exports9
- LanguageHaskell2010
- LicenceBSD-3-Clause
- SourceVulkan.hs
Vulkan types
3 declarationsVulkan loader
3 declarationsDynamically load a Vulkan loader library.
If a filePath is Nothing, SDL will use the value of the environment variable SDL_VULKAN_LIBRARY, if set, otherwise it loads the default Vulkan loader library.
This function should be called after initializing the video driver (i.e. initialize [InitVideo]), but before creating any windows with windowGraphicsContext = VulkanContext.
If no Vulkan loader library is loaded, analogue of vkLoadLibrary Nothing will be automatically called by SDL C library upon creation of the first Vulkan window.
Throws SDLException if there are no working Vulkan drivers installed.
Unload the Vulkan loader library previously loaded by vkLoadLibrary.
Analogue of this function will be automatically called by SDL C library after destruction of the last window with windowGraphicsContext = VulkanContext.
Get the vkGetInstanceProcAddr function, which can be used to obtain another Vulkan functions (see https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkGetInstanceProcAddr.html).
The vkGetVkGetInstanceProcAddr function should be called after either calling vkLoadLibrary function or creating first Vulkan window.
Vulkan surface
2 declarationsGet the names of the Vulkan instance extensions needed to create a surface with vkCreateSurface.
The extension names queried here must be enabled when calling vkCreateInstance (see https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCreateInstance.html), otherwise vkCreateSurface will fail.
Window should have been created with windowGraphicsContext = VulkanContext.
Throws SDLException on failure.
Create a Vulkan rendering surface for a window.
Window should have been created with windowGraphicsContext = VulkanContext.
Instance should have been created with the extensions returned by vkGetInstanceExtensions enabled.
Throws SDLException on failure.
Querying for the drawable size
1 declarationGet the size of a window's underlying drawable area in pixels (for use with setting viewport, scissor & etc).
It may differ from windowSize if window was created with windowHighDPI flag.