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

sglLighting Class Reference

#include <sglStatelet.hpp>

Inheritance diagram for sglLighting::

sglBooleanStatelet sglStatelet sglObject List of all members.

Public Methods

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

Detailed Description

This statelet encapsulates OpenGL's glEnable(GL_LIGHTING) function which controls whether or not lighting calculations are performed on subsequent geometry (sglDrawable) in determining the final fragment colors. This is disabled by default.


   sglLighting *lighting = new sglLighting(true);   // enable lighting
   lighting->enable(false);                         // disable lighting

Definition at line 1190 of file sglStatelet.hpp.

Constructor & Destructor Documentation

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

Constructor (and the default constructor).

on   True to enable lighting, false (the default) to disable.

Definition at line 1196 of file sglStatelet.hpp.

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

virtual destructor.

Definition at line 1200 of file sglStatelet.hpp.

Member Function Documentation

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