# Visualization Library

A lightweight C++ OpenGL middleware for 2D/3D graphics

[Home] [Tutorials] [All Classes] [Grouped Classes]

Public Member Functions | Public Attributes

# vl::TexEnv Class Reference

RenderState wrapping the OpenGL function glTexEnv(), see also http://www.opengl.org/sdk/docs/man/xhtml/glTexEnv.xml for more information. More...

`#include <Shader.hpp>`

Inheritance diagram for vl::TexEnv:

List of all members.

## Public Member Functions

| TexEnv ()
virtual ERenderState | type () const
virtual void | apply (int index, const Camera *, OpenGLContext *ctx) const
| The parameter cameara is NULL if we are disabling the state, non-NULL if we are enabling it.
void | setMode (ETexEnvMode mode)
ETexEnvMode | mode () const
void | setCombineRGB (ETexEnvMode combineRGB)
ETexEnvMode | combineRGB () const
void | setCombineAlpha (ETexEnvMode combineAlpha)
ETexEnvMode | combineAlpha () const
void | setColor (fvec4 color)
fvec4 | color () const
void | setRGBScale (float rgbscale)
float | rgbScale () const
void | setAlphaScale (float alphascale)
float | alphaScale () const
void | setSource0RGB (ETexEnvSource source)
void | setSource1RGB (ETexEnvSource source)
void | setSource2RGB (ETexEnvSource source)
ETexEnvSource | source0RGB () const
ETexEnvSource | source1RGB () const
ETexEnvSource | source2RGB () const
void | setSource0Alpha (ETexEnvSource source)
void | setSource1Alpha (ETexEnvSource source)
void | setSource2Alpha (ETexEnvSource source)
ETexEnvSource | source0Alpha () const
ETexEnvSource | source1Alpha () const
ETexEnvSource | source2Alpha () const
void | setOperand0RGB (ETexEnvOperand operand)
void | setOperand1RGB (ETexEnvOperand operand)
void | setOperand2RGB (ETexEnvOperand operand)
ETexEnvOperand | operand0RGB () const
ETexEnvOperand | operand1RGB () const
ETexEnvOperand | operand2RGB () const
void | setOperand0Alpha (ETexEnvOperand operand)
void | setOperand1Alpha (ETexEnvOperand operand)
void | setOperand2Alpha (ETexEnvOperand operand)
ETexEnvOperand | operand0Alpha () const
ETexEnvOperand | operand1Alpha () const
ETexEnvOperand | operand2Alpha () const
void | setPointSpriteCoordReplace (bool replace)
bool | pointSpriteCoordReplace () const
void | setLodBias (float lodbias)
float | lodBias () const
virtual ref< RenderState > | clone () const

## Public Attributes

fvec4 | mColor
float | mRGBScale
float | mAlphaScale
ETexEnvMode | mMode
ETexEnvMode | mCombineRGB
ETexEnvMode | mCombineAlpha
ETexEnvSource | mSource0RGB
ETexEnvSource | mSource1RGB
ETexEnvSource | mSource2RGB
ETexEnvSource | mSource0Alpha
ETexEnvSource | mSource1Alpha
ETexEnvSource | mSource2Alpha
ETexEnvOperand | mOperand0RGB
ETexEnvOperand | mOperand1RGB
ETexEnvOperand | mOperand2RGB
ETexEnvOperand | mOperand0Alpha
ETexEnvOperand | mOperand1Alpha
ETexEnvOperand | mOperand2Alpha
float | mLodBias
bool | mPointSpriteCoordReplace

## Detailed Description

RenderState wrapping the OpenGL function glTexEnv(), see also http://www.opengl.org/sdk/docs/man/xhtml/glTexEnv.xml for more information.

Note:
  A TexParameter defines a set of variables associated to a Texture while TexGen and TexEnv define a set of variables associated to a TextureSampler.

See also:
  Shader, TextureSampler, Texture, TexGen, TexParameter, Effect, Actor

Definition at line 1589 of file Shader.hpp.

