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

Copyright(C) 2015, 2016 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.

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

Create a shader stage from a String representation of its source code and its type.

Note: on some hardware and backends, tessellation shaders aren’t available. That function throws UnsupportedStage error in such cases.

Error handling

data 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.

'UnsupportedStage stage' occurs when you try to create a shader which type is not supported on the current hardware.

class HasStageError a where Source

Types that can handle StageError.