Visualization Library

A lightweight C++ OpenGL middleware for 2D/3D graphics
[Home] [Tutorials] [All Classes] [Grouped Classes]
Public Member Functions | Protected Attributes

vl::Shader Class Reference

Manages most of the OpenGL rendering states responsible of the final aspect of the rendered objects. More...

#include <Shader.hpp>

Inheritance diagram for vl::Shader:
vl::Object

List of all members.

Public Member Functions

virtual const char * className ()
 Returns the name of the class.
 Shader ()
 Constructor.
 Shader (const Shader &other)
 Copy constructor.
virtual ~Shader ()
 Destructor.
Shaderoperator= (const Shader &other)
 Copy RenderStates, Enables, Uniforms and Scissor from another Shader.
Shadercopy (const Shader &other)
 Equivalent to "Shader& operator=(const Shader&)".
void reset ()
 Disables everything, erases all the render states, erases all the uniforms.
GLSLProgramgocGLSLProgram ()
 Gets or creates a GLSLProgram and returns it.
const GLSLProgramgetGLSLProgram () const
 Returns a GLSLProgram if it exists or NULL otherwise.
GLSLProgramgetGLSLProgram ()
 Returns a GLSLProgram if it exists or NULL otherwise.
PixelTransfergocPixelTransfer ()
const PixelTransfergetPixelTransfer () const
PixelTransfergetPixelTransfer ()
HintgocHint ()
const HintgetHint () const
HintgetHint ()
CullFacegocCullFace ()
const CullFacegetCullFace () const
CullFacegetCullFace ()
FrontFacegocFrontFace ()
const FrontFacegetFrontFace () const
FrontFacegetFrontFace ()
DepthFuncgocDepthFunc ()
const DepthFuncgetDepthFunc () const
DepthFuncgetDepthFunc ()
DepthMaskgocDepthMask ()
const DepthMaskgetDepthMask () const
DepthMaskgetDepthMask ()
ColorMaskgocColorMask ()
const ColorMaskgetColorMask () const
ColorMaskgetColorMask ()
PolygonModegocPolygonMode ()
const PolygonModegetPolygonMode () const
PolygonModegetPolygonMode ()
ShadeModelgocShadeModel ()
const ShadeModelgetShadeModel () const
ShadeModelgetShadeModel ()
BlendEquationgocBlendEquation ()
const BlendEquationgetBlendEquation () const
BlendEquationgetBlendEquation ()
AlphaFuncgocAlphaFunc ()
const AlphaFuncgetAlphaFunc () const
AlphaFuncgetAlphaFunc ()
MaterialgocMaterial ()
const MaterialgetMaterial () const
MaterialgetMaterial ()
LightModelgocLightModel ()
const LightModelgetLightModel () const
LightModelgetLightModel ()
FoggocFog ()
const FoggetFog () const
FoggetFog ()
PolygonOffsetgocPolygonOffset ()
const PolygonOffsetgetPolygonOffset () const
PolygonOffsetgetPolygonOffset ()
LogicOpgocLogicOp ()
const LogicOpgetLogicOp () const
LogicOpgetLogicOp ()
DepthRangegocDepthRange ()
const DepthRangegetDepthRange () const
DepthRangegetDepthRange ()
LineWidthgocLineWidth ()
const LineWidthgetLineWidth () const
LineWidthgetLineWidth ()
PointSizegocPointSize ()
const PointSizegetPointSize () const
PointSizegetPointSize ()
LineStipplegocLineStipple ()
const LineStipplegetLineStipple () const
LineStipplegetLineStipple ()
PolygonStipplegocPolygonStipple ()
const PolygonStipplegetPolygonStipple () const
PolygonStipplegetPolygonStipple ()
PointParametergocPointParameter ()
const PointParametergetPointParameter () const
PointParametergetPointParameter ()
StencilFuncgocStencilFunc ()
const StencilFuncgetStencilFunc () const
StencilFuncgetStencilFunc ()
StencilOpgocStencilOp ()
const StencilOpgetStencilOp () const
StencilOpgetStencilOp ()
StencilMaskgocStencilMask ()
const StencilMaskgetStencilMask () const
StencilMaskgetStencilMask ()
BlendColorgocBlendColor ()
const BlendColorgetBlendColor () const
BlendColorgetBlendColor ()
BlendFuncgocBlendFunc ()
const BlendFuncgetBlendFunc () const
BlendFuncgetBlendFunc ()
SampleCoveragegocSampleCoverage ()
const SampleCoveragegetSampleCoverage () const
SampleCoveragegetSampleCoverage ()
LightgocLight (int light_index)
const LightgetLight (int light_index) const
LightgetLight (int light_index)
ClipPlanegocClipPlane (int plane_index)
const ClipPlanegetClipPlane (int plane_index) const
ClipPlanegetClipPlane (int plane_index)
TextureUnitgocTextureUnit (int unit_index)
const TextureUnitgetTextureUnit (int unit_index) const
TextureUnitgetTextureUnit (int unit_index)
TexEnvgocTexEnv (int unit_index)
const TexEnvgetTexEnv (int unit_index) const
TexEnvgetTexEnv (int unit_index)
TexGengocTexGen (int unit_index)
const TexGengetTexGen (int unit_index) const
TexGengetTexGen (int unit_index)
TextureMatrixgocTextureMatrix (int unit_index)
const TextureMatrixgetTextureMatrix (int unit_index) const
TextureMatrixgetTextureMatrix (int unit_index)
void enable (EEnable capability)
void disable (EEnable capability)
const std::vector< EEnable > & enables () const
int isEnabled (EEnable capability) const
void disableAll ()
bool blendingEnabled () const
void setRenderState (RenderState *renderstate)
const RenderStaterenderState (ERenderState type) const
RenderStaterenderState (ERenderState type)
const std::vector< ref
< RenderState > > & 
renderStates () const
void eraseRenderState (ERenderState type)
void eraseRenderState (RenderState *rs)
void eraseAllRenderStates ()
const GLSLProgramglslProgram () const
 Returns the GLSLProgram associated to a Shader (if any)
