Visualization Library v1.0.3

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

VL     Star     Watch     Fork     Issue

[Download] [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

 Shader ()
 Constructor.
virtual ~Shader ()
 Destructor.
ref< ShadershallowCopy () const
 Returns the shallow copy of a Shader.
ShadershallowCopyFrom (const Shader &other)
 Performs a shallow copy from the given Shader.
ref< ShaderdeepCopy () const
 Returns the deep copy of a Shader.
ShaderdeepCopyFrom (const Shader &other)
 Performs a deep copy from the given 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 ()
ColorgocColor ()
const ColorgetColor () const
ColorgetColor ()
SecondaryColorgocSecondaryColor ()
const SecondaryColorgetSecondaryColor () const
SecondaryColorgetSecondaryColor ()
NormalgocNormal ()
const NormalgetNormal () const
NormalgetNormal ()
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 ()
VertexAttribgocVertexAttrib (int attr_index)
const VertexAttribgetVertexAttrib (int attr_index) const
VertexAttribgetVertexAttrib (int attr_index)
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)
TextureSamplergocTextureSampler (int unit_index)
const TextureSamplergetTextureSampler (int unit_index) const
TextureSamplergetTextureSampler (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 isBlendingEnabled () const
void setRenderState (RenderStateNonIndexed *renderstate)
void setRenderState (RenderState *renderstate, int index)
const RenderStaterenderState (ERenderState type, int index=0) const
RenderStaterenderState (ERenderState type, int index=0)
size_t renderStatesCount () const
const RenderStateSlotrenderStates () const
RenderStateSlotrenderStates ()
void eraseRenderState (ERenderState type, int index=-1)
 If index == -1 all the renderstates of the given type are removed regardless of their binding index.
void eraseRenderState (RenderState *rs, int index)
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 char *name)
 Equivalent to gocUniformSet()->eraseUniform(...)
void eraseUniform (const Uniform *uniform)
 Equivalent to gocUniformSet()->eraseUniform(...)
void eraseAllUniforms ()
 Equivalent to gocUniformSet()->eraseAllUniforms(...)
UniformgocUniform (const char *name)
 Equivalent to gocUniformSet()->gocUniform(...)
UniformgetUniform (const char *name)
 Equivalent to gocUniformSet()->getUniform(...)
