1.2

| home | graph lib | utility lib | custom lib | auxiliary lib | tutorials |

   Axis
   Blend
   Color
   ColorBar
   Fog
   Freetype
   Light
   Line
   Material
   Node
   Point
   Plot
   Polygon
   Render
   Scene
   Stencil
   TexCoord
   Text
   Texture
   Vertex

zeFog

Use .new("fog") to create the object. It blends a 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(table)

table - a Lua table.

Sets fog properties. Valid key-value paris are listed in the table.

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 Enable (default) and disable the object