GLSLProgramglslProgram ()
 Returns the GLSLProgram associated to a Shader (if any)
void setUniform (Uniform *uniform)
 Equivalent to gocUniformSet()->setUniform(...)
const std::vector< ref
< Uniform > > & 
uniforms () const
 Equivalent to gocUniformSet()->uniforms(...)
void eraseUniform (const std::string &name)
 Equivalent to gocUniformSet()->eraseUniform(...)
void eraseUniform (const Uniform *uniform)
 Equivalent to gocUniformSet()->eraseUniform(...)
void eraseAllUniforms ()
 Equivalent to gocUniformSet()->eraseAllUniforms(...)
UniformgocUniform (const std::string &name)
 Equivalent to gocUniformSet()->gocUniform(...)
UniformgetUniform (const std::string &name)
 Equivalent to gocUniformSet()->getUniform(...)
const UniformgetUniform (const std::string &name) const
 Equivalent to gocUniformSet()->getUniform(...)
EnableSetgocEnableSet ()
EnableSetgetEnableSet ()
const EnableSetgetEnableSet () const
RenderStateSetgocRenderStateSet ()
RenderStateSetgetRenderStateSet ()
const RenderStateSetgetRenderStateSet () const
UniformSetgocUniformSet ()
 Returns the UniformSet installed (creating it if no UniformSet has been installed)
UniformSetgetUniformSet ()
 Returns the UniformSet installed.
const UniformSetgetUniformSet () const
 Returns the UniformSet installed.
void setEnableSet (EnableSet *es)
void setRenderStateSet (RenderStateSet *rss)
void setUniformSet (UniformSet *us)
 Installs a new UniformSet.
void setScissor (Scissor *scissor)
 Sets the Scissor to be used when rendering an Actor.
const Scissorscissor () const
 Returns the Scissor to be used when rendering an Actor.
Scissorscissor ()
 Returns the Scissor to be used when rendering an Actor.
void setShaderAnimator (ShaderAnimator *animator)
 Installs the ShaderAnimator used to update/animate a Shader (see vl::ShaderAnimator documentation).
ShaderAnimatorshaderAnimator ()
 Returns the ShaderAnimator used to update/animate a Shader (see vl::ShaderAnimator documentation).
const ShaderAnimatorshaderAnimator () const
 Returns the ShaderAnimator used to update/animate a Shader (see vl::ShaderAnimator documentation).
Real lastUpdateTime () const
 Last time this Actor was animated/updated using a shaderAnimator().
void setLastUpdateTime (Real time)
 Used internally.

Protected Attributes

ref< RenderStateSetmRenderStateSet
ref< EnableSetmEnableSet
ref< UniformSetmUniformSet
ref< ScissormScissor
ref< ShaderAnimatormShaderAnimator
Real mLastUpdateTime

Detailed Description

Manages most of the OpenGL rendering states responsible of the final aspect of the rendered objects.

A Shader represents a rendering pass. Using the Effect class you can assign more rendering passes to an Actor. You can also specify different sets of rendering passes for each Effect LOD, for more information see Effect.

Remarks:
The Uniforms defined in the Actor and the ones defined in the Shader must not overlap, that is, an Actor must not define Uniforms present in the Shader and vice versa.
See also:
Effect, Actor

Definition at line 1218 of file Shader.hpp.


Constructor & Destructor Documentation

Shader::Shader (  )

Constructor.

Definition at line 45 of file Shader.cpp.

References mLastUpdateTime, and VL_DEBUG_SET_OBJECT_NAME.

vl::Shader::Shader ( const Shader other ) [inline]

Copy constructor.

Calls operator=(other).

Definition at line 1227 of file Shader.hpp.

Shader::~Shader (  ) [virtual]

Destructor.

Definition at line 55 of file Shader.cpp.


Member Function Documentation

virtual const char* vl::Shader::className (  ) [inline, virtual]

Returns the name of the class.

Reimplemented from vl::Object.

Definition at line 1221 of file Shader.hpp.

Shader& vl::Shader::operator= ( const Shader other ) [inline]

Copy RenderStates, Enables, Uniforms and Scissor from another Shader.

Note that the destination Shader still keeps its own copy of the RenderStateSet, EnableSet and UniformSet objects.

Definition at line 1234 of file Shader.hpp.

References vl::ref< T >::get(), mEnableSet, mRenderStateSet, mScissor, mShaderAnimator, mUniformSet, and vl::Object::operator=().

Shader& vl::Shader::copy ( const Shader other ) [inline]

Equivalent to "Shader& operator=(const Shader&)".

Definition at line 1279 of file Shader.hpp.

void vl::Shader::reset (  ) [inline]

Disables everything, erases all the render states, erases all the uniforms.

Definition at line 1285 of file Shader.hpp.

GLSLProgram * Shader::gocGLSLProgram (  )

Gets or creates a GLSLProgram and returns it.

Definition at line 89 of file Shader.cpp.

References GET_OR_CREATE.

const GLSLProgram * Shader::getGLSLProgram (  ) const
GLSLProgram * Shader::getGLSLProgram (  )

Returns a GLSLProgram if it exists or NULL otherwise.

Definition at line 64 of file Shader.cpp.

References getRenderStateSet(), vl::RenderStateSet::renderState(), and vl::RS_GLSLProgram.

PixelTransfer * Shader::gocPixelTransfer (  )

Definition at line 91 of file Shader.cpp.

References GET_OR_CREATE.

const PixelTransfer* vl::Shader::getPixelTransfer (  ) const [inline]

Definition at line 1304 of file Shader.hpp.

References vl::RS_PixelTransfer.

PixelTransfer* vl::Shader::getPixelTransfer (  ) [inline]

Definition at line 1305 of file Shader.hpp.

References vl::RS_PixelTransfer.

Hint * Shader::gocHint (  )

Definition at line 93 of file Shader.cpp.

References GET_OR_CREATE.

const Hint* vl::Shader::getHint (  ) const [inline]

Definition at line 1308 of file Shader.hpp.

References vl::RS_Hint.

Hint* vl::Shader::getHint (  ) [inline]

Definition at line 1309 of file Shader.hpp.

References vl::RS_Hint.

CullFace * Shader::gocCullFace (  )

Definition at line 95 of file Shader.cpp.

References GET_OR_CREATE.

const CullFace* vl::Shader::getCullFace (  ) const [inline]

Definition at line 1312 of file Shader.hpp.

References vl::RS_CullFace.

CullFace* vl::Shader::getCullFace (  ) [inline]

Definition at line 1313 of file Shader.hpp.

References vl::RS_CullFace.

FrontFace * Shader::gocFrontFace (  )

Definition at line 97 of file Shader.cpp.

References GET_OR_CREATE.

const FrontFace* vl::Shader::getFrontFace (  ) const [inline]

