PixelLightAPI  .
Public Member Functions
PLRenderer::Effect Class Reference

Effect resource class. More...

#include <Effect.h>

Inheritance diagram for PLRenderer::Effect:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual PLRENDERER_API ~Effect ()
 Destructor.
EffectManagerGetEffectManager () const
 Returns the effect manager this effect is in.
ParameterManagerGetParameterManager () const
 Returns the parameter manager of the effect.
bool GetBlend () const
 Returns whether the effect should be blend or not.
void SetBlend (bool bBlend=false)
 Activates/deactivates the effect blending.
bool IsLoaded () const
 Returns whether the effect is loaded or not.
PLRENDERER_API Effectoperator= (const Effect &cSource)
 Copy operator.
PLCore::uint32 GetFlags () const
 Returns the flags.
void SetFlags (PLCore::uint32 nFlags=0)
 Sets the flags.
PLCore::uint32 GetNumOfTechniques () const
 Gets the number of techniques.
PLRENDERER_API EffectTechniqueAddTechnique (int nTechnique=-1)
 Adds a technique.
EffectTechniqueGetTechnique (PLCore::uint32 nIndex) const
 Gets a technique.
PLRENDERER_API bool RemoveTechnique (int nTechnique=-1)
 Removes a technique.
PLRENDERER_API void RemoveAllTechniques ()
 Removes all techniques.
EffectTechniqueGetSelectedTechnique () const
 Gets the current selected technique.
int GetSelectedTechniqueIndex () const
 Gets the index of the current selected technique.
bool SelectTechnique (PLCore::uint32 nIndex=0)
 Select the current technique by index.
PLRENDERER_API bool SelectTechnique (const PLCore::String &sName)
 Select the current technique by name.
virtual PLRENDERER_API bool Reload () override
 Reloads the loadable.
virtual PLRENDERER_API bool Unload () override
 Unloads the loadable.
virtual PLRENDERER_API
PLCore::String 
GetLoadableTypeName () const override
 Returns the loadable type name.

Detailed Description

Effect resource class.

Remarks:
A effect is a powerful rendering description. It will manage the different render techniques. Each effect can have parameters to interact with the vertex/shader programs some technique passes may use. Each parameter is mapped to the corresponding shader parameter. Have a look at 'ParameterManager.h' for more information.

Constructor & Destructor Documentation

virtual PLRENDERER_API PLRenderer::Effect::~Effect ( ) [virtual]

Destructor.


Member Function Documentation

Returns the effect manager this effect is in.

Returns:
The effect manager this effect is in

Returns the parameter manager of the effect.

Returns:
The parameter manager of the effect
bool PLRenderer::Effect::GetBlend ( ) const [inline]

Returns whether the effect should be blend or not.

Returns:
'true' if the pass should be blend, else 'false'
Remarks:
This only a general setting whether the effect is blend or not. Because transparent objects should be rendered after all solid objects this setting indicates when the object should be rendered.
void PLRenderer::Effect::SetBlend ( bool  bBlend = false) [inline]

Activates/deactivates the effect blending.

Parameters:
[in]bBlendShould the effect be blended?
See also:
bool PLRenderer::Effect::IsLoaded ( ) const [inline]

Returns whether the effect is loaded or not.

Returns:
'true' if the effect is loaded, else 'false'
PLRENDERER_API Effect& PLRenderer::Effect::operator= ( const Effect cSource)

Copy operator.

Parameters:
[in]cSourceSource to copy from
Returns:
This instance
PLCore::uint32 PLRenderer::Effect::GetFlags ( ) const [inline]

Returns the flags.

Returns:
Flags
void PLRenderer::Effect::SetFlags ( PLCore::uint32  nFlags = 0) [inline]

Sets the flags.

Parameters:
[in]nFlagsFlags
PLCore::uint32 PLRenderer::Effect::GetNumOfTechniques ( ) const [inline]

Gets the number of techniques.

Returns:
The number of techniques
PLRENDERER_API EffectTechnique* PLRenderer::Effect::AddTechnique ( int  nTechnique = -1)

Adds a technique.

Parameters:
[in]nTechniqueIndex where the new technique should be added, if < 0 the add at the end
Returns:
The new effect technique, a null pointer on error
EffectTechnique * PLRenderer::Effect::GetTechnique ( PLCore::uint32  nIndex) const [inline]

Gets a technique.

Parameters:
[in]nIndexIndex of the technique to return
Returns:
The effect technique, a null pointer on error
PLRENDERER_API bool PLRenderer::Effect::RemoveTechnique ( int  nTechnique = -1)

Removes a technique.

Parameters:
[in]nTechniqueIndex of the technique to remove, if < 0 the current selected technique is chosen
Returns:
'true' if all went fine, else 'false'
PLRENDERER_API void PLRenderer::Effect::RemoveAllTechniques ( )

Removes all techniques.

Gets the current selected technique.

Returns:
The current selected technique, a null pointer if no technique is selected

Gets the index of the current selected technique.

Returns:
Index of the current selected technique, < 0 if no technique is selected
bool PLRenderer::Effect::SelectTechnique ( PLCore::uint32  nIndex = 0) [inline]

Select the current technique by index.

Parameters:
[in]nIndexTechnique index
Returns:
'true' if all went fine, else 'false' (invalid or unknown technique)
PLRENDERER_API bool PLRenderer::Effect::SelectTechnique ( const PLCore::String sName)

Select the current technique by name.

Parameters:
[in]sNameTechnique name
Returns:
'true' if all went fine, else 'false' (invalid or unknown technique)
virtual PLRENDERER_API bool PLRenderer::Effect::Reload ( ) [override, virtual]

Reloads the loadable.

Returns:
'true' if all went fine, else 'false' (maybe there's nothing loaded?)
Note:
  • Same as pLoadable->Load(pLoadable->GetAbsFilename())

Reimplemented from PLCore::Loadable.

virtual PLRENDERER_API bool PLRenderer::Effect::Unload ( ) [override, virtual]

Unloads the loadable.

Returns:
'true' if all went fine, else 'false'

Reimplemented from PLCore::Loadable.

virtual PLRENDERER_API PLCore::String PLRenderer::Effect::GetLoadableTypeName ( ) const [override, virtual]

Returns the loadable type name.

Returns:
The loadable type name

Reimplemented from PLCore::Loadable.


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


PixelLight PixelLight 0.9.11-R1
Copyright (C) 2002-2012 by The PixelLight Team
Last modified Thu Feb 23 2012 14:09:38
The content of this PixelLight document is published under the
Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported