StencilOp

From MCS Wiki AVR
Jump to: navigation, search

Contents

Action

Set stencil test actions.

 

 

 

Syntax

StencilOp sfail, spass

 

 

Remarks

sfail

Specifies the action to take when the stencil test fails, one of KEEPZEROREPLACEINCRDECR and INVERT. The initial value is KEEP

spass

Specifies the action to take when the stencil test passes, one of the same constants as sfail.

The initial value is KEEP

 

The stencil operation specifies how the stencil buffer is updated. The operation selected depends on whether the stencil test

passes or not.

 

 

See also

StencilFuncStencilMask

 

 

Example

' Pseudocode
 
' Draw two points, incrementing stencil at each pixel, then draw the pixels with value 2 in red
StencilOp INCR, INCR
PointSize 760
Begin_G POINTS
Vertex2II 50, 60, 0, 0
Vertex2II 110, 60, 0, 0
StencilFunc EQUAL, 2, 255
ColorRGB 100, 0, 0
Vertex2II 80, 60, 0, 0
clip0085.png

Languages   English  
Personal tools
Namespaces
Variants
Actions
Navigation
Language