Definition at line 1316 of file Shader.hpp.

References vl::RS_FrontFace.

FrontFace* vl::Shader::getFrontFace (  ) [inline]

Definition at line 1317 of file Shader.hpp.

References vl::RS_FrontFace.

DepthFunc * Shader::gocDepthFunc (  )

Definition at line 99 of file Shader.cpp.

References GET_OR_CREATE.

const DepthFunc* vl::Shader::getDepthFunc (  ) const [inline]

Definition at line 1320 of file Shader.hpp.

References vl::RS_DepthFunc.

DepthFunc* vl::Shader::getDepthFunc (  ) [inline]

Definition at line 1321 of file Shader.hpp.

References vl::RS_DepthFunc.

DepthMask * Shader::gocDepthMask (  )

Definition at line 101 of file Shader.cpp.

References GET_OR_CREATE.

const DepthMask* vl::Shader::getDepthMask (  ) const [inline]

Definition at line 1324 of file Shader.hpp.

References vl::RS_DepthMask.

DepthMask* vl::Shader::getDepthMask (  ) [inline]

Definition at line 1325 of file Shader.hpp.

References vl::RS_DepthMask.

ColorMask * Shader::gocColorMask (  )

Definition at line 103 of file Shader.cpp.

References GET_OR_CREATE.

const ColorMask* vl::Shader::getColorMask (  ) const [inline]

Definition at line 1328 of file Shader.hpp.

References vl::RS_ColorMask.

ColorMask* vl::Shader::getColorMask (  ) [inline]

Definition at line 1329 of file Shader.hpp.

References vl::RS_ColorMask.

PolygonMode * Shader::gocPolygonMode (  )

Definition at line 105 of file Shader.cpp.

References GET_OR_CREATE.

const PolygonMode* vl::Shader::getPolygonMode (  ) const [inline]

Definition at line 1332 of file Shader.hpp.

References vl::RS_PolygonMode.

PolygonMode* vl::Shader::getPolygonMode (  ) [inline]

Definition at line 1333 of file Shader.hpp.

References vl::RS_PolygonMode.

ShadeModel * Shader::gocShadeModel (  )

Definition at line 107 of file Shader.cpp.

References GET_OR_CREATE.

const ShadeModel* vl::Shader::getShadeModel (  ) const [inline]

Definition at line 1336 of file Shader.hpp.

References vl::RS_ShadeModel.

ShadeModel* vl::Shader::getShadeModel (  ) [inline]

Definition at line 1337 of file Shader.hpp.

References vl::RS_ShadeModel.

BlendEquation * Shader::gocBlendEquation (  )

Definition at line 109 of file Shader.cpp.

References GET_OR_CREATE.

const BlendEquation* vl::Shader::getBlendEquation (  ) const [inline]

Definition at line 1340 of file Shader.hpp.

References vl::RS_BlendEquation.

BlendEquation* vl::Shader::getBlendEquation (  ) [inline]

Definition at line 1341 of file Shader.hpp.

References vl::RS_BlendEquation.

AlphaFunc * Shader::gocAlphaFunc (  )

Definition at line 111 of file Shader.cpp.

References GET_OR_CREATE.

const AlphaFunc* vl::Shader::getAlphaFunc (  ) const [inline]

Definition at line 1344 of file Shader.hpp.

References vl::RS_AlphaFunc.

AlphaFunc* vl::Shader::getAlphaFunc (  ) [inline]

Definition at line 1345 of file Shader.hpp.

References vl::RS_AlphaFunc.

Material * Shader::gocMaterial (  )

Definition at line 113 of file Shader.cpp.

References GET_OR_CREATE.

const Material* vl::Shader::getMaterial (  ) const [inline]

Definition at line 1348 of file Shader.hpp.

References vl::RS_Material.

Material* vl::Shader::getMaterial (  ) [inline]

Definition at line 1349 of file Shader.hpp.

References vl::RS_Material.

LightModel * Shader::gocLightModel (  )

Definition at line 115 of file Shader.cpp.

References GET_OR_CREATE.

const LightModel* vl::Shader::getLightModel (  ) const [inline]

Definition at line 1352 of file Shader.hpp.

References vl::RS_LightModel.

LightModel* vl::Shader::getLightModel (  ) [inline]

Definition at line 1353 of file Shader.hpp.

