OpenGL-3.0.3.0: A binding for the OpenGL graphics system

Copyright | (c) Sven Panne 2006-2019
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 Source #

data ShaderType Source #

Constructors

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

#### Instances

Instances details

Show ShaderType Source # |
Instance details Defined in Graphics.Rendering.OpenGL.GL.Shaders.ShaderObjects Methods showsPrec :: Int -> ShaderType -> ShowS Source # show :: ShaderType -> String Source # showList :: [ShaderType] -> ShowS Source #
Eq ShaderType Source # |
Instance details Defined in Graphics.Rendering.OpenGL.GL.Shaders.ShaderObjects Methods (==) :: ShaderType -> ShaderType -> Bool Source # (/=) :: ShaderType -> ShaderType -> Bool Source #
Ord ShaderType Source # |

Instance details

Defined in Graphics.Rendering.OpenGL.GL.Shaders.ShaderObjects

Methods

compare :: ShaderType -> ShaderType -> Ordering Source #

(<) :: ShaderType -> ShaderType -> Bool Source #

(<=) :: ShaderType -> ShaderType -> Bool Source #

(>) :: ShaderType -> ShaderType -> Bool Source #

(>=) :: ShaderType -> ShaderType -> Bool Source #

max :: ShaderType -> ShaderType -> ShaderType Source #

min :: ShaderType -> ShaderType -> ShaderType Source #

data Shader Source #

#### Instances

Instances details

ObjectName Shader Source # |
Instance details Defined in Graphics.Rendering.OpenGL.GL.Shaders.Shader Methods isObjectName :: MonadIO m => Shader -> m Bool Source # deleteObjectName :: MonadIO m => Shader -> m () Source # deleteObjectNames :: MonadIO m => [Shader] -> m () Source #
CanBeLabeled Shader Source # |
Instance details Defined in Graphics.Rendering.OpenGL.GL.Shaders.Shader Methods objectLabel :: Shader -> StateVar (Maybe String) Source #
Show Shader Source # |
Instance details Defined in Graphics.Rendering.OpenGL.GL.Shaders.Shader Methods showsPrec :: Int -> Shader -> ShowS Source # show :: Shader -> String Source # showList :: [Shader] -> ShowS Source #
Eq Shader Source # |
Instance details Defined in Graphics.Rendering.OpenGL.GL.Shaders.Shader Methods (==) :: Shader -> Shader -> Bool Source # (/=) :: Shader -> Shader -> Bool Source #
Ord Shader Source # |
Instance details Defined in Graphics.Rendering.OpenGL.GL.Shaders.Shader Methods compare :: Shader -> Shader -> Ordering Source # (<) :: Shader -> Shader -> Bool Source # (<=) :: Shader -> Shader -> Bool Source # (>) :: Shader -> Shader -> Bool Source # (>=) :: Shader -> Shader -> Bool Source # max :: Shader -> Shader -> Shader Source # min :: Shader -> Shader -> Shader Source #

createShader :: ShaderType -> IO Shader Source #

shaderSourceBS :: Shader -> StateVar ByteString Source #

UTF8 encoded.

shaderSource :: Shader -> StateVar [String] Source #

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

compileShader :: Shader -> IO () Source #

releaseShaderCompiler :: IO () Source #

# Shader Queries

shaderType :: Shader -> GettableStateVar ShaderType Source #

shaderDeleteStatus :: Shader -> GettableStateVar Bool Source #

compileStatus :: Shader -> GettableStateVar Bool Source #

shaderInfoLog :: Shader -> GettableStateVar String Source #

data PrecisionType Source #

#### Instances

Instances details

Show PrecisionType Source # |
Instance details Defined in Graphics.Rendering.OpenGL.GL.Shaders.ShaderObjects Methods showsPrec :: Int -> PrecisionType -> ShowS Source # show :: PrecisionType -> String Source # showList :: [PrecisionType] -> ShowS Source #
Eq PrecisionType Source # |
Instance details Defined in Graphics.Rendering.OpenGL.GL.Shaders.ShaderObjects Methods (==) :: PrecisionType -> PrecisionType -> Bool Source # (/=) :: PrecisionType -> PrecisionType -> Bool Source #
Ord PrecisionType Source # |

Instance details

Defined in Graphics.Rendering.OpenGL.GL.Shaders.ShaderObjects

Methods

compare :: PrecisionType -> PrecisionType -> Ordering Source #

(<) :: PrecisionType -> PrecisionType -> Bool Source #

(<=) :: PrecisionType -> PrecisionType -> Bool Source #

(>) :: PrecisionType -> PrecisionType -> Bool Source #

(>=) :: PrecisionType -> PrecisionType -> Bool Source #

max :: PrecisionType -> PrecisionType -> PrecisionType Source #

min :: PrecisionType -> PrecisionType -> PrecisionType Source #

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

# Bytestring utilities

packUtf8 :: String -> ByteString Source #

unpackUtf8 :: ByteString -> String Source #