gore-and-ash-lambdacube-0.2.0.0: Core module for Gore&Ash engine that do something.

Copyright(c) Anton Gushcha, 2016
LicenseBSD3
Maintainerncrashed@gmail.com
Stabilityexperimental
PortabilityPOSIX
Safe HaskellNone
LanguageHaskell2010

Game.GoreAndAsh.LambdaCube.State

Contents

Description

 

Synopsis

Documentation

data LambdaCubeState s Source #

Internal state of core module

s
- state of next module, they are chained until bottom, that is usually an empty data type.

Constructors

LambdaCubeState 

Fields

Instances

Generic (LambdaCubeState s) Source # 

Associated Types

type Rep (LambdaCubeState s) :: * -> * #

NFData s => NFData (LambdaCubeState s) Source # 

Methods

rnf :: LambdaCubeState s -> () #

Monad m => MonadState (LambdaCubeState s) (LambdaCubeT s m) 
type Rep (LambdaCubeState s) Source # 

type PipelineId = Text Source #

ID to uniquely identify LambdaCube rednering pipeline

data StorageId Source #

ID to uniquely identify LambdaCube storage

Constructors

StorageId 

Instances

Eq StorageId Source # 
Show StorageId Source # 
Generic StorageId Source # 

Associated Types

type Rep StorageId :: * -> * #

NFData StorageId Source # 

Methods

rnf :: StorageId -> () #

Hashable StorageId Source # 
type Rep StorageId Source # 
type Rep StorageId = D1 (MetaData "StorageId" "Game.GoreAndAsh.LambdaCube.State" "gore-and-ash-lambdacube-0.2.0.0-5EhXRpUDsTL23dfGCQjBPt" False) (C1 (MetaCons "StorageId" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "storageId") NoSourceUnpackedness SourceStrict DecidedUnpack) (Rec0 Int)) (S1 (MetaSel (Just Symbol "storageScheme") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 PipelineId))))

data LambdaCubeException Source #

Exception type that could be thrown by the module

Constructors

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

Instances

Show LambdaCubeException Source # 
Generic LambdaCubeException Source # 
Exception LambdaCubeException Source # 
type Rep LambdaCubeException Source # 

emptyLambdaCubeState :: s -> LambdaCubeState s Source #

Create inital state of the core module

s
- state of next module

freeLambdaCubeState :: LambdaCubeState s -> IO () Source #

Release module state resources

Internal API

updateStateViewportSize :: Word -> Word -> LambdaCubeState s -> IO () Source #

Update viewport size of all storages

isPipelineRegisteredInternal :: PipelineId -> LambdaCubeState s -> Bool Source #

Returns True if given pipeline is already exists

registerPipelineInternal :: PipelineId -> Pipeline -> PipelineSchema -> GLRenderer -> LambdaCubeState s -> LambdaCubeState s Source #

Register new pipeline with renderer in module

unregisterPipelineInternal :: PipelineId -> LambdaCubeState s -> IO (LambdaCubeState s) Source #

Removes pipeline from state and deletes it, also destroys all storages of the pipeline

getPipelineSchemeInternal :: PipelineId -> LambdaCubeState s -> Maybe PipelineSchema Source #

Getter of pipeline scheme

registerStorageInternal :: PipelineId -> GLStorage -> LambdaCubeState s -> (StorageId, LambdaCubeState s) Source #

Registering gl storage for given pipeline

unregisterStorageInternal :: StorageId -> LambdaCubeState s -> IO (LambdaCubeState s) Source #

Remove and deallocate storage

getStorageInternal :: StorageId -> LambdaCubeState s -> Maybe GLStorage Source #

Find storage in state

renderStorageLastInternal :: StorageId -> LambdaCubeState s -> LambdaCubeState s Source #

Puts storage at end of rendering queue

renderStorageFirstInternal :: StorageId -> LambdaCubeState s -> LambdaCubeState s Source #

Puts storage at begining of rendering queue

stopRenderingInternal :: StorageId -> LambdaCubeState s -> LambdaCubeState s Source #

Removes storage from rendering queue

Orphan instances

NFData Pipeline Source # 

Methods

rnf :: Pipeline -> () #

NFData PipelineSchema Source # 

Methods

rnf :: PipelineSchema -> () #

NFData GLStorage Source # 

Methods

rnf :: GLStorage -> () #

NFData GLRenderer Source # 

Methods

rnf :: GLRenderer -> () #