References vl::RS_LightModel.

Fog * Shader::gocFog (  )

Definition at line 117 of file Shader.cpp.

References GET_OR_CREATE.

const Fog* vl::Shader::getFog (  ) const [inline]

Definition at line 1356 of file Shader.hpp.

References vl::RS_Fog.

Fog* vl::Shader::getFog (  ) [inline]

Definition at line 1357 of file Shader.hpp.

References vl::RS_Fog.

PolygonOffset * Shader::gocPolygonOffset (  )

Definition at line 119 of file Shader.cpp.

References GET_OR_CREATE.

const PolygonOffset* vl::Shader::getPolygonOffset (  ) const [inline]

Definition at line 1360 of file Shader.hpp.

References vl::RS_PolygonOffset.

PolygonOffset* vl::Shader::getPolygonOffset (  ) [inline]

Definition at line 1361 of file Shader.hpp.

References vl::RS_PolygonOffset.

LogicOp * Shader::gocLogicOp (  )

Definition at line 121 of file Shader.cpp.

References GET_OR_CREATE.

const LogicOp* vl::Shader::getLogicOp (  ) const [inline]

Definition at line 1364 of file Shader.hpp.

References vl::RS_LogicOp.

LogicOp* vl::Shader::getLogicOp (  ) [inline]

Definition at line 1365 of file Shader.hpp.

References vl::RS_LogicOp.

DepthRange * Shader::gocDepthRange (  )

Definition at line 123 of file Shader.cpp.

References GET_OR_CREATE.

const DepthRange* vl::Shader::getDepthRange (  ) const [inline]

Definition at line 1368 of file Shader.hpp.

References vl::RS_DepthRange.

DepthRange* vl::Shader::getDepthRange (  ) [inline]

Definition at line 1369 of file Shader.hpp.

References vl::RS_DepthRange.

LineWidth * Shader::gocLineWidth (  )

Definition at line 125 of file Shader.cpp.

References GET_OR_CREATE.

const LineWidth* vl::Shader::getLineWidth (  ) const [inline]

Definition at line 1372 of file Shader.hpp.

References vl::RS_LineWidth.

LineWidth* vl::Shader::getLineWidth (  ) [inline]

Definition at line 1373 of file Shader.hpp.

References vl::RS_LineWidth.

PointSize * Shader::gocPointSize (  )

Definition at line 127 of file Shader.cpp.

References GET_OR_CREATE.

const PointSize* vl::Shader::getPointSize (  ) const [inline]

Definition at line 1376 of file Shader.hpp.

References vl::RS_PointSize.

PointSize* vl::Shader::getPointSize (  ) [inline]

Definition at line 1377 of file Shader.hpp.

References vl::RS_PointSize.

LineStipple * Shader::gocLineStipple (  )

Definition at line 129 of file Shader.cpp.

References GET_OR_CREATE.

const LineStipple* vl::Shader::getLineStipple (  ) const [inline]

Definition at line 1380 of file Shader.hpp.

References vl::RS_LineStipple.

LineStipple* vl::Shader::getLineStipple (  ) [inline]

Definition at line 1381 of file Shader.hpp.

References vl::RS_LineStipple.

PolygonStipple * Shader::gocPolygonStipple (  )

Definition at line 131 of file Shader.cpp.

References GET_OR_CREATE.

const PolygonStipple* vl::Shader::getPolygonStipple (  ) const [inline]

Definition at line 1384 of file Shader.hpp.

References vl::RS_PolygonStipple.

PolygonStipple* vl::Shader::getPolygonStipple (  ) [inline]

Definition at line 1385 of file Shader.hpp.

References vl::RS_PolygonStipple.

PointParameter * Shader::gocPointParameter (  )

Definition at line 133 of file Shader.cpp.

References GET_OR_CREATE.

const PointParameter* vl::Shader::getPointParameter (  ) const [inline]

Definition at line 1388 of file Shader.hpp.

References vl::RS_PointParameter.

PointParameter* vl::Shader::getPointParameter (  ) [inline]

Definition at line 1389 of file Shader.hpp.

References vl::RS_PointParameter.

StencilFunc * Shader::gocStencilFunc (  )

Definition at line 135 of file Shader.cpp.

References GET_OR_CREATE.

const StencilFunc* vl::Shader::getStencilFunc (  ) const [inline]

