OpenGL-2.2.1.1: A binding for the OpenGL graphics systemSource codeContentsIndex
Graphics.Rendering.OpenGL.GL.PerFragment
Portabilityportable
Stabilitystable
Maintainersven.panne@aedion.de
Contents
Scissor Test
Multisample Fragment Operations
Depth Bounds Test
Alpha Test
Stencil Test
Depth Buffer Test
Occlusion Queries
Blending
Dithering
Logical Operation
Description
This module corresponds to section 4.1 (Per-Fragment Operations) of the OpenGL 2.1 specs.
Synopsis
scissor :: StateVar (Maybe (Position, Size))
sampleAlphaToCoverage :: StateVar Capability
sampleAlphaToOne :: StateVar Capability
sampleCoverage :: StateVar (Maybe (GLclampf, Bool))
depthBounds :: StateVar (Maybe (GLclampd, GLclampd))
data ComparisonFunction
= Never
| Less
| Equal
| Lequal
| Greater
| Notequal
| Gequal
| Always
alphaFunc :: StateVar (Maybe (ComparisonFunction, GLclampf))
stencilTest :: StateVar Capability
stencilFunc :: StateVar (ComparisonFunction, GLint, GLuint)
stencilFuncSeparate :: Face -> SettableStateVar (ComparisonFunction, GLint, GLuint)
data StencilOp
= OpZero
| OpKeep
| OpReplace
| OpIncr
| OpIncrWrap
| OpDecr
| OpDecrWrap
| OpInvert
stencilOp :: StateVar (StencilOp, StencilOp, StencilOp)
stencilOpSeparate :: Face -> SettableStateVar (StencilOp, StencilOp, StencilOp)
activeStencilFace :: StateVar (Maybe Face)
depthFunc :: StateVar (Maybe ComparisonFunction)
newtype QueryObject = QueryObject GLuint
data QueryTarget = SamplesPassed
withQuery :: QueryTarget -> QueryObject -> IO a -> IO a
queryCounterBits :: QueryTarget -> GettableStateVar GLsizei
currentQuery :: QueryTarget -> GettableStateVar (Maybe QueryObject)
queryResult :: QueryObject -> GettableStateVar GLuint
queryResultAvailable :: QueryObject -> GettableStateVar Bool
blend :: StateVar Capability
data BlendEquation
= FuncAdd
| FuncSubtract
| FuncReverseSubtract
| Min
| Max
| LogicOp
blendEquation :: StateVar BlendEquation
blendEquationSeparate :: StateVar (BlendEquation, BlendEquation)
data BlendingFactor
= Zero
| One
| SrcColor
| OneMinusSrcColor
| DstColor
| OneMinusDstColor
| SrcAlpha
| OneMinusSrcAlpha
| DstAlpha
| OneMinusDstAlpha
| ConstantColor
| OneMinusConstantColor
| ConstantAlpha
| OneMinusConstantAlpha
| SrcAlphaSaturate
blendFuncSeparate :: StateVar ((BlendingFactor, BlendingFactor), (BlendingFactor, BlendingFactor))
blendFunc :: StateVar (BlendingFactor, BlendingFactor)
blendColor :: StateVar (Color4 GLclampf)
dither :: StateVar Capability
data LogicOp
= Clear
| And
| AndReverse
| Copy
| AndInverted
| Noop
| Xor
| Or
| Nor
| Equiv
| Invert
| OrReverse
| CopyInverted
| OrInverted
| Nand
| Set
logicOp :: StateVar (Maybe LogicOp)
Scissor Test
scissor :: StateVar (Maybe (Position, Size))Source
Multisample Fragment Operations
sampleAlphaToCoverage :: StateVar CapabilitySource
sampleAlphaToOne :: StateVar CapabilitySource
sampleCoverage :: StateVar (Maybe (GLclampf, Bool))Source
Depth Bounds Test
depthBounds :: StateVar (Maybe (GLclampd, GLclampd))Source
Alpha Test
data ComparisonFunction Source
Constructors
Never
Less
Equal
Lequal
Greater
Notequal
Gequal
Always
show/hide Instances
alphaFunc :: StateVar (Maybe (ComparisonFunction, GLclampf))Source
Stencil Test
stencilTest :: StateVar CapabilitySource
stencilFunc :: StateVar (ComparisonFunction, GLint, GLuint)Source
stencilFuncSeparate :: Face -> SettableStateVar (ComparisonFunction, GLint, GLuint)Source
data StencilOp Source
Constructors
OpZero
OpKeep
OpReplace
OpIncr
OpIncrWrap
OpDecr
OpDecrWrap
OpInvert
show/hide Instances
stencilOp :: StateVar (StencilOp, StencilOp, StencilOp)Source
stencilOpSeparate :: Face -> SettableStateVar (StencilOp, StencilOp, StencilOp)Source
activeStencilFace :: StateVar (Maybe Face)Source
Depth Buffer Test
depthFunc :: StateVar (Maybe ComparisonFunction)Source
Occlusion Queries
newtype QueryObject Source
Constructors
QueryObject GLuint
show/hide Instances
data QueryTarget Source
Constructors
SamplesPassed
show/hide Instances
withQuery :: QueryTarget -> QueryObject -> IO a -> IO aSource
queryCounterBits :: QueryTarget -> GettableStateVar GLsizeiSource
currentQuery :: QueryTarget -> GettableStateVar (Maybe QueryObject)Source
queryResult :: QueryObject -> GettableStateVar GLuintSource
queryResultAvailable :: QueryObject -> GettableStateVar BoolSource
Blending
blend :: StateVar CapabilitySource
data BlendEquation Source
Constructors
FuncAdd
FuncSubtract
FuncReverseSubtract
Min
Max
LogicOp
show/hide Instances
blendEquation :: StateVar BlendEquationSource
blendEquationSeparate :: StateVar (BlendEquation, BlendEquation)Source
data BlendingFactor Source
Constructors
Zero
One
SrcColor
OneMinusSrcColor
DstColor
OneMinusDstColor
SrcAlpha
OneMinusSrcAlpha
DstAlpha
OneMinusDstAlpha
ConstantColor
OneMinusConstantColor
ConstantAlpha
OneMinusConstantAlpha
SrcAlphaSaturate
show/hide Instances
blendFuncSeparate :: StateVar ((BlendingFactor, BlendingFactor), (BlendingFactor, BlendingFactor))Source
blendFunc :: StateVar (BlendingFactor, BlendingFactor)Source
blendColor :: StateVar (Color4 GLclampf)Source
Dithering
dither :: StateVar CapabilitySource
Logical Operation
data LogicOp Source
Constructors
Clear
And
AndReverse
Copy
AndInverted
Noop
Xor
Or
Nor
Equiv
Invert
OrReverse
CopyInverted
OrInverted
Nand
Set
show/hide Instances
logicOp :: StateVar (Maybe LogicOp)Source
Produced by Haddock version 0.9