OpenGL-2.13.1.0: A binding for the OpenGL graphics system

Copyright | (c) Sven Panne 2006-2013
License | BSD3
Maintainer | Sven Panne <svenpanne@gmail.com>
Stability | stable
Portability | portable
Safe Haskell | None
Language | Haskell2010

Graphics.Rendering.OpenGL.GL.Shaders.ShaderObjects

Contents

- Shader Objects
- Shader Queries
- Bytestring utilities

Description

This module corresponds to section 7.1 (Shader Objects) and 7.13 (Shader, Program, and Program Pipeline Queries) of the OpenGL 4.4 spec.

Synopsis

- shaderCompiler :: GettableStateVar Bool
- data ShaderType
  - = VertexShader
  - | TessControlShader
  - | TessEvaluationShader
  - | GeometryShader
  - | FragmentShader
  - | ComputeShader
- data Shader
- createShader :: ShaderType -> IO Shader
- shaderSourceBS :: Shader -> StateVar ByteString
- shaderSource :: Shader -> StateVar [String]
- compileShader :: Shader -> IO ()
- releaseShaderCompiler :: IO ()
- shaderType :: Shader -> GettableStateVar ShaderType
- shaderDeleteStatus :: Shader -> GettableStateVar Bool
- compileStatus :: Shader -> GettableStateVar Bool
- shaderInfoLog :: Shader -> GettableStateVar String
- data PrecisionType
- shaderPrecisionFormat :: ShaderType -> PrecisionType -> GettableStateVar ((GLint, GLint), GLint)
- packUtf8 :: String -> ByteString
- unpackUtf8 :: ByteString -> String

# Shader Objects

shaderCompiler :: GettableStateVar Bool

data ShaderType

Constructors

VertexShader |
TessControlShader |
TessEvaluationShader |
GeometryShader |
FragmentShader |
ComputeShader |

Instances

Eq ShaderType |
Ord ShaderType |
Show ShaderType |

data Shader

Instances

Eq Shader |
Ord Shader |
Show Shader |
ObjectName Shader |
CanBeLabeled Shader |

createShader :: ShaderType -> IO Shader

shaderSourceBS :: Shader -> StateVar ByteString

UTF8 encoded.

shaderSource :: Shader -> StateVar [String]

Deprecated: Use a combination of `shaderSourceBS` and `packUtf8` or `unpackUtf8` instead.

compileShader :: Shader -> IO ()

releaseShaderCompiler :: IO ()

# Shader Queries

shaderType :: Shader -> GettableStateVar ShaderType

shaderDeleteStatus :: Shader -> GettableStateVar Bool

compileStatus :: Shader -> GettableStateVar Bool

shaderInfoLog :: Shader -> GettableStateVar String

data PrecisionType

Instances

Eq PrecisionType |
Ord PrecisionType |
Show PrecisionType |

shaderPrecisionFormat :: ShaderType -> PrecisionType -> GettableStateVar ((GLint, GLint), GLint)

# Bytestring utilities

packUtf8 :: String -> ByteString

unpackUtf8 :: ByteString -> String