Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   Related Pages  

sglTransparency Class Reference

#include <sglStatelet.hpp>

Inheritance diagram for sglTransparency::

sglBooleanStatelet sglStatelet sglObject List of all members.

Public Methods

 sglTransparency (bool on=false)
virtual ~sglTransparency ()
void apply (sglCurrState *curr_state) const

Detailed Description

This statelet controls how geometry with transparency are rendered in SGL. If this parameter in this statelet is true (enabled), then any subsequent geometry that passes the cull test will placed in the "transparency bin" to be sorted and rendered from back to front according to the distance to the centers of their respective bounding boxes. All geometry in this bin is rendered after all non-transparent geometry with blending enabled using the blending function from the sglBlending statelet (even if that statelet is disabled it will use the current blend function stored within). The geometry in the "transparent bin" will also be rendered with the depth writing disabled (even if an sglDepthMask is currently enabling it).

Example:

   sglTransparency *transparent = new sglTransparency; // disabled by default
   transparent->enable(true);                          // enable it.

Definition at line 2418 of file sglStatelet.hpp.


Constructor & Destructor Documentation

sglTransparency::sglTransparency ( bool on = false ) [inline]
 

Constructor (and the default constructor).

Parameters:
on   True to enable, false (default) to disable.

Definition at line 2424 of file sglStatelet.hpp.

sglTransparency::~sglTransparency ( ) [inline, virtual]
 

virtual destructor.

Definition at line 2428 of file sglStatelet.hpp.


Member Function Documentation

void sglTransparency::apply ( sglCurrState * curr_state ) const [virtual]
 

Apply this state change to the current rendering state.

Parameters:
curr_state   Required for statelets that affect one another. For example the sglTransparency sets up depth mask and blending modes which interact with the sglBlending and sglDepthMask statelets, and the curr_state object is used to resolve these internal issues.

Reimplemented from sglStatelet.


The documentation for this class was generated from the following file:
Generated at Mon Jul 1 18:00:11 2002 for SGL by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001