| 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

zeFog

Use .new("fog") to create the object. It blends the fog color with each rasterized pixel color using a blending factor. Refer to OpenGL reference for meaning of parameters. An enabled fog object will affect all objects after it in the tree of a scene structure unless the node containing the object saves and restores OpenGL attributes of its predecessor.

:set{...}

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

Key Value Type Remark
color {r, g, b, a} numbers (0 to 1) in table Sets fog color in red, green, blue, and alpha
linear flag Boolean If true, sets the GL_FOG_MODE parameter to GL_LINEAR; otherwise sets the GL_FOG_MODE parameter to GL_EXP
parameters {ensity, start, end} Numbers in table Sets parameters of GL_FOG_DENSITY, GL_FOG_START, and GL_FOG_END for OpenGL's fog function
enable flag Boolean Enables (default) and disables the object