Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data SwapchainResources = SwapchainResources {
- srInfo :: SwapchainInfo
- srImageViews :: Vector ImageView
- srImages :: Vector Image
- srRelease :: RefCounted
- srScreenVar :: Var Extent2D
- data SwapchainInfo = SwapchainInfo {
- siSwapchain :: SwapchainKHR
- siSwapchainReleaseKey :: ReleaseKey
- siPresentMode :: PresentModeKHR
- siMinImageCount :: Word32
- siSurfaceFormat :: Format
- siSurfaceColorspace :: ColorSpaceKHR
- siDepthFormat :: Format
- siMultisample :: SampleCountFlagBits
- siAnisotropy :: Float
- siImageExtent :: Extent2D
- siSurface :: SurfaceKHR
- allocSwapchainResources :: (MonadResource (RIO env), HasVulkan env, HasLogFunc env) => SwapchainKHR -> Extent2D -> SurfaceKHR -> Var Extent2D -> RIO env SwapchainResources
- recreateSwapchainResources :: (MonadResource (RIO env), HasVulkan env, HasLogFunc env) => Extent2D -> SwapchainResources -> RIO env SwapchainResources
- createSwapchain :: (MonadResource m, MonadVulkan env m, HasLogFunc env) => SwapchainKHR -> Extent2D -> SurfaceKHR -> m SwapchainInfo
- threwSwapchainError :: MonadUnliftIO f => f () -> f Bool
- class HasSwapchain a where
- getSurfaceExtent :: a -> Extent2D
- getSurfaceFormat :: a -> Format
- getDepthFormat :: a -> Format
- getMultisample :: a -> SampleCountFlagBits
- getAnisotropy :: a -> "max sampler anisotropy" ::: Float
- getSwapchainViews :: a -> Vector ImageView
- getMinImageCount :: a -> Word32
- getImageCount :: a -> Word32
- setDynamic :: MonadIO io => CommandBuffer -> ("viewport" ::: Rect2D) -> ("scissor" ::: Rect2D) -> io ()
- setDynamicFullscreen :: MonadIO io => CommandBuffer -> SwapchainResources -> io ()
Documentation
data SwapchainResources Source #
SwapchainResources | |
|
Instances
HasSwapchain SwapchainResources Source # | |
Defined in Engine.Vulkan.Swapchain getSurfaceExtent :: SwapchainResources -> Extent2D Source # getSurfaceFormat :: SwapchainResources -> Format Source # getDepthFormat :: SwapchainResources -> Format Source # getMultisample :: SwapchainResources -> SampleCountFlagBits Source # getAnisotropy :: SwapchainResources -> "max sampler anisotropy" ::: Float Source # getSwapchainViews :: SwapchainResources -> Vector ImageView Source # |
data SwapchainInfo Source #
SwapchainInfo | |
|
allocSwapchainResources Source #
:: (MonadResource (RIO env), HasVulkan env, HasLogFunc env) | |
=> SwapchainKHR | Previous swapchain, can be NULL_HANDLE |
-> Extent2D | If the swapchain size determines the surface size, use this size |
-> SurfaceKHR | |
-> Var Extent2D | |
-> RIO env SwapchainResources |
Allocate everything which depends on the swapchain
recreateSwapchainResources Source #
:: (MonadResource (RIO env), HasVulkan env, HasLogFunc env) | |
=> Extent2D | |
-> SwapchainResources | The reference to these resources will be dropped |
-> RIO env SwapchainResources |
:: (MonadResource m, MonadVulkan env m, HasLogFunc env) | |
=> SwapchainKHR | Old swapchain, can be NULL_HANDLE |
-> Extent2D | If the swapchain size determines the surface size, use this size |
-> SurfaceKHR | |
-> m SwapchainInfo |
Create a swapchain from a SurfaceKHR
threwSwapchainError :: MonadUnliftIO f => f () -> f Bool Source #
Catch an ERROR_OUT_OF_DATE_KHR exception and return True
if that happened
class HasSwapchain a where Source #
getSurfaceExtent :: a -> Extent2D Source #
getSurfaceFormat :: a -> Format Source #
getDepthFormat :: a -> Format Source #
getMultisample :: a -> SampleCountFlagBits Source #
getAnisotropy :: a -> "max sampler anisotropy" ::: Float Source #
getSwapchainViews :: a -> Vector ImageView Source #
getMinImageCount :: a -> Word32 Source #
getImageCount :: a -> Word32 Source #
Instances
HasSwapchain SwapchainResources Source # | |
Defined in Engine.Vulkan.Swapchain getSurfaceExtent :: SwapchainResources -> Extent2D Source # getSurfaceFormat :: SwapchainResources -> Format Source # getDepthFormat :: SwapchainResources -> Format Source # getMultisample :: SwapchainResources -> SampleCountFlagBits Source # getAnisotropy :: SwapchainResources -> "max sampler anisotropy" ::: Float Source # getSwapchainViews :: SwapchainResources -> Vector ImageView Source # |
setDynamic :: MonadIO io => CommandBuffer -> ("viewport" ::: Rect2D) -> ("scissor" ::: Rect2D) -> io () Source #
setDynamicFullscreen :: MonadIO io => CommandBuffer -> SwapchainResources -> io () Source #