Portability | portable |
---|---|
Stability | stable |
Maintainer | [email protected] |
Graphics.Rendering.OpenGL.GL.Shaders
Contents
Description
This module corresponds to sections 2.15 (Vertex Shaders) and section 3.11 (Fragment Shaders) of the OpenGL 2.1 specs.
- class (Eq s, Ord s, Show s, ObjectName s) => Shader s
- data VertexShader
- data FragmentShader
- shaderDeleteStatus :: Shader s => s -> GettableStateVar Bool
- shaderSource :: Shader s => s -> StateVar [String]
- compileShader :: Shader s => s -> IO ()
- compileStatus :: Shader s => s -> GettableStateVar Bool
- shaderInfoLog :: Shader s => s -> GettableStateVar String
- data Program
- programDeleteStatus :: Program -> GettableStateVar Bool
- attachedShaders :: Program -> StateVar ([VertexShader], [FragmentShader])
- linkProgram :: Program -> IO ()
- linkStatus :: Program -> GettableStateVar Bool
- programInfoLog :: Program -> GettableStateVar String
- validateProgram :: Program -> IO ()
- validateStatus :: Program -> GettableStateVar Bool
- currentProgram :: StateVar (Maybe Program)
- attribLocation :: Program -> String -> StateVar AttribLocation
- data VariableType
- activeAttribs :: Program -> GettableStateVar [(GLint, VariableType, String)]
- data UniformLocation
- 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
- maxVertexTextureImageUnits :: GettableStateVar GLsizei
- maxTextureImageUnits :: GettableStateVar GLsizei
- maxCombinedTextureImageUnits :: GettableStateVar GLsizei
- maxTextureCoords :: GettableStateVar GLsizei
- maxVertexUniformComponents :: GettableStateVar GLsizei
- maxFragmentUniformComponents :: GettableStateVar GLsizei
- maxVertexAttribs :: GettableStateVar GLsizei
- maxVaryingFloats :: GettableStateVar GLsizei
Shader Objects
data VertexShader Source
data FragmentShader Source
shaderDeleteStatus :: Shader s => s -> GettableStateVar BoolSource
shaderSource :: Shader s => s -> StateVar [String]Source
compileShader :: Shader s => s -> IO ()Source
compileStatus :: Shader s => s -> GettableStateVar BoolSource
shaderInfoLog :: Shader s => s -> GettableStateVar StringSource
Program Objects
attachedShaders :: Program -> StateVar ([VertexShader], [FragmentShader])Source
linkProgram :: Program -> IO ()Source
validateProgram :: Program -> IO ()Source
Vertex attributes
data VariableType Source
Constructors
Instances
activeAttribs :: Program -> GettableStateVar [(GLint, VariableType, String)]Source
Uniform variables
data UniformLocation Source
Instances
activeUniforms :: Program -> GettableStateVar [(GLint, VariableType, String)]Source
Methods
uniform :: UniformLocation -> StateVar aSource
uniformv :: UniformLocation -> GLsizei -> Ptr a -> IO ()Source
Instances
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 Source
Instances
Implementation limits related to GLSL
maxVertexTextureImageUnits :: GettableStateVar GLsizeiSource
Contains the number of hardware units that can be used to access texture maps from the vertex processor. The minimum legal value is 0.
maxTextureImageUnits :: GettableStateVar GLsizeiSource
Contains the total number of hardware units that can be used to access texture maps from the fragment processor. The minimum legal value is 2.
maxCombinedTextureImageUnits :: GettableStateVar GLsizeiSource
Contains the total number of hardware units that can be used to access texture maps from the vertex processor and the fragment processor combined. Note: If the vertex shader and the fragment processing stage access the same texture image unit, then that counts as using two texture image units. The minimum legal value is 2.
maxTextureCoords :: GettableStateVar GLsizeiSource
Contains the number of texture coordinate sets that are available. The minimum legal value is 2.
maxVertexUniformComponents :: GettableStateVar GLsizeiSource
Contains the number of individual components (i.e., floating-point, integer or boolean values) that are available for vertex shader uniform variables. The minimum legal value is 512.
maxFragmentUniformComponents :: GettableStateVar GLsizeiSource
Contains the number of individual components (i.e., floating-point, integer or boolean values) that are available for fragment shader uniform variables. The minimum legal value is 64.
maxVertexAttribs :: GettableStateVar GLsizeiSource
Contains the number of active vertex attributes that are available. The minimum legal value is 16.
maxVaryingFloats :: GettableStateVar GLsizeiSource
Contains the number of individual floating-point values available for varying variables. The minimum legal value is 32.