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

Contents

- Program Objects
- Fragment Data

Description

This module corresponds to section 7.3 (Program Objects) of the OpenGL 4.4 spec.

Synopsis

- data Program
- createProgram :: IO Program
- programDeleteStatus :: Program -> GettableStateVar Bool
- attachShader :: Program -> Shader -> IO ()
- detachShader :: Program -> Shader -> IO ()
- attachedShaders :: Program -> StateVar [Shader]
- linkProgram :: Program -> IO ()
- linkStatus :: Program -> GettableStateVar Bool
- validateProgram :: Program -> IO ()
- validateStatus :: Program -> GettableStateVar Bool
- programInfoLog :: Program -> GettableStateVar String
- currentProgram :: StateVar (Maybe Program)
- programSeparable :: Program -> StateVar Bool
- programBinaryRetrievableHint :: Program -> StateVar Bool
- bindFragDataLocation :: Program -> String -> SettableStateVar DrawBufferIndex
- getFragDataLocation :: Program -> String -> IO (Maybe DrawBufferIndex)

# Program Objects

data Program Source #

#### Instances

Instances details

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

createProgram :: IO Program Source #

programDeleteStatus :: Program -> GettableStateVar Bool Source #

attachShader :: Program -> Shader -> IO () Source #

detachShader :: Program -> Shader -> IO () Source #

attachedShaders :: Program -> StateVar [Shader] Source #

linkProgram :: Program -> IO () Source #

linkStatus :: Program -> GettableStateVar Bool Source #

validateProgram :: Program -> IO () Source #

validateStatus :: Program -> GettableStateVar Bool Source #

programInfoLog :: Program -> GettableStateVar String Source #

currentProgram :: StateVar (Maybe Program) Source #

programSeparable :: Program -> StateVar Bool Source #

programBinaryRetrievableHint :: Program -> StateVar Bool Source #

# Fragment Data

bindFragDataLocation :: Program -> String -> SettableStateVar DrawBufferIndex Source #

`bindFragDataLocation` binds a varying variable, specified by program and name, to a drawbuffer. The effects only take place after succesfull linking of the program. invalid arguments and conditions are - an index larger than maxDrawBufferIndex - names starting with `gl_` linking failure will ocure when - one of the arguments was invalid - more than one varying varuable name is bound to the same index It's not an error to specify unused variables, those will be ingored.

getFragDataLocation :: Program -> String -> IO (Maybe DrawBufferIndex) Source #

query the binding of a given variable, specified by program and name. The program has to be linked. The result is Nothing if an error occures or the name is not a name of a varying variable. If the program hasn't been linked an `InvalidOperation` error is generated.