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

sglDepthMask Class Reference

#include <sglStatelet.hpp>

Inheritance diagram for sglDepthMask::

sglBooleanStatelet sglStatelet sglObject List of all members.

Public Methods

 sglDepthMask (bool on=true)
virtual ~sglDepthMask ()
void apply (sglCurrState *curr_state) const

Detailed Description

This statelet encapsulates OpenGL's glDepthMask() function which controls whether or not depth values actually get written into the depth buffer. It is a subclass of sglBooleanStatelet which uses the enable() member function to control this mask.


   sglDepthMask *dmask = new sglDepthMask;     // enabled by default
   dmask->enable(false);                       // disable depth writes

    // OR

   sglDepthMask *dmask = new sglDepthMask(false);

Definition at line 847 of file sglStatelet.hpp.

Constructor & Destructor Documentation

sglDepthMask::sglDepthMask ( bool on = true ) [inline]

Constructor (default constructor too).

on   True to enable depth buffer writes (default), false to disable.

Definition at line 854 of file sglStatelet.hpp.

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

virtual destructor.

Definition at line 858 of file sglStatelet.hpp.

Member Function Documentation

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

Apply this state change to the current rendering state.

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:07 2002 for SGL by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001