luminance-0.6.0.5: Type-safe, type-level and stateless graphics framework

Copyright(C) 2015 Dimitri Sabadie
LicenseBSD3
MaintainerDimitri Sabadie <dimitri.sabadie@gmail.com>
Stabilityexperimental
Portabilityportable
Safe HaskellNone
LanguageHaskell2010

Graphics.Luminance.Shader.Stage

Contents

Description

 

Synopsis

Shader stage creation

data Stage Source

A shader Stage.

createTessCtrlShader :: (HasStageError e, MonadError e m, MonadIO m, MonadResource m) => String -> m Stage Source

Create a new tessellation control shader from a String representation of its source code.

createTessEvalShader :: (HasStageError e, MonadError e m, MonadIO m, MonadResource m) => String -> m Stage Source

Create a new tessellation evaluation shader from a String representation of its source code.

createVertexShader :: (HasStageError e, MonadError e m, MonadIO m, MonadResource m) => String -> m Stage Source

Create a new vertex shader from a String representation of its source code.

createGeometryShader :: (HasStageError e, MonadError e m, MonadIO m, MonadResource m) => String -> m Stage Source

Create a new geometry shader from a String representation of its source code.

createFragmentShader :: (HasStageError e, MonadError e m, MonadIO m, MonadResource m) => String -> m Stage Source

Create a new fragment shader from a String representation of its source code.

createComputeShader :: (HasStageError e, MonadError e m, MonadIO m, MonadResource m) => String -> m Stage Source

Create a new compute shader from a String representation of its source code.

Error handling

newtype StageError Source

Error type of shaders.

'CompilationFailed reason' occurs when a shader fails to compile, and the String reason contains a description of the failure.

class HasStageError a where Source

Types that can handle StageError.