Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Experimental helpers for managing models with multiple instance buffers.
Only works with fully-coherent models and atomic stores. Not particularly efficient: when any element is changed, everything gets fully updated.
Documentation
newCoherent :: (VertexBuffers res, MonadVulkan env m) => Int -> Text -> ResourceT m (ObserverIO res) Source #
observeCoherent :: (MonadVulkan env m, HasOutput output, UpdateCoherent bufs (GetOutput output)) => output -> ObserverIO bufs -> m () Source #
class VertexBuffers a where Source #
Nothing
createInitial :: forall env m. MonadVulkan env m => Int -> Text -> ResourceT m a Source #
default createInitial :: forall env m. (Generic a, GVertexBuffers (Rep a), MonadVulkan env m) => Int -> Text -> ResourceT m a Source #
destroyCurrent :: forall env. HasVulkan env => env -> a -> IO () Source #
Instances
VertexBuffers ExampleBuffers Source # | |
Defined in Resource.Model.Observer.Example createInitial :: forall env (m :: Type -> Type). MonadVulkan env m => Int -> Text -> ResourceT m ExampleBuffers Source # destroyCurrent :: HasVulkan env => env -> ExampleBuffers -> IO () Source # | |
Storable a => VertexBuffers (Allocated 'Coherent a) Source # | |
Defined in Resource.Model.Observer |
genericCreateInitial :: (Generic a, GVertexBuffers (Rep a), MonadVulkan env m) => Int -> Text -> ResourceT m a Source #
genericDestroyCurrent :: (Generic a, GVertexBuffers (Rep a), HasVulkan env) => env -> a -> IO () Source #
class UpdateCoherent bufs stores where Source #
Nothing
updateCoherent :: forall env m. MonadVulkan env m => bufs -> stores -> m bufs Source #
default updateCoherent :: forall env m. (Generic bufs, Generic stores, GUpdateCoherent (Rep bufs) (Rep stores), MonadVulkan env m) => bufs -> stores -> m bufs Source #
Instances
UpdateCoherent ExampleBuffers ExampleStores Source # | |
Defined in Resource.Model.Observer.Example updateCoherent :: MonadVulkan env m => ExampleBuffers -> ExampleStores -> m ExampleBuffers Source # | |
Storable a => UpdateCoherent (Allocated 'Coherent a) (Vector a) Source # | |
Defined in Resource.Model.Observer updateCoherent :: MonadVulkan env m => Allocated 'Coherent a -> Vector a -> m (Allocated 'Coherent a) Source # |
genericUpdateCoherent :: (Generic bufs, Generic stores, GUpdateCoherent (Rep bufs) (Rep stores), MonadVulkan env m) => bufs -> stores -> m bufs Source #