Definition at line 1392 of file Shader.hpp.

References vl::RS_StencilFunc.

StencilFunc* vl::Shader::getStencilFunc (  ) [inline]

Definition at line 1393 of file Shader.hpp.

References vl::RS_StencilFunc.

StencilOp * Shader::gocStencilOp (  )

Definition at line 137 of file Shader.cpp.

References GET_OR_CREATE.

const StencilOp* vl::Shader::getStencilOp (  ) const [inline]

Definition at line 1396 of file Shader.hpp.

References vl::RS_StencilOp.

StencilOp* vl::Shader::getStencilOp (  ) [inline]

Definition at line 1397 of file Shader.hpp.

References vl::RS_StencilOp.

StencilMask * Shader::gocStencilMask (  )

Definition at line 139 of file Shader.cpp.

References GET_OR_CREATE.

const StencilMask* vl::Shader::getStencilMask (  ) const [inline]

Definition at line 1400 of file Shader.hpp.

References vl::RS_StencilMask.

StencilMask* vl::Shader::getStencilMask (  ) [inline]

Definition at line 1401 of file Shader.hpp.

References vl::RS_StencilMask.

BlendColor * Shader::gocBlendColor (  )

Definition at line 141 of file Shader.cpp.

References GET_OR_CREATE.

const BlendColor* vl::Shader::getBlendColor (  ) const [inline]

Definition at line 1404 of file Shader.hpp.

References vl::RS_BlendColor.

BlendColor* vl::Shader::getBlendColor (  ) [inline]

Definition at line 1405 of file Shader.hpp.

References vl::RS_BlendColor.

BlendFunc * Shader::gocBlendFunc (  )

Definition at line 143 of file Shader.cpp.

References GET_OR_CREATE.

const BlendFunc* vl::Shader::getBlendFunc (  ) const [inline]

Definition at line 1408 of file Shader.hpp.

References vl::RS_BlendFunc.

BlendFunc* vl::Shader::getBlendFunc (  ) [inline]

Definition at line 1409 of file Shader.hpp.

References vl::RS_BlendFunc.

SampleCoverage * Shader::gocSampleCoverage (  )

Definition at line 145 of file Shader.cpp.

References GET_OR_CREATE.

const SampleCoverage* vl::Shader::getSampleCoverage (  ) const [inline]

Definition at line 1412 of file Shader.hpp.

References vl::RS_SampleCoverage.

SampleCoverage* vl::Shader::getSampleCoverage (  ) [inline]

Definition at line 1413 of file Shader.hpp.

References vl::RS_SampleCoverage.

Light * Shader::gocLight ( int  light_index )

Definition at line 147 of file Shader.cpp.

References GET_OR_CREATE_IDX.

const Light * Shader::getLight ( int  light_index ) const
Light * Shader::getLight ( int  light_index )

Definition at line 151 of file Shader.cpp.

References getRenderStateSet(), vl::RenderStateSet::renderState(), and vl::RS_Light0.

ClipPlane * Shader::gocClipPlane ( int  plane_index )

Definition at line 153 of file Shader.cpp.

References GET_OR_CREATE_IDX.

const ClipPlane * Shader::getClipPlane ( int  plane_index ) const
ClipPlane * Shader::getClipPlane ( int  plane_index )
TextureUnit * Shader::gocTextureUnit ( int  unit_index )

Definition at line 159 of file Shader.cpp.

References GET_OR_CREATE_IDX.

const TextureUnit* vl::Shader::getTextureUnit ( int  unit_index ) const [inline]

Definition at line 1437 of file Shader.hpp.

References vl::RS_TextureUnit0.

TextureUnit* vl::Shader::getTextureUnit ( int  unit_index ) [inline]

Definition at line 1439 of file Shader.hpp.

References vl::RS_TextureUnit0.

TexEnv * Shader::gocTexEnv ( int  unit_index )

Definition at line 163 of file Shader.cpp.

References GET_OR_CREATE_IDX.

const TexEnv* vl::Shader::getTexEnv ( int  unit_index ) const [inline]

Definition at line 1445 of file Shader.hpp.

References vl::RS_TexEnv0.

TexEnv* vl::Shader::getTexEnv ( int  unit_index ) [inline]

Definition at line 1447 of file Shader.hpp.

References vl::RS_TexEnv0.

