caramia-0.7.2.2: High-level OpenGL bindings

Safe HaskellNone
LanguageHaskell2010

Graphics.Caramia.Render.Internal

Synopsis

Documentation

data ComparisonFunc Source

A comparison function. Incoming value is compared with this function to the existing value.

This can be used with depth and stencil tests.

See glDepthFunc from OpenGL specification or man pages for more detailed explanation.

data StencilOp Source

Stencil buffer operations.

See glStencilOp for explanations of each constructor.

Constructors

Keep 
Zero 
Replace

This one replaces the old value in the stencil buffer with the given reference value and ANDs the result with mask.

Increment 
IncrementAndWrap 
Decrease 
DecreaseAndWrap 
Invert 

withCulling :: (MonadIO m, MonadMask m) => Culling -> m a -> m a Source

data Culling Source

Constructors

Back 
Front 
FrontAndBack

This stops the drawing of any faces but points and lines (or other non-facey like primitives) are drawn.

NoCulling 

data FragmentPassTests Source

Specifies the tests that are run on a fragment to decide if it should be seen.

Constructors

FragmentPassTests 

Fields

depthTest :: !(Maybe ComparisonFunc)

Which depth test to use, if any?

writeDepth :: Bool

If depth test is specified, should we also update the depth buffer with new depth values? The depth buffer will not be written if depthTest is not specified regardless of the value in this field.

stencilTest :: !(Maybe ComparisonFunc)

Which stencil test to use, if any?

stencilReference :: !Word32
 
stencilMask :: !Word32
 
failStencilOp :: !StencilOp

What to do with the stencil buffer if stencil test fails.

depthFailStencilOp :: !StencilOp

What to do with the stencil buffer if stencil test passes but depth testing fails).

depthPassStencilOp :: !StencilOp

What to do with the stencil buffer if stencil and depth test passes, or if depth buffer is not present or depth test is disabled.

cullFace :: !Culling

What kind of face culling should we do.

defaultFragmentPassTests :: FragmentPassTests Source

Returns the default fragment pass tests.

Neither depth or stencil test is enabled. writeDepth is set to true but that value is only used if you specify with depth test to use.

All stencil operations are set to Keep.

Culling is set to Back.