Difference between revisions of "Sprite:setStencilOperation"

From GiderosMobile
Line 2: Line 2:
 
'''Available since:''' Gideros 2017.6<br/>
 
'''Available since:''' Gideros 2017.6<br/>
 
=== Description ===
 
=== Description ===
Allows to set a stencil operation to be used when drawing this sprite.<br />
+
<translate>Allows to set a stencil operation to be used when drawing this sprite.<br />
 
     The table can contain the following fields:<br />
 
     The table can contain the following fields:<br />
 
     <ul>
 
     <ul>
Line 14: Line 14:
 
     <li><b>depthPass</b>: (integer) the stencil operation when depth test has passed.</li>
 
     <li><b>depthPass</b>: (integer) the stencil operation when depth test has passed.</li>
 
     </ul><br />
 
     </ul><br />
     Stencil function and operations code are defined in Sprite.STENCIL_xxx fields and correspond to the GL_xxx relevant values in OpenGL stencil documentation.
+
     Stencil function and operations code are defined in Sprite.STENCIL_xxx fields and correspond to the GL_xxx relevant values in OpenGL stencil documentation.</translate>
 
<source lang="lua">
 
<source lang="lua">
 
  Sprite:setStencilOperation(op)
 
  Sprite:setStencilOperation(op)
 
</source>
 
</source>
 
=== Parameters ===
 
=== Parameters ===
'''op''': (table) A table containing the stencil operation settings, or nil to disable stencil <br/>
+
'''op''': (table) <translate>A table containing the stencil operation settings, or nil to disable stencil</translate> <br/>

Revision as of 14:32, 23 August 2018

Available since: Gideros 2017.6

Description

Allows to set a stencil operation to be used when drawing this sprite.

   The table can contain the following fields:
  • stencilClear: (boolean) whether the stencil should be cleared beforehand.
  • stencilMask: (integer) the mask value used in stencil operations.
  • stencilWriteMask: (integer) the mask value used when writing to stencil.
  • stencilRef: (integer) the reference value used in stencil operations.
  • stencilFunc: (integer) the stencil function to use.
  • stencilFail: (integer) the stencil operation when stencil test failed.
  • depthFail: (integer) the stencil operation when depth test failed.
  • depthPass: (integer) the stencil operation when depth test has passed.


   Stencil function and operations code are defined in Sprite.STENCIL_xxx fields and correspond to the GL_xxx relevant values in OpenGL stencil documentation.
 Sprite:setStencilOperation(op)

Parameters

op: (table) A table containing the stencil operation settings, or nil to disable stencil