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

Contents

- Uniform variables

Description

This module contains functions related to shader uniforms, this corresponds to section 2.20.3 of the OpenGL 3.1 spec (Shader Variables).

Synopsis

- newtype UniformLocation = UniformLocation GLint
- uniformLocation :: Program -> String -> GettableStateVar UniformLocation
- activeUniforms :: Program -> GettableStateVar [(GLint, VariableType, String)]
- class Uniform a where
  - uniform :: UniformLocation -> StateVar a
  - uniformv :: UniformLocation -> GLsizei -> Ptr a -> IO ()
- class Storable a => UniformComponent a

# Uniform variables

newtype UniformLocation

Constructors

UniformLocation GLint |

Instances

Eq UniformLocation |
Ord UniformLocation |
Show UniformLocation |

uniformLocation :: Program -> String -> GettableStateVar UniformLocation

activeUniforms :: Program -> GettableStateVar [(GLint, VariableType, String)]

class Uniform a where

Methods

uniform :: UniformLocation -> StateVar a

uniformv :: UniformLocation -> GLsizei -> Ptr a -> IO ()

Instances

Uniform TextureUnit |
UniformComponent a => Uniform (Index1 a) |
UniformComponent a => Uniform (Color4 a) |
UniformComponent a => Uniform (Color3 a) |
UniformComponent a => Uniform (FogCoord1 a) |
UniformComponent a => Uniform (Normal3 a) |
UniformComponent a => Uniform (TexCoord4 a) |
UniformComponent a => Uniform (TexCoord3 a) |
UniformComponent a => Uniform (TexCoord2 a) |
UniformComponent a => Uniform (TexCoord1 a) |
UniformComponent a => Uniform (Vertex4 a) |
UniformComponent a => Uniform (Vertex3 a) |
UniformComponent a => Uniform (Vertex2 a) |

class Storable a => UniformComponent a

Minimal complete definition

uniform1, uniform2, uniform3, uniform4, getUniform, uniform1v, uniform2v, uniform3v, uniform4v

Instances

UniformComponent GLint |
UniformComponent GLuint |
UniformComponent GLfloat |