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

sglTexturingStatelet Class Reference

#include <sglStatelet.hpp>

Inheritance diagram for sglTexturingStatelet::

sglStatelet sglObject sglTexEnv sglTexGen sglTexture sglTextureMatrix sglTexture1D sglTexture2D sglTextureCubeMap List of all members.

Public Methods

 sglTexturingStatelet (StateEnum type)
virtual ~sglTexturingStatelet ()
void apply (sglCurrState *curr_state) const
virtual void applyToUnit (sglCurrState *curr_state, unsigned int unit) const=0

Detailed Description

SGL supports use of more than one texture unit for OpenGL version 1.3 or later, or earlier versions that implemented the GL_ARB_multitexture extension. To accomplish this all statelets that issue OpenGL commands to texture units are subclassed from this one.

This class adds a pure virtual applyToTextureUnit() memeber function which the subclasses must implement to apply their OpenGL texture elements to a given texture unit. For systems that do not have more than on texture units, then these applies will revert to simpler OpenGL calls with an implied texture unit of zero (that is, there is no call to set the active texture unit). The apply() method is implemented to direct all texture calls to the first texture unit by default.

Definition at line 2166 of file sglStatelet.hpp.


Constructor & Destructor Documentation

sglTexturingStatelet::sglTexturingStatelet ( StateEnum type ) [inline]
 

Constructor

Parameters:
The   sglStatelet::StateEnum corresponding to the subclass's statelet type.

Definition at line 2173 of file sglStatelet.hpp.

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

virtual destructor.

Definition at line 2176 of file sglStatelet.hpp.


Member Function Documentation

void sglTexturingStatelet::apply ( sglCurrState * curr_state ) const [inline, 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.

Definition at line 2179 of file sglStatelet.hpp.

void sglTexturingStatelet::applyToUnit ( sglCurrState * curr_state,
unsigned int unit ) const [pure virtual]
 

Apply this state change to the current rendering state for the given texture unit.

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.
unit   Index for the texture unit (0 is the first).

Reimplemented in sglTextureMatrix, sglTexEnv, sglTexGen, and sglTexture.

Referenced by apply().


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