## Constructor & Destructor Documentation

TexEnv::TexEnv | ( | ) |

Definition at line 885 of file Shader.cpp.

References mAlphaScale, mColor, mCombineAlpha, mCombineRGB, mLodBias, mMode, mOperand0Alpha, mOperand0RGB, mOperand1Alpha, mOperand1RGB, mOperand2Alpha, mOperand2RGB, mPointSpriteCoordReplace, mRGBScale, mSource0Alpha, mSource0RGB, mSource1Alpha, mSource1RGB, mSource2Alpha, mSource2RGB, vl::TEM_MODULATE, vl::TEM_REPLACE, vl::TEO_SRC_ALPHA, vl::TEO_SRC_COLOR, vl::TES_TEXTURE, and VL_DEBUG_SET_OBJECT_NAME.

## Member Function Documentation

virtual ERenderState vl::TexEnv::type | ( | ) | const`[inline, virtual]`

Reimplemented from vl::RenderState.

Definition at line 1595 of file Shader.hpp.

References vl::RS_TexEnv.

void TexEnv::apply | ( | int | index,
|  | const Camera * | camera,
|  | OpenGLContext * | ctx
| ) |  | const`[virtual]`

The parameter cameara is NULL if we are disabling the state, non-NULL if we are enabling it.

Implements vl::RenderState.

Definition at line 915 of file Shader.cpp.

References alphaScale(), color(), combineAlpha(), combineRGB(), vl::Has_GL_Version_1_3, vl::Has_GL_Version_1_4, vl::Has_Point_Sprite, mLodBias, mode(), mPointSpriteCoordReplace, operand0Alpha(), operand0RGB(), operand1Alpha(), operand1RGB(), operand2Alpha(), operand2RGB(), rgbScale(), source0Alpha(), source0RGB(), source1Alpha(), source1RGB(), source2Alpha(), source2RGB(), vl::TEM_BLEND, vl::TEM_COMBINE, vl::TEM_INTERPOLATE, VL_CHECK, VL_CHECK_OGL, and VL_MAX_TEXTURE_UNITS.

void vl::TexEnv::setMode | ( | ETexEnvMode | mode ) | `[inline]`

Definition at line 1598 of file Shader.hpp.

ETexEnvMode vl::TexEnv::mode | ( | ) | const`[inline]`

Definition at line 1599 of file Shader.hpp.

Referenced by apply().

void vl::TexEnv::setCombineRGB | ( | ETexEnvMode | combineRGB ) | `[inline]`

Definition at line 1600 of file Shader.hpp.

ETexEnvMode vl::TexEnv::combineRGB | ( | ) | const`[inline]`

Definition at line 1601 of file Shader.hpp.

Referenced by apply().

void vl::TexEnv::setCombineAlpha | ( | ETexEnvMode | combineAlpha ) | `[inline]`

Definition at line 1602 of file Shader.hpp.

ETexEnvMode vl::TexEnv::combineAlpha | ( | ) | const`[inline]`

Definition at line 1603 of file Shader.hpp.

Referenced by apply().

void vl::TexEnv::setColor | ( | fvec4 | color ) | `[inline]`

Definition at line 1604 of file Shader.hpp.

fvec4 vl::TexEnv::color | ( | ) | const`[inline]`

Definition at line 1605 of file Shader.hpp.

Referenced by apply().

void vl::TexEnv::setRGBScale | ( | float | rgbscale ) | `[inline]`

Definition at line 1606 of file Shader.hpp.

float vl::TexEnv::rgbScale | ( | ) | const`[inline]`

Definition at line 1607 of file Shader.hpp.

Referenced by apply().

void vl::TexEnv::setAlphaScale | ( | float | alphascale ) | `[inline]`

Definition at line 1608 of file Shader.hpp.

float vl::TexEnv::alphaScale | ( | ) | const`[inline]`

Definition at line 1609 of file Shader.hpp.

Referenced by apply().

void vl::TexEnv::setSource0RGB | ( | ETexEnvSource | source ) | `[inline]`