TexGen * Shader::gocTexGen ( int  unit_index )

Definition at line 161 of file Shader.cpp.

References GET_OR_CREATE_IDX.

const TexGen* vl::Shader::getTexGen ( int  unit_index ) const [inline]

Definition at line 1453 of file Shader.hpp.

References vl::RS_TexGen0.

TexGen* vl::Shader::getTexGen ( int  unit_index ) [inline]

Definition at line 1455 of file Shader.hpp.

References vl::RS_TexGen0.

TextureMatrix * Shader::gocTextureMatrix ( int  unit_index )

Definition at line 165 of file Shader.cpp.

References GET_OR_CREATE_IDX.

const TextureMatrix* vl::Shader::getTextureMatrix ( int  unit_index ) const [inline]

Definition at line 1461 of file Shader.hpp.

References vl::RS_TextureMatrix0.

TextureMatrix* vl::Shader::getTextureMatrix ( int  unit_index ) [inline]

Definition at line 1463 of file Shader.hpp.

References vl::RS_TextureMatrix0.

void vl::Shader::enable ( EEnable  capability ) [inline]

Definition at line 1467 of file Shader.hpp.

void vl::Shader::disable ( EEnable  capability ) [inline]

Definition at line 1469 of file Shader.hpp.

const std::vector<EEnable>& vl::Shader::enables (  ) const [inline]

Definition at line 1471 of file Shader.hpp.

int vl::Shader::isEnabled ( EEnable  capability ) const [inline]

Definition at line 1473 of file Shader.hpp.

void vl::Shader::disableAll (  ) [inline]

Definition at line 1475 of file Shader.hpp.

bool vl::Shader::blendingEnabled (  ) const [inline]
void vl::Shader::setRenderState ( RenderState renderstate ) [inline]

Definition at line 1481 of file Shader.hpp.

const RenderState* vl::Shader::renderState ( ERenderState  type ) const [inline]

Definition at line 1483 of file Shader.hpp.

RenderState* vl::Shader::renderState ( ERenderState  type ) [inline]

Definition at line 1485 of file Shader.hpp.

const std::vector< ref<RenderState> >& vl::Shader::renderStates (  ) const [inline]

Definition at line 1487 of file Shader.hpp.

void vl::Shader::eraseRenderState ( ERenderState  type ) [inline]

Definition at line 1489 of file Shader.hpp.

void vl::Shader::eraseRenderState ( RenderState rs ) [inline]

Definition at line 1491 of file Shader.hpp.

References vl::RenderState::type().

void vl::Shader::eraseAllRenderStates (  ) [inline]

Definition at line 1493 of file Shader.hpp.

const GLSLProgram* vl::Shader::glslProgram (  ) const [inline]
GLSLProgram* vl::Shader::glslProgram (  ) [inline]

Returns the GLSLProgram associated to a Shader (if any)

Definition at line 1499 of file Shader.hpp.

void vl::Shader::setUniform ( Uniform uniform ) [inline]

Equivalent to gocUniformSet()->setUniform(...)

Definition at line 1504 of file Shader.hpp.

References VL_CHECK.

const std::vector< ref<Uniform> >& vl::Shader::uniforms (  ) const [inline]

Equivalent to gocUniformSet()->uniforms(...)

Definition at line 1507 of file Shader.hpp.

void vl::Shader::eraseUniform ( const std::string &  name ) [inline]

Equivalent to gocUniformSet()->eraseUniform(...)

Definition at line 1510 of file Shader.hpp.

void vl::Shader::eraseUniform ( const Uniform uniform ) [inline]

Equivalent to gocUniformSet()->eraseUniform(...)

Definition at line 1513 of file Shader.hpp.

void vl::Shader::eraseAllUniforms (  ) [inline]

Equivalent to gocUniformSet()->eraseAllUniforms(...)

Definition at line 1516 of file Shader.hpp.

Uniform* vl::Shader::gocUniform ( const std::string &  name ) [inline]

Equivalent to gocUniformSet()->gocUniform(...)

Definition at line 1519 of file Shader.hpp.

Uniform* vl::Shader::getUniform ( const std::string &  name ) [inline]

Equivalent to gocUniformSet()->getUniform(...)

Definition at line 1522 of file Shader.hpp.

References vl::Uniform::getUniform().

const Uniform* vl::Shader::getUniform ( const std::string &  name ) const [inline]

