Copyright | (c) Anton Gushcha, 2016 |
---|---|
License | BSD3 |
Maintainer | ncrashed@gmail.com |
Stability | experimental |
Portability | POSIX |
Safe Haskell | None |
Language | Haskell2010 |
- class (MonadIO m, MonadThrow m) => MonadLambdaCube m where
- data LambdaCubeException
Documentation
class (MonadIO m, MonadThrow m) => MonadLambdaCube m where Source #
Low level monadic API for module.
lambdacubeUpdateSize, lambdacubeAddPipeline, lambdacubeDeletePipeline, lambdacubeCreateStorage, lambdacubeDeleteStorage, lambdacubeGetStorage, lambdacubeRenderStorageLast, lambdacubeRenderStorageFirst, lambdacubeStopRendering
lambdacubeUpdateSize :: Word -> Word -> m () Source #
Update viewport size for rendering engine Should be called when window size is changed (or every frame)
lambdacubeAddPipeline :: [FilePath] -> String -> PipelineId -> Writer PipelineSchema a -> m () Source #
Compile and register new pipeline.
Throws: PipeLineCompileFailed
or PipeLineAlreadyRegistered
when failed.
lambdacubeDeletePipeline :: PipelineId -> m () Source #
Removes pipeline from engine, deallocates all storages for rendering storages
Note: if pipeline with the name doesn't exists, do nothing.
lambdacubeCreateStorage :: PipelineId -> m (StorageId, GLStorage) Source #
Creates new storage (corresponding to one game object)
Note: if pipeline not found, throws PipeLineNotFound
lambdacubeDeleteStorage :: StorageId -> m () Source #
Removes storage for pipeline, deallocates it
Note: if storage with the id doesn't exists, do nothing
lambdacubeGetStorage :: StorageId -> m GLStorage Source #
Getting storage by ID
Throws StorageNotFound
if no storage found
lambdacubeRenderStorageLast :: StorageId -> m () Source #
Adds storage to rendering queue
lambdacubeRenderStorageFirst :: StorageId -> m () Source #
Adds storage to rendering queue
lambdacubeStopRendering :: StorageId -> m () Source #
Removes storage from rendering queue
(MonadIO (mt m), MonadThrow (mt m), MonadLambdaCube m, MonadTrans mt) => MonadLambdaCube (mt m) Source # | |
(MonadIO m, MonadThrow m) => MonadLambdaCube (LambdaCubeT s m) Source # | |
data LambdaCubeException Source #
Exception type that could be thrown by the module
PipeLineCompileFailed String PipelineId String | Thrown when a pipeline compilation failed, first is pipeline main module, last is error message |
PipeLineAlreadyRegistered PipelineId | Thrown when tries to register the same pipeline twice |
PipeLineNotFound PipelineId | Trhown when tries to create storage for unregistered pipeline |
StorageNotFound StorageId | Thrown when tries to get unregistered storage |
PipeLineIncompatible StorageId String | Thrown when failed to bind pipeline to context, contains pipeline name and error message |