Visualization Library 2.0.0

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

VL     Star     Watch     Fork     Issue

[Download] [Tutorials] [All Classes] [Grouped Classes]
Public Member Functions | Public Attributes | List of all members
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:

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. More...
 
void setMode (ETexEnvMode mode)
 
ETexEnvMode mode () const
 
void setCombineRGB (ETexEnvMode combineRGB)
 
ETexEnvMode combineRGB () const
 
void setCombineAlpha (ETexEnvMode combineAlpha)
 
ETexEnvMode combineAlpha () const
 
void setColor (const fvec4 &color)
 
const fvec4color () 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< RenderStateclone () const
 
- Public Member Functions inherited from vl::RenderStateIndexed
 RenderStateIndexed ()
 
- Public Member Functions inherited from vl::RenderState
 RenderState ()
 
- Public Member Functions inherited from vl::Object
 Object ()
 Constructor. More...
 
 Object (const Object &other)
 Copy constructor: copies the name, ref count mutex and user data. More...
 
Objectoperator= (const Object &other)
 Copy operator: copies the object's name, ref count mutex and user data. More...
 
const std::string & objectName () const
 The name of the object, by default set to the object's class name. More...
 
void setObjectName (const char *name)
 The name of the object, by default set to the object's class name in debug builds. More...
 
void setObjectName (const std::string &name)
 The name of the object, by default set to the object's class name in debug builds. More...
 
void setRefCountMutex (IMutex *mutex)
 The mutex used to protect the reference counting of an Object across multiple threads. More...
 
IMutexrefCountMutex ()
 The mutex used to protect the reference counting of an Object across multiple threads. More...
 
const IMutexrefCountMutex () const
 The mutex used to protect the reference counting of an Object across multiple threads. More...
 
int referenceCount () const
 Returns the number of references of an object. More...
 
void incReference () const
 Increments the reference count of an object. More...
 
void decReference ()
 Decrements the reference count of an object and deletes it if both automaticDelete() is true the count reaches 0. More...
 
void setAutomaticDelete (bool autodel_on)
 If set to true the Object is deleted when its reference count reaches 0. More...
 
bool automaticDelete () const
 If set to true the Object is deleted when its reference count reaches 0. More...
 
template<class T >
T * as ()
 Casts an Object to the specified class. More...
 
template<class T >
const T * as () const
 Casts an Object to the specified class. More...
 

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
 

Additional Inherited Members

- Protected Member Functions inherited from vl::Object
virtual ~Object ()
 
- Protected Attributes inherited from vl::Object
std::string mObjectName
 
IMutexmRefCountMutex
 
int mReferenceCount
 
bool mAutomaticDelete
 

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::TexEnv ( )

Member Function Documentation

◆ alphaScale()

float vl::TexEnv::alphaScale ( ) const
inline

Definition at line 1609 of file Shader.hpp.

◆ apply()

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 883 of file Shader.cpp.

References vl::Has_GL_Version_1_3, vl::Has_GL_Version_1_4, vl::Has_Point_Sprite, vl::TEM_BLEND, vl::TEM_COMBINE, vl::TEM_INTERPOLATE, VL_CHECK, and VL_CHECK_OGL.

◆ clone()

virtual ref<RenderState> vl::TexEnv::clone ( ) const
inlinevirtual

Implements vl::RenderState.

Definition at line 1643 of file Shader.hpp.

◆ color()

const fvec4& vl::TexEnv::color ( ) const
inline

Definition at line 1605 of file Shader.hpp.

◆ combineAlpha()

ETexEnvMode vl::TexEnv::combineAlpha ( ) const
inline

Definition at line 1603 of file Shader.hpp.

◆ combineRGB()

ETexEnvMode vl::TexEnv::combineRGB ( ) const
inline

Definition at line 1601 of file Shader.hpp.

◆ lodBias()

float vl::TexEnv::lodBias ( ) const
inline

Definition at line 1641 of file Shader.hpp.

◆ mode()

ETexEnvMode vl::TexEnv::mode ( ) const
inline

Definition at line 1599 of file Shader.hpp.

◆ operand0Alpha()

ETexEnvOperand vl::TexEnv::operand0Alpha ( ) const
inline

Definition at line 1633 of file Shader.hpp.

◆ operand0RGB()

