Safe Haskell | None |
---|---|
Language | Haskell2010 |
Graphics.GPipe.Internal.Uniform
Synopsis
- class BufferFormat a => UniformInput a where
- type UniformFormat a x
- toUniform :: ToUniform x a (UniformFormat a x)
- getUniform :: forall os s b x. UniformInput b => (s -> (Buffer os (Uniform b), Int)) -> Shader os s (UniformFormat b x)
- buildUDecl :: OffsetToSType -> GlobDeclM ()
- type OffsetToSType = IntMap SType
- newtype ToUniform x a b = ToUniform (Kleisli (WriterT OffsetToSType (Reader (Int -> ExprM String))) a b)
- makeUniform :: SType -> ToUniform x (B a) (S x b)
Documentation
class BufferFormat a => UniformInput a where Source #
This class constraints which buffer types can be loaded as uniforms, and what type those values have.
Associated Types
type UniformFormat a x Source #
Methods
toUniform :: ToUniform x a (UniformFormat a x) Source #
An arrow action that turns a value from it's buffer representation to it's vertex or fragment representation. Use toUniform
from
the GPipe provided instances to operate in this arrow. Also note that this arrow needs to be able to return a value
lazily, so ensure you use
proc ~pattern -> do ...
.
Instances
getUniform :: forall os s b x. UniformInput b => (s -> (Buffer os (Uniform b), Int)) -> Shader os s (UniformFormat b x) Source #
buildUDecl :: OffsetToSType -> GlobDeclM () Source #
type OffsetToSType = IntMap SType Source #
newtype ToUniform x a b Source #
The arrow type for toUniform
.
Instances
Arrow (ToUniform x) Source # | |
Defined in Graphics.GPipe.Internal.Uniform Methods arr :: (b -> c) -> ToUniform x b c # first :: ToUniform x b c -> ToUniform x (b, d) (c, d) # second :: ToUniform x b c -> ToUniform x (d, b) (d, c) # (***) :: ToUniform x b c -> ToUniform x b' c' -> ToUniform x (b, b') (c, c') # (&&&) :: ToUniform x b c -> ToUniform x b c' -> ToUniform x b (c, c') # | |
Category (ToUniform x :: Type -> Type -> Type) Source # | |