Definition at line 1611 of file Shader.hpp.

void vl::TexEnv::setSource1RGB | ( | ETexEnvSource | source ) | `[inline]`

Definition at line 1612 of file Shader.hpp.

void vl::TexEnv::setSource2RGB | ( | ETexEnvSource | source ) | `[inline]`

Definition at line 1613 of file Shader.hpp.

ETexEnvSource vl::TexEnv::source0RGB | ( | ) | const`[inline]`

Definition at line 1614 of file Shader.hpp.

Referenced by apply().

ETexEnvSource vl::TexEnv::source1RGB | ( | ) | const`[inline]`

Definition at line 1615 of file Shader.hpp.

Referenced by apply().

ETexEnvSource vl::TexEnv::source2RGB | ( | ) | const`[inline]`

Definition at line 1616 of file Shader.hpp.

Referenced by apply().

void vl::TexEnv::setSource0Alpha | ( | ETexEnvSource | source ) | `[inline]`

Definition at line 1617 of file Shader.hpp.

void vl::TexEnv::setSource1Alpha | ( | ETexEnvSource | source ) | `[inline]`

Definition at line 1618 of file Shader.hpp.

void vl::TexEnv::setSource2Alpha | ( | ETexEnvSource | source ) | `[inline]`

Definition at line 1619 of file Shader.hpp.

ETexEnvSource vl::TexEnv::source0Alpha | ( | ) | const`[inline]`

Definition at line 1620 of file Shader.hpp.

Referenced by apply().

ETexEnvSource vl::TexEnv::source1Alpha | ( | ) | const`[inline]`

Definition at line 1621 of file Shader.hpp.

Referenced by apply().

ETexEnvSource vl::TexEnv::source2Alpha | ( | ) | const`[inline]`

Definition at line 1622 of file Shader.hpp.

Referenced by apply().

void vl::TexEnv::setOperand0RGB | ( | ETexEnvOperand | operand ) | `[inline]`

Definition at line 1624 of file Shader.hpp.

void vl::TexEnv::setOperand1RGB | ( | ETexEnvOperand | operand ) | `[inline]`

Definition at line 1625 of file Shader.hpp.

void vl::TexEnv::setOperand2RGB | ( | ETexEnvOperand | operand ) | `[inline]`

Definition at line 1626 of file Shader.hpp.

ETexEnvOperand vl::TexEnv::operand0RGB | ( | ) | const`[inline]`

Definition at line 1627 of file Shader.hpp.

Referenced by apply().

ETexEnvOperand vl::TexEnv::operand1RGB | ( | ) | const`[inline]`

Definition at line 1628 of file Shader.hpp.

Referenced by apply().

ETexEnvOperand vl::TexEnv::operand2RGB | ( | ) | const`[inline]`

Definition at line 1629 of file Shader.hpp.

Referenced by apply().

void vl::TexEnv::setOperand0Alpha | ( | ETexEnvOperand | operand ) | `[inline]`

Definition at line 1630 of file Shader.hpp.

void vl::TexEnv::setOperand1Alpha | ( | ETexEnvOperand | operand ) | `[inline]`

Definition at line 1631 of file Shader.hpp.

void vl::TexEnv::setOperand2Alpha | ( | ETexEnvOperand | operand ) | `[inline]`

Definition at line 1632 of file Shader.hpp.

ETexEnvOperand vl::TexEnv::operand0Alpha | ( | ) | const`[inline]`

Definition at line 1633 of file Shader.hpp.

Referenced by apply().

ETexEnvOperand vl::TexEnv::operand1Alpha | ( | ) | const`[inline]`

Definition at line 1634 of file Shader.hpp.

Referenced by apply().

ETexEnvOperand vl::TexEnv::operand2Alpha | ( | ) | const`[inline]`

Definition at line 1635 of file Shader.hpp.

Referenced by apply().

void vl::TexEnv::setPointSpriteCoordReplace | ( | bool | replace ) | `[inline]`

Definition at line 1637 of file Shader.hpp.