const UniformgetUniform (const char *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 1838 of file Shader.hpp.


Constructor & Destructor Documentation

Shader::Shader (  )

Constructor.

Definition at line 45 of file Shader.cpp.

References mLastUpdateTime, NULL, and VL_DEBUG_SET_OBJECT_NAME.

Shader::~Shader (  ) [virtual]

Destructor.

Definition at line 55 of file Shader.cpp.


Member Function Documentation

ref<Shader> vl::Shader::shallowCopy (  ) const [inline]

Returns the shallow copy of a Shader.

Definition at line 1854 of file Shader.hpp.

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

Performs a shallow copy from the given Shader.

The render states and the uniforms are shallow-copied however the Shader retains its own RenderStateSet, UniformSet and EnableSet.

Definition at line 1863 of file Shader.hpp.

References vl::ref< T >::get(), mEnableSet, mRenderStateSet, mScissor, mShaderAnimator, mUniformSet, NULL, vl::UniformSet::shallowCopyFrom(), and vl::RenderStateSet::shallowCopyFrom().

ref<Shader> vl::Shader::deepCopy (  ) const [inline]

Returns the deep copy of a Shader.

Definition at line 1909 of file Shader.hpp.

Shader& vl::Shader::deepCopyFrom ( const Shader other ) [inline]
void vl::Shader::reset (  ) [inline]

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

Definition at line 1964 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 1983 of file Shader.hpp.

References NULL, and vl::RS_PixelTransfer.

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

Definition at line 1984 of file Shader.hpp.

References NULL, and 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 1987 of file Shader.hpp.

References NULL, and vl::RS_Hint.

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

Definition at line 1988 of file Shader.hpp.

References NULL, and 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 1991 of file Shader.hpp.

References NULL, and vl::RS_CullFace.

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

Definition at line 1992 of file Shader.hpp.

References NULL, and 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 1995 of file Shader.hpp.

References NULL, and vl::RS_FrontFace.

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

Definition at line 1996 of file Shader.hpp.

References NULL, and 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 1999 of file Shader.hpp.

References NULL, and vl::RS_DepthFunc.

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

Definition at line 2000 of file Shader.hpp.

References NULL, and 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 2003 of file Shader.hpp.

References NULL, and vl::RS_DepthMask.

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

Definition at line 2004 of file Shader.hpp.

References NULL, and vl::RS_DepthMask.

Color * Shader::gocColor (  )

Definition at line 103 of file Shader.cpp.

References GET_OR_CREATE.

const Color* vl::Shader::getColor (  ) const [inline]

Definition at line 2007 of file Shader.hpp.

References NULL, and vl::RS_Color.

Color* vl::Shader::getColor (  ) [inline]

Definition at line 2008 of file Shader.hpp.

References NULL, and vl::RS_Color.

SecondaryColor * Shader::gocSecondaryColor (  )

Definition at line 105 of file Shader.cpp.

References GET_OR_CREATE.

const SecondaryColor* vl::Shader::getSecondaryColor (  ) const [inline]

Definition at line 2011 of file Shader.hpp.

References NULL, and vl::RS_SecondaryColor.

SecondaryColor* vl::Shader::getSecondaryColor (  ) [inline]

Definition at line 2012 of file Shader.hpp.

References NULL, and vl::RS_SecondaryColor.

Normal * Shader::gocNormal (  )

Definition at line 107 of file Shader.cpp.

References GET_OR_CREATE.

const Normal* vl::Shader::getNormal (  ) const [inline]

Definition at line 2015 of file Shader.hpp.

References NULL, and vl::RS_Normal.

Normal* vl::Shader::getNormal (  ) [inline]

Definition at line 2016 of file Shader.hpp.

References NULL, and vl::RS_Normal.

ColorMask * Shader::gocColorMask (  )

Definition at line 109 of file Shader.cpp.

References GET_OR_CREATE.

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

Definition at line 2019 of file Shader.hpp.

References NULL, and vl::RS_ColorMask.

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

Definition at line 2020 of file Shader.hpp.

References NULL, and vl::RS_ColorMask.

PolygonMode * Shader::gocPolygonMode (  )

Definition at line 111 of file Shader.cpp.

References GET_OR_CREATE.

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

Definition at line 2023 of file Shader.hpp.

References NULL, and vl::RS_PolygonMode.

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

Definition at line 2024 of file Shader.hpp.

References NULL, and vl::RS_PolygonMode.

ShadeModel * Shader::gocShadeModel (  )

Definition at line 113 of file Shader.cpp.

References GET_OR_CREATE.

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

Definition at line 2027 of file Shader.hpp.

References NULL, and vl::RS_ShadeModel.

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

Definition at line 2028 of file Shader.hpp.

References NULL, and vl::RS_ShadeModel.

BlendEquation * Shader::gocBlendEquation (  )

Definition at line 115 of file Shader.cpp.

References GET_OR_CREATE.

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

Definition at line 2031 of file Shader.hpp.

References NULL, and vl::RS_BlendEquation.

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

Definition at line 2032 of file Shader.hpp.

References NULL, and vl::RS_BlendEquation.

AlphaFunc * Shader::gocAlphaFunc (  )

Definition at line 117 of file Shader.cpp.

References GET_OR_CREATE.

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

Definition at line 2035 of file Shader.hpp.

References NULL, and vl::RS_AlphaFunc.

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

Definition at line 2036 of file Shader.hpp.

References NULL, and vl::RS_AlphaFunc.

Material * Shader::gocMaterial (  )

Definition at line 119 of file Shader.cpp.

References GET_OR_CREATE.

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

Definition at line 2039 of file Shader.hpp.

References NULL, and vl::RS_Material.

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

Definition at line 2040 of file Shader.hpp.

References NULL, and vl::RS_Material.

LightModel * Shader::gocLightModel (  )

Definition at line 121 of file Shader.cpp.

References GET_OR_CREATE.

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

Definition at line 2043 of file Shader.hpp.

References NULL, and vl::RS_LightModel.

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

Definition at line 2044 of file Shader.hpp.

References NULL, and vl::RS_LightModel.

Fog * Shader::gocFog (  )

Definition at line 123 of file Shader.cpp.

References GET_OR_CREATE.

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

Definition at line 2047 of file Shader.hpp.

References NULL, and vl::RS_Fog.

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

Definition at line 2048 of file Shader.hpp.

References NULL, and vl::RS_Fog.

PolygonOffset * Shader::gocPolygonOffset (  )

Definition at line 125 of file Shader.cpp.

References GET_OR_CREATE.

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

Definition at line 2051 of file Shader.hpp.

References NULL, and vl::RS_PolygonOffset.

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

Definition at line 2052 of file Shader.hpp.

References NULL, and vl::RS_PolygonOffset.

LogicOp * Shader::gocLogicOp (  )

Definition at line 127 of file Shader.cpp.

References GET_OR_CREATE.

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

Definition at line 2055 of file Shader.hpp.

References NULL, and vl::RS_LogicOp.

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

Definition at line 2056 of file Shader.hpp.

References NULL, and vl::RS_LogicOp.

DepthRange * Shader::gocDepthRange (  )

Definition at line 129 of file Shader.cpp.

References GET_OR_CREATE.

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

Definition at line 2059 of file Shader.hpp.

References NULL, and vl::RS_DepthRange.

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

Definition at line 2060 of file Shader.hpp.

References NULL, and vl::RS_DepthRange.

LineWidth * Shader::gocLineWidth (  )

Definition at line 131 of file Shader.cpp.

References GET_OR_CREATE.

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

Definition at line 2063 of file Shader.hpp.

References NULL, and vl::RS_LineWidth.

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

Definition at line 2064 of file Shader.hpp.

References NULL, and vl::RS_LineWidth.

PointSize * Shader::gocPointSize (  )

Definition at line 133 of file Shader.cpp.

References GET_OR_CREATE.

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

Definition at line 2067 of file Shader.hpp.

References NULL, and vl::RS_PointSize.

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

Definition at line 2068 of file Shader.hpp.

References NULL, and vl::RS_PointSize.

LineStipple * Shader::gocLineStipple (  )

Definition at line 135 of file Shader.cpp.

References GET_OR_CREATE.

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

Definition at line 2071 of file Shader.hpp.

References NULL, and vl::RS_LineStipple.

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

Definition at line 2072 of file Shader.hpp.

References NULL, and vl::RS_LineStipple.

PolygonStipple * Shader::gocPolygonStipple (  )

Definition at line 137 of file Shader.cpp.

References GET_OR_CREATE.

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

Definition at line 2075 of file Shader.hpp.

References NULL, and vl::RS_PolygonStipple.

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

Definition at line 2076 of file Shader.hpp.

References NULL, and vl::RS_PolygonStipple.

PointParameter * Shader::gocPointParameter (  )

Definition at line 139 of file Shader.cpp.

References GET_OR_CREATE.

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

Definition at line 2079 of file Shader.hpp.

References NULL, and vl::RS_PointParameter.

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

Definition at line 2080 of file Shader.hpp.

References NULL, and vl::RS_PointParameter.

StencilFunc * Shader::gocStencilFunc (  )

Definition at line 141 of file Shader.cpp.

References GET_OR_CREATE.

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

Definition at line 2083 of file Shader.hpp.

References NULL, and vl::RS_StencilFunc.

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

Definition at line 2084 of file Shader.hpp.

References NULL, and vl::RS_StencilFunc.

StencilOp * Shader::gocStencilOp (  )

Definition at line 143 of file Shader.cpp.

References GET_OR_CREATE.

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

Definition at line 2087 of file Shader.hpp.

References NULL, and vl::RS_StencilOp.

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

Definition at line 2088 of file Shader.hpp.

References NULL, and vl::RS_StencilOp.

StencilMask * Shader::gocStencilMask (  )

Definition at line 145 of file Shader.cpp.

References GET_OR_CREATE.

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

Definition at line 2091 of file Shader.hpp.

References NULL, and vl::RS_StencilMask.

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

Definition at line 2092 of file Shader.hpp.

References NULL, and vl::RS_StencilMask.

BlendColor * Shader::gocBlendColor (  )

Definition at line 147 of file Shader.cpp.

References GET_OR_CREATE.

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

Definition at line 2095 of file Shader.hpp.

References NULL, and vl::RS_BlendColor.

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

Definition at line 2096 of file Shader.hpp.

References NULL, and vl::RS_BlendColor.

BlendFunc * Shader::gocBlendFunc (  )

Definition at line 149 of file Shader.cpp.

References GET_OR_CREATE.

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

Definition at line 2099 of file Shader.hpp.

References NULL, and vl::RS_BlendFunc.

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

Definition at line 2100 of file Shader.hpp.

References NULL, and vl::RS_BlendFunc.

SampleCoverage * Shader::gocSampleCoverage (  )

Definition at line 151 of file Shader.cpp.

References GET_OR_CREATE.

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

Definition at line 2103 of file Shader.hpp.

References NULL, and vl::RS_SampleCoverage.

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

Definition at line 2104 of file Shader.hpp.

References NULL, and vl::RS_SampleCoverage.

VertexAttrib * Shader::gocVertexAttrib ( int  attr_index )

Definition at line 153 of file Shader.cpp.

References GET_OR_CREATE_IDX.

const VertexAttrib * Shader::getVertexAttrib ( int  attr_index ) const
VertexAttrib * Shader::getVertexAttrib ( int  attr_index )
Light * Shader::gocLight ( int  light_index )

Definition at line 159 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 163 of file Shader.cpp.

References getRenderStateSet(), NULL, vl::RenderStateSet::renderState(), and vl::RS_Light.

ClipPlane * Shader::gocClipPlane ( int  plane_index )

Definition at line 165 of file Shader.cpp.

References GET_OR_CREATE_IDX.

const ClipPlane * Shader::getClipPlane ( int  plane_index ) const
ClipPlane * Shader::getClipPlane ( int  plane_index )
TextureSampler * Shader::gocTextureSampler ( int  unit_index )

Definition at line 171 of file Shader.cpp.

References GET_OR_CREATE_IDX.

const TextureSampler* vl::Shader::getTextureSampler ( int  unit_index ) const [inline]

Definition at line 2136 of file Shader.hpp.

References vl::RS_TextureSampler.

TextureSampler* vl::Shader::getTextureSampler ( int  unit_index ) [inline]

Definition at line 2138 of file Shader.hpp.

References vl::RS_TextureSampler.

TexEnv * Shader::gocTexEnv ( int  unit_index )

Definition at line 175 of file Shader.cpp.

References GET_OR_CREATE_IDX.

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

Definition at line 2144 of file Shader.hpp.

References vl::RS_TexEnv.

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

Definition at line 2146 of file Shader.hpp.

References vl::RS_TexEnv.

TexGen * Shader::gocTexGen ( int  unit_index )

Definition at line 173 of file Shader.cpp.

References GET_OR_CREATE_IDX.

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

Definition at line 2152 of file Shader.hpp.

References vl::RS_TexGen.

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

Definition at line 2154 of file Shader.hpp.

References vl::RS_TexGen.

TextureMatrix * Shader::gocTextureMatrix ( int  unit_index )

Definition at line 177 of file Shader.cpp.

References GET_OR_CREATE_IDX.

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

Definition at line 2160 of file Shader.hpp.

References vl::RS_TextureMatrix.

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

Definition at line 2162 of file Shader.hpp.

References vl::RS_TextureMatrix.

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

Definition at line 2168 of file Shader.hpp.

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

Definition at line 2170 of file Shader.hpp.

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

Definition at line 2172 of file Shader.hpp.

Referenced by vl::DaeLoader::load().

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

Definition at line 2174 of file Shader.hpp.

bool vl::Shader::isBlendingEnabled (  ) const [inline]
void vl::Shader::setRenderState ( RenderStateNonIndexed renderstate ) [inline]

Definition at line 2180 of file Shader.hpp.

Referenced by vl::VLXClassWrapper_Shader::importShader().

void vl::Shader::setRenderState ( RenderState renderstate,
int  index 
) [inline]

Definition at line 2182 of file Shader.hpp.

const RenderState* vl::Shader::renderState ( ERenderState  type,
int  index = 0 
) const [inline]

Definition at line 2184 of file Shader.hpp.

References NULL.

RenderState* vl::Shader::renderState ( ERenderState  type,
int  index = 0 
) [inline]

Definition at line 2186 of file Shader.hpp.

size_t vl::Shader::renderStatesCount (  ) const [inline]

Definition at line 2188 of file Shader.hpp.

const RenderStateSlot* vl::Shader::renderStates (  ) const [inline]

Definition at line 2190 of file Shader.hpp.

RenderStateSlot* vl::Shader::renderStates (  ) [inline]

Definition at line 2192 of file Shader.hpp.

void vl::Shader::eraseRenderState ( ERenderState  type,
int  index = -1 
) [inline]

If index == -1 all the renderstates of the given type are removed regardless of their binding index.

Definition at line 2195 of file Shader.hpp.

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

Definition at line 2197 of file Shader.hpp.

References vl::RenderState::type().

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

Definition at line 2199 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 2205 of file Shader.hpp.

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

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

Definition at line 2210 of file Shader.hpp.

References VL_CHECK.

Referenced by vl::VLXClassWrapper_Shader::importShader().

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

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

Definition at line 2213 of file Shader.hpp.

Referenced by vl::VLXClassWrapper_Shader::exportShader().

void vl::Shader::eraseUniform ( const char *  name ) [inline]

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

Definition at line 2216 of file Shader.hpp.

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

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

Definition at line 2219 of file Shader.hpp.

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

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

Definition at line 2222 of file Shader.hpp.

Uniform* vl::Shader::gocUniform ( const char *  name ) [inline]

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

Definition at line 2225 of file Shader.hpp.

Uniform* vl::Shader::getUniform ( const char *  name ) [inline]

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

Definition at line 2228 of file Shader.hpp.

References vl::Uniform::getUniform().

const Uniform* vl::Shader::getUniform ( const char *  name ) const [inline]

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

Definition at line 2231 of file Shader.hpp.

References vl::Uniform::getUniform().

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

Definition at line 2235 of file Shader.hpp.

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

Definition at line 2239 of file Shader.hpp.

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

Definition at line 2241 of file Shader.hpp.

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

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

Definition at line 2245 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 2257 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 2283 of file Shader.hpp.

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

Definition at line 2285 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 2308 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 2317 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 2326 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 2329 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 2332 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 2335 of file Shader.hpp.

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

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

Definition at line 2338 of file Shader.hpp.

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

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

Used internally.

Definition at line 2341 of file Shader.hpp.

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


Member Data Documentation

Definition at line 2354 of file Shader.hpp.

Referenced by deepCopyFrom(), and shallowCopyFrom().

Definition at line 2355 of file Shader.hpp.

Referenced by deepCopyFrom(), and shallowCopyFrom().

Definition at line 2356 of file Shader.hpp.

Referenced by deepCopyFrom(), and shallowCopyFrom().

Definition at line 2357 of file Shader.hpp.

Referenced by deepCopyFrom(), and shallowCopyFrom().

Definition at line 2358 of file Shader.hpp.

Referenced by deepCopyFrom(), and shallowCopyFrom().

Definition at line 2359 of file Shader.hpp.

Referenced by Shader().


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

Visualization Library v1.0.3 Reference Documentation
Copyright Michele Bosi. All rights reserved.
Updated on Tue Feb 7 2017 00:55:12.
Permission is granted to use this page to write and publish articles regarding Visualization Library.