| Home | zeGraph lib | Lua lib | Custom lib | Tutorials | Notes | XML Script | C-Talk | Z-Script |
Graph
   axis
   blend
   color
   color bar
   fog
   freetype
   light
   line
   material
   node
   point
   plot
   polygon
   render
   scene
   stencil
   texcoord
   text
   texture
   vertex
Utility
   array
   bio
   hdf
   make
   math
   netcdf
Auxiliary
   curl
   expact
   sqlite
   window

zeStencil

Use .new("stencil") to create the object. It is a very primitive wrapping for OpenGL stencil buffer.

:set{...}

Sets stencil buffer properties with a Lua tale. Valid key-value pairs in the Lua table are listed as follows.

Key Value Type Remark
depthmask mask Boolean If true, enables depth buffer writing; otherwise, disables depth buffer writing.
colormask rgba Table Enables or disables writing of frame-buffer color components.
stencilmask mask Number (>0) Sets the mask parameter of the OpenGL glStencilFunc() function.
reference r Number (>0) Sets the reference parameter of the OpenGL glStencilFunc() function.
test never String Sets the test parameter of the OpenGL glStencilFunc() function to GL_NEVER.
  always String Sets the test parameter of the OpenGL glStencilFunc() function to GL_ALWAYS.
  equal String Sets the test parameter of the OpenGL glStencilFunc() function to GL_ALWAYS.
  nequal String Sets the test parameter of the OpenGL glStencilFunc() function to GL_NOTEQUAL.
  less String Sets the test parameter of the OpenGL glStencilFunc() function to GL_LESS.
  lequal String Sets the test parameter of the OpenGL glStencilFunc() function to GL_LEQUAL.
  greater String Sets the test parameter of the OpenGL glStencilFunc() function to GL_GREATER.
  gequal String Sets the test parameter of the OpenGL glStencilFunc() function to GL_GEQUAL.
fail keep String Sets the fail parameter of the OpenGL glStencilOp() function to GL_KEEP.
  zero String Sets the fail parameter of the OpenGL glStencilOp() function to GL_ZERO.
  replace String Sets the fail parameter of the OpenGL glStencilOp() function to GL_REPLACE.
  increment String Sets the fail parameter of the OpenGL glStencilOp() function to GL_INCR.
  decrement String Sets the fail parameter of the OpenGL glStencilOp() function to GL_DECR.
  invert String Sets the fail parameter of the OpenGL glStencilOp() function to GL_INVERT.
zfail keep String Sets the zfail parameter of the OpenGL glStencilOp() function to GL_KEEP.
  zero String Sets the zfail parameter of the OpenGL glStencilOp() function to GL_ZERO.
  replace String Sets the zfail parameter of the OpenGL glStencilOp() function to GL_REPLACE.
  increment String Sets the zfail parameter of the OpenGL glStencilOp() function to GL_INCR.
  decrement String Sets the zfail parameter of the OpenGL glStencilOp() function to GL_DECR.
  invert String Sets the zfail parameter of the OpenGL glStencilOp() function to GL_INVERT.
zpass keep String Sets the zpass parameter of the OpenGL glStencilOp() function to GL_KEEP.
  zero String Sets the zpass parameter of the OpenGL glStencilOp() function to GL_ZERO.
  replace String Sets the zpass parameter of the OpenGL glStencilOp() function to GL_REPLACE.
  increment String Sets the zpass parameter of the OpenGL glStencilOp() function to GL_INCR.
  decrement String Sets the zpass parameter of the OpenGL glStencilOp() function to GL_DECR.
  invert String Sets the zpass parameter of the OpenGL glStencilOp() function to GL_INVERT.
enable flag Boolean Enables or disables the object.