bool vl::TexEnv::pointSpriteCoordReplace | ( | ) | const`[inline]`

Definition at line 1638 of file Shader.hpp.

void vl::TexEnv::setLodBias | ( | float | lodbias ) | `[inline]`

Definition at line 1640 of file Shader.hpp.

float vl::TexEnv::lodBias | ( | ) | const`[inline]`

Definition at line 1641 of file Shader.hpp.

virtual ref<RenderState> vl::TexEnv::clone | ( | ) | const`[inline, virtual]`

Implements vl::RenderState.

Definition at line 1643 of file Shader.hpp.

## Member Data Documentation

fvec4 vl::TexEnv::mColor

Definition at line 1651 of file Shader.hpp.

Referenced by TexEnv().

float vl::TexEnv::mRGBScale

Definition at line 1652 of file Shader.hpp.

Referenced by TexEnv().

float vl::TexEnv::mAlphaScale

Definition at line 1653 of file Shader.hpp.

Referenced by TexEnv().

ETexEnvMode vl::TexEnv::mMode

Definition at line 1654 of file Shader.hpp.

Referenced by TexEnv().

ETexEnvMode vl::TexEnv::mCombineRGB

Definition at line 1655 of file Shader.hpp.

Referenced by TexEnv().

ETexEnvMode vl::TexEnv::mCombineAlpha

Definition at line 1656 of file Shader.hpp.

Referenced by TexEnv().

ETexEnvSource vl::TexEnv::mSource0RGB

Definition at line 1657 of file Shader.hpp.

Referenced by TexEnv().

ETexEnvSource vl::TexEnv::mSource1RGB

Definition at line 1658 of file Shader.hpp.

Referenced by TexEnv().

ETexEnvSource vl::TexEnv::mSource2RGB

Definition at line 1659 of file Shader.hpp.

Referenced by TexEnv().

ETexEnvSource vl::TexEnv::mSource0Alpha

Definition at line 1660 of file Shader.hpp.

Referenced by TexEnv().

ETexEnvSource vl::TexEnv::mSource1Alpha

Definition at line 1661 of file Shader.hpp.

Referenced by TexEnv().

ETexEnvSource vl::TexEnv::mSource2Alpha

Definition at line 1662 of file Shader.hpp.

Referenced by TexEnv().

ETexEnvOperand vl::TexEnv::mOperand0RGB

Definition at line 1663 of file Shader.hpp.

Referenced by TexEnv().

ETexEnvOperand vl::TexEnv::mOperand1RGB

Definition at line 1664 of file Shader.hpp.

Referenced by TexEnv().

ETexEnvOperand vl::TexEnv::mOperand2RGB

Definition at line 1665 of file Shader.hpp.

Referenced by TexEnv().

ETexEnvOperand vl::TexEnv::mOperand0Alpha

Definition at line 1666 of file Shader.hpp.

Referenced by TexEnv().

ETexEnvOperand vl::TexEnv::mOperand1Alpha

Definition at line 1667 of file Shader.hpp.

Referenced by TexEnv().

ETexEnvOperand vl::TexEnv::mOperand2Alpha

Definition at line 1668 of file Shader.hpp.

Referenced by TexEnv().

float vl::TexEnv::mLodBias

Definition at line 1669 of file Shader.hpp.

Referenced by apply(), and TexEnv().

bool vl::TexEnv::mPointSpriteCoordReplace

Definition at line 1670 of file Shader.hpp.

Referenced by apply(), and TexEnv().

The documentation for this class was generated from the following files:

- D:/VL/BuildSystem/VL_DISTRO/Visualization_Library_SDK/src/vlGraphics/Shader.hpp
- D:/VL/BuildSystem/VL_DISTRO/Visualization_Library_SDK/src/vlGraphics/Shader.cpp

Visualization Library v2011.09.1162 Reference Documentation
Copyright 2005-2011 Michele Bosi. All rights reserved.
Updated on Thu Jan 26 2012 00:44:53.
Permission is granted to use this page to write and publish articles regarding Visualization Library.