Equivalent to gocUniformSet()->getUniform(...)

Definition at line 1525 of file Shader.hpp.

References vl::Uniform::getUniform().

EnableSet* vl::Shader::gocEnableSet (  ) [inline]

Definition at line 1529 of file Shader.hpp.

EnableSet* vl::Shader::getEnableSet (  ) [inline]
const EnableSet* vl::Shader::getEnableSet (  ) const [inline]

Definition at line 1533 of file Shader.hpp.

RenderStateSet* vl::Shader::gocRenderStateSet (  ) [inline]

Definition at line 1535 of file Shader.hpp.

Referenced by vl::Rendering::fillRenderQueue().

RenderStateSet* vl::Shader::getRenderStateSet (  ) [inline]
const RenderStateSet* vl::Shader::getRenderStateSet (  ) const [inline]

Definition at line 1539 of file Shader.hpp.

UniformSet* vl::Shader::gocUniformSet (  ) [inline]

Returns the UniformSet installed (creating it if no UniformSet has been installed)

See also:

Definition at line 1551 of file Shader.hpp.

UniformSet* vl::Shader::getUniformSet (  ) [inline]
const UniformSet* vl::Shader::getUniformSet (  ) const [inline]
void vl::Shader::setEnableSet ( EnableSet es ) [inline]

Definition at line 1577 of file Shader.hpp.

void vl::Shader::setRenderStateSet ( RenderStateSet rss ) [inline]

Definition at line 1579 of file Shader.hpp.

void vl::Shader::setUniformSet ( UniformSet us ) [inline]
void vl::Shader::setScissor ( Scissor scissor ) [inline]

Sets the Scissor to be used when rendering an Actor.

Note:
You can also define a Scissor on a per-Actor basis using the function Actor::setScissor(). In case both the Shader's and the Actor's Scissor are defined the Actor's Scissor is used.
See also:

Definition at line 1602 of file Shader.hpp.

const Scissor* vl::Shader::scissor (  ) const [inline]

Returns the Scissor to be used when rendering an Actor.

See also:

Definition at line 1611 of file Shader.hpp.

Referenced by vl::Renderer::render(), and vl::OcclusionCullRenderer::render_pass2().

Scissor* vl::Shader::scissor (  ) [inline]

Returns the Scissor to be used when rendering an Actor.

See also:

Definition at line 1620 of file Shader.hpp.

void vl::Shader::setShaderAnimator ( ShaderAnimator animator ) [inline]

Installs the ShaderAnimator used to update/animate a Shader (see vl::ShaderAnimator documentation).

Definition at line 1623 of file Shader.hpp.

ShaderAnimator* vl::Shader::shaderAnimator (  ) [inline]

Returns the ShaderAnimator used to update/animate a Shader (see vl::ShaderAnimator documentation).

Definition at line 1626 of file Shader.hpp.

Referenced by vl::Rendering::fillRenderQueue().

const ShaderAnimator* vl::Shader::shaderAnimator (  ) const [inline]

Returns the ShaderAnimator used to update/animate a Shader (see vl::ShaderAnimator documentation).

Definition at line 1629 of file Shader.hpp.

Real vl::Shader::lastUpdateTime (  ) const [inline]

Last time this Actor was animated/updated using a shaderAnimator().

Definition at line 1632 of file Shader.hpp.

Referenced by vl::Rendering::fillRenderQueue().

void vl::Shader::setLastUpdateTime ( Real  time ) [inline]

Used internally.

Definition at line 1635 of file Shader.hpp.

Referenced by vl::Rendering::fillRenderQueue().


Member Data Documentation

Definition at line 1648 of file Shader.hpp.

Referenced by operator=().

Definition at line 1649 of file Shader.hpp.

Referenced by operator=().

Definition at line 1650 of file Shader.hpp.

Referenced by operator=().

Definition at line 1651 of file Shader.hpp.

Referenced by operator=().

Definition at line 1652 of file Shader.hpp.

Referenced by operator=().

Definition at line 1653 of file Shader.hpp.

Referenced by Shader().


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

Visualization Library v2011.05.1142 Reference Documentation
Copyright 2005-2011 Michele Bosi. All rights reserved.
Updated on Thu May 26 2011 22:51:46.
Permission is granted to use this page to write and publish articles regarding Visualization Library.