keid-core-0.1.7.1: Core parts of Keid engine.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Resource.Buffer

Documentation

data Store Source #

Constructors

Staged 
Coherent 

data Allocated (s :: Store) a Source #

Constructors

Allocated 

Fields

Instances

Instances details
Show (Allocated s a) Source # 
Instance details

Defined in Resource.Buffer

Methods

showsPrec :: Int -> Allocated s a -> ShowS #

show :: Allocated s a -> String #

showList :: [Allocated s a] -> ShowS #

HasVertexBuffers (Allocated store a) Source # 
Instance details

Defined in Resource.Model

Associated Types

type VertexBuffersOf (Allocated store a) Source #

Methods

getVertexBuffers :: Allocated store a -> [Buffer] Source #

getInstanceCount :: Allocated store a -> Word32 Source #

type VertexBuffersOf (Allocated store a) Source # 
Instance details

Defined in Resource.Model

type VertexBuffersOf (Allocated store a) = a

allocateCoherent :: (MonadResource m, Storable a, HasVulkan context) => context -> BufferUsageFlagBits -> ("initial size" ::: Int) -> Vector a -> m (ReleaseKey, Allocated 'Coherent a) Source #

createCoherent :: forall a context io. (Storable a, HasVulkan context, MonadUnliftIO io) => context -> BufferUsageFlagBits -> ("initial size" ::: Int) -> Vector a -> io (Allocated 'Coherent a) Source #

createStaged :: forall a context io. (Storable a, HasVulkan context, MonadUnliftIO io) => context -> Queues CommandPool -> BufferUsageFlagBits -> Int -> Vector a -> io (Allocated 'Staged a) Source #

destroy :: (MonadUnliftIO io, HasVulkan context) => context -> Allocated s a -> io () Source #

destroyAll :: (MonadUnliftIO io, HasVulkan context, Foldable t) => context -> t (Allocated s a) -> io () Source #

updateCoherent :: (Storable a, MonadUnliftIO io) => Vector a -> Allocated 'Coherent a -> io (Allocated 'Coherent a) Source #

updateCoherentResize_ :: (Storable a, HasVulkan context, MonadUnliftIO io) => context -> Allocated 'Coherent a -> Vector a -> io (Allocated 'Coherent a) Source #

copyBuffer_ :: (MonadUnliftIO io, HasVulkan context) => context -> Queues CommandPool -> ("dstBuffer" ::: Buffer) -> ("srcBuffer" ::: Buffer) -> DeviceSize -> io () Source #

newObserverCoherent :: Storable a => BufferUsageFlagBits -> Int -> ResourceT (StageRIO st) (ObserverCoherent a) Source #

observeCoherentResize_ :: (HasVulkan env, HasOutput source, GetOutput source ~ Vector output, Storable output) => source -> ObserverCoherent output -> RIO env () Source #