ETexEnvOperand vl::TexEnv::operand0RGB ( ) const
inline

Definition at line 1627 of file Shader.hpp.

◆ operand1Alpha()

ETexEnvOperand vl::TexEnv::operand1Alpha ( ) const
inline

Definition at line 1634 of file Shader.hpp.

◆ operand1RGB()

ETexEnvOperand vl::TexEnv::operand1RGB ( ) const
inline

Definition at line 1628 of file Shader.hpp.

◆ operand2Alpha()

ETexEnvOperand vl::TexEnv::operand2Alpha ( ) const
inline

Definition at line 1635 of file Shader.hpp.

◆ operand2RGB()

ETexEnvOperand vl::TexEnv::operand2RGB ( ) const
inline

Definition at line 1629 of file Shader.hpp.

◆ pointSpriteCoordReplace()

bool vl::TexEnv::pointSpriteCoordReplace ( ) const
inline

Definition at line 1638 of file Shader.hpp.

◆ rgbScale()

float vl::TexEnv::rgbScale ( ) const
inline

Definition at line 1607 of file Shader.hpp.

◆ setAlphaScale()

void vl::TexEnv::setAlphaScale ( float  alphascale)
inline

Definition at line 1608 of file Shader.hpp.

◆ setColor()

void vl::TexEnv::setColor ( const fvec4 color)
inline

Definition at line 1604 of file Shader.hpp.

◆ setCombineAlpha()

void vl::TexEnv::setCombineAlpha ( ETexEnvMode  combineAlpha)
inline

Definition at line 1602 of file Shader.hpp.

◆ setCombineRGB()

void vl::TexEnv::setCombineRGB ( ETexEnvMode  combineRGB)
inline

Definition at line 1600 of file Shader.hpp.

◆ setLodBias()

void vl::TexEnv::setLodBias ( float  lodbias)
inline

Definition at line 1640 of file Shader.hpp.

◆ setMode()

void vl::TexEnv::setMode ( ETexEnvMode  mode)
inline

Definition at line 1598 of file Shader.hpp.

Referenced by vl::Terrain::init().

◆ setOperand0Alpha()

void vl::TexEnv::setOperand0Alpha ( ETexEnvOperand  operand)
inline

Definition at line 1630 of file Shader.hpp.

◆ setOperand0RGB()

void vl::TexEnv::setOperand0RGB ( ETexEnvOperand  operand)
inline

Definition at line 1624 of file Shader.hpp.

◆ setOperand1Alpha()

void vl::TexEnv::setOperand1Alpha ( ETexEnvOperand  operand)
inline

Definition at line 1631 of file Shader.hpp.

◆ setOperand1RGB()

void vl::TexEnv::setOperand1RGB ( ETexEnvOperand  operand)
inline

Definition at line 1625 of file Shader.hpp.

◆ setOperand2Alpha()

void vl::TexEnv::setOperand2Alpha ( ETexEnvOperand  operand)
inline

Definition at line 1632 of file Shader.hpp.

◆ setOperand2RGB()

void vl::TexEnv::setOperand2RGB ( ETexEnvOperand  operand)
inline

Definition at line 1626 of file Shader.hpp.

◆ setPointSpriteCoordReplace()

void vl::TexEnv::setPointSpriteCoordReplace ( bool  replace)
inline

Definition at line 1637 of file Shader.hpp.

Referenced by vl::VectorGraphics::popScissor().

◆ setRGBScale()

void vl::TexEnv::setRGBScale ( float  rgbscale)
inline

Definition at line 1606 of file Shader.hpp.

◆ setSource0Alpha()

void vl::TexEnv::setSource0Alpha ( ETexEnvSource  source)
inline

Definition at line 1617 of file Shader.hpp.

◆ setSource0RGB()

void vl::TexEnv::setSource0RGB ( ETexEnvSource  source)
inline

Definition at line 1611 of file Shader.hpp.

◆ setSource1Alpha()

void vl::TexEnv::setSource1Alpha ( ETexEnvSource  source)
inline

Definition at line 1618 of file Shader.hpp.

◆ setSource1RGB()

void vl::TexEnv::setSource1RGB ( ETexEnvSource  source)
inline

Definition at line 1612 of file Shader.hpp.

◆ setSource2Alpha()

void vl::TexEnv::setSource2Alpha ( ETexEnvSource  source)
inline

Definition at line 1619 of file Shader.hpp.

◆ setSource2RGB()

void vl::TexEnv::setSource2RGB ( ETexEnvSource  source)
inline

Definition at line 1613 of file Shader.hpp.

◆ source0Alpha()

ETexEnvSource vl::TexEnv::source0Alpha ( ) const
inline

Definition at line 1620 of file Shader.hpp.

◆ source0RGB()

ETexEnvSource vl::TexEnv::source0RGB ( ) const
inline

Definition at line 1614 of file Shader.hpp.

◆ source1Alpha()

ETexEnvSource vl::TexEnv::source1Alpha ( ) const
inline

Definition at line 1621 of file Shader.hpp.

◆ source1RGB()

ETexEnvSource vl::TexEnv::source1RGB ( ) const
inline

Definition at line 1615 of file Shader.hpp.

◆ source2Alpha()

ETexEnvSource vl::TexEnv::source2Alpha ( ) const
inline

Definition at line 1622 of file Shader.hpp.

◆ source2RGB()

ETexEnvSource vl::TexEnv::source2RGB ( ) const
inline

Definition at line 1616 of file Shader.hpp.

◆ type()

virtual ERenderState vl::TexEnv::type ( ) const
inlinevirtual

Reimplemented from vl::RenderState.

Definition at line 1595 of file Shader.hpp.

References vl::RS_TexEnv.

Member Data Documentation

◆ mAlphaScale

float vl::TexEnv::mAlphaScale

Definition at line 1653 of file Shader.hpp.

◆ mColor

fvec4 vl::TexEnv::mColor

Definition at line 1651 of file Shader.hpp.

◆ mCombineAlpha

ETexEnvMode vl::TexEnv::mCombineAlpha

Definition at line 1656 of file Shader.hpp.

◆ mCombineRGB

ETexEnvMode vl::TexEnv::mCombineRGB

Definition at line 1655 of file Shader.hpp.

◆ mLodBias

float vl::TexEnv::mLodBias

Definition at line 1669 of file Shader.hpp.

◆ mMode

ETexEnvMode vl::TexEnv::mMode

Definition at line 1654 of file Shader.hpp.

◆ mOperand0Alpha

ETexEnvOperand vl::TexEnv::mOperand0Alpha

Definition at line 1666 of file Shader.hpp.

◆ mOperand0RGB

ETexEnvOperand vl::TexEnv::mOperand0RGB

Definition at line 1663 of file Shader.hpp.

◆ mOperand1Alpha

ETexEnvOperand vl::TexEnv::mOperand1Alpha

Definition at line 1667 of file Shader.hpp.

◆ mOperand1RGB

ETexEnvOperand vl::TexEnv::mOperand1RGB

Definition at line 1664 of file Shader.hpp.

◆ mOperand2Alpha

ETexEnvOperand vl::TexEnv::mOperand2Alpha

Definition at line 1668 of file Shader.hpp.

◆ mOperand2RGB

ETexEnvOperand vl::TexEnv::mOperand2RGB

Definition at line 1665 of file Shader.hpp.

◆ mPointSpriteCoordReplace

bool vl::TexEnv::mPointSpriteCoordReplace

Definition at line 1670 of file Shader.hpp.

◆ mRGBScale

float vl::TexEnv::mRGBScale

Definition at line 1652 of file Shader.hpp.

◆ mSource0Alpha

ETexEnvSource vl::TexEnv::mSource0Alpha

Definition at line 1660 of file Shader.hpp.

◆ mSource0RGB

ETexEnvSource vl::TexEnv::mSource0RGB

Definition at line 1657 of file Shader.hpp.

◆ mSource1Alpha

ETexEnvSource vl::TexEnv::mSource1Alpha

Definition at line 1661 of file Shader.hpp.

◆ mSource1RGB

ETexEnvSource vl::TexEnv::mSource1RGB

Definition at line 1658 of file Shader.hpp.

◆ mSource2Alpha

ETexEnvSource vl::TexEnv::mSource2Alpha

Definition at line 1662 of file Shader.hpp.

◆ mSource2RGB

ETexEnvSource vl::TexEnv::mSource2RGB

Definition at line 1659 of file Shader.hpp.


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