OpenGL-2.2.1.1: A binding for the OpenGL graphics systemSource codeContentsIndex
Graphics.Rendering.OpenGL.GL.Colors
Portabilityportable
Stabilitystable
Maintainersven.panne@aedion.de
Contents
Lighting
Lighting Parameter Specification
ColorMaterial
Flatshading
Description
This module corresponds to section 2.14 (Colors and Coloring) of the OpenGL 2.1 specs.
Synopsis
lighting :: StateVar Capability
newtype Light = Light GLsizei
light :: Light -> StateVar Capability
maxLights :: GettableStateVar GLsizei
data FrontFaceDirection
= CW
| CCW
frontFace :: StateVar FrontFaceDirection
data Face
= Front
| Back
| FrontAndBack
materialAmbient :: Face -> StateVar (Color4 GLfloat)
materialDiffuse :: Face -> StateVar (Color4 GLfloat)
materialAmbientAndDiffuse :: Face -> StateVar (Color4 GLfloat)
materialSpecular :: Face -> StateVar (Color4 GLfloat)
materialEmission :: Face -> StateVar (Color4 GLfloat)
materialShininess :: Face -> StateVar GLfloat
maxShininess :: GettableStateVar GLfloat
materialColorIndexes :: Face -> StateVar (Index1 GLint, Index1 GLint, Index1 GLint)
ambient :: Light -> StateVar (Color4 GLfloat)
diffuse :: Light -> StateVar (Color4 GLfloat)
specular :: Light -> StateVar (Color4 GLfloat)
position :: Light -> StateVar (Vertex4 GLfloat)
spotDirection :: Light -> StateVar (Normal3 GLfloat)
spotExponent :: Light -> StateVar GLfloat
maxSpotExponent :: GettableStateVar GLfloat
spotCutoff :: Light -> StateVar GLfloat
attenuation :: Light -> StateVar (GLfloat, GLfloat, GLfloat)
lightModelAmbient :: StateVar (Color4 GLfloat)
lightModelLocalViewer :: StateVar Capability
lightModelTwoSide :: StateVar Capability
vertexProgramTwoSide :: StateVar Capability
data LightModelColorControl
= SingleColor
| SeparateSpecularColor
lightModelColorControl :: StateVar LightModelColorControl
data ColorMaterialParameter
= Ambient
| Diffuse
| Specular
| Emission
| AmbientAndDiffuse
colorMaterial :: StateVar (Maybe (Face, ColorMaterialParameter))
data ShadingModel
= Flat
| Smooth
shadeModel :: StateVar ShadingModel
Lighting
lighting :: StateVar CapabilitySource
newtype Light Source
Constructors
Light GLsizei
show/hide Instances
light :: Light -> StateVar CapabilitySource
maxLights :: GettableStateVar GLsizeiSource
data FrontFaceDirection Source
Constructors
CW
CCW
show/hide Instances
frontFace :: StateVar FrontFaceDirectionSource
Lighting Parameter Specification
data Face Source
Constructors
Front
Back
FrontAndBack
show/hide Instances
materialAmbient :: Face -> StateVar (Color4 GLfloat)Source
materialDiffuse :: Face -> StateVar (Color4 GLfloat)Source
materialAmbientAndDiffuse :: Face -> StateVar (Color4 GLfloat)Source
materialSpecular :: Face -> StateVar (Color4 GLfloat)Source
materialEmission :: Face -> StateVar (Color4 GLfloat)Source
materialShininess :: Face -> StateVar GLfloatSource
maxShininess :: GettableStateVar GLfloatSource
materialColorIndexes :: Face -> StateVar (Index1 GLint, Index1 GLint, Index1 GLint)Source
ambient :: Light -> StateVar (Color4 GLfloat)Source
diffuse :: Light -> StateVar (Color4 GLfloat)Source
specular :: Light -> StateVar (Color4 GLfloat)Source
position :: Light -> StateVar (Vertex4 GLfloat)Source
spotDirection :: Light -> StateVar (Normal3 GLfloat)Source
spotExponent :: Light -> StateVar GLfloatSource
maxSpotExponent :: GettableStateVar GLfloatSource
spotCutoff :: Light -> StateVar GLfloatSource
attenuation :: Light -> StateVar (GLfloat, GLfloat, GLfloat)Source
lightModelAmbient :: StateVar (Color4 GLfloat)Source
lightModelLocalViewer :: StateVar CapabilitySource
lightModelTwoSide :: StateVar CapabilitySource
vertexProgramTwoSide :: StateVar CapabilitySource
data LightModelColorControl Source
Constructors
SingleColor
SeparateSpecularColor
show/hide Instances
lightModelColorControl :: StateVar LightModelColorControlSource
ColorMaterial
data ColorMaterialParameter Source
Constructors
Ambient
Diffuse
Specular
Emission
AmbientAndDiffuse
show/hide Instances
colorMaterial :: StateVar (Maybe (Face, ColorMaterialParameter))Source
Flatshading
data ShadingModel Source
Constructors
Flat
Smooth
show/hide Instances
shadeModel :: StateVar ShadingModelSource
Produced by Haddock version 0.9