Copyright | (C) 2015 Dimitri Sabadie |
---|---|
License | BSD3 |
Maintainer | Dimitri Sabadie <dimitri.sabadie@gmail.com> |
Stability | experimental |
Portability | portable |
Safe Haskell | None |
Language | Haskell2010 |
- data Stage
- stageID :: Stage -> GLuint
- createTessCtrlShader :: (HasStageError e, MonadError e m, MonadIO m, MonadResource m) => String -> m Stage
- createTessEvalShader :: (HasStageError e, MonadError e m, MonadIO m, MonadResource m) => String -> m Stage
- createVertexShader :: (HasStageError e, MonadError e m, MonadIO m, MonadResource m) => String -> m Stage
- createGeometryShader :: (HasStageError e, MonadError e m, MonadIO m, MonadResource m) => String -> m Stage
- createFragmentShader :: (HasStageError e, MonadError e m, MonadIO m, MonadResource m) => String -> m Stage
- createComputeShader :: (HasStageError e, MonadError e m, MonadIO m, MonadResource m) => String -> m Stage
- newtype StageError = CompilationFailed String
- class HasStageError a where
- fromStageError :: StageError -> a
Shader stage creation
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
.
fromStageError :: StageError -> a Source