PixelLightAPI  .
Public Member Functions
PLRenderer::EffectPass Class Reference

A effect pass will set the render states, textures etc. required for proper rendering of the given pass. More...

#include <EffectPass.h>

List of all members.

Public Member Functions

EffectTechniqueGetTechnique () const
 Returns the owner effect technique.
PLCore::String GetName () const
 Returns the pass name.
void SetName (const PLCore::String &sName="Pass")
 Sets the pass name.
PLRENDERER_API bool Bind (ParameterManager *pParameterManager=nullptr)
 Binds the pass.
PLRENDERER_API EffectPassoperator= (const EffectPass &cSource)
 Copy operator.
const PLGraphics::Color4GetColor () const
 Returns the general color.
void SetColor (const PLGraphics::Color4 &cColor=PLGraphics::Color4::White)
 Sets the general color.
RenderStatesGetRenderStates ()
 Returns the render states.
const RenderStatesGetRenderStates () const
FixedFunctionsRenderStatesGetFixedFunctionsRenderStates ()
 Returns the fixed functions render states.
const FixedFunctionsRenderStatesGetFixedFunctionsRenderStates () const
PLRENDERER_API void ResetMaterialStates ()
 Resets all material states to default.
PLCore::uint32 GetMaterialState (FixedFunctions::MaterialState::Enum nState) const
 Retrieves a material-state value.
bool SetMaterialState (FixedFunctions::MaterialState::Enum nState, PLCore::uint32 nValue)
 Sets a single material-state parameter.
PLCore::uint32 GetNumOfLayers () const
 Returns the number of texture layers.
PLRENDERER_API EffectPassLayerAddLayer ()
 Adds a new layer.
EffectPassLayerGetLayer (PLCore::uint32 nIndex=0) const
 Returns a layer.
PLRENDERER_API bool RemoveLayer (PLCore::uint32 nIndex=0)
 Removes a layer.
PLRENDERER_API void RemoveAllLayers ()
 Removes all layers.
PLRENDERER_API bool LoadVertexShader (const PLCore::String &sFilename, const PLCore::String &sShaderLanguage, const PLCore::String &sProfile="")
 Loads a vertex shader.
PLRENDERER_API bool LoadFragmentShader (const PLCore::String &sFilename, const PLCore::String &sShaderLanguage, const PLCore::String &sProfile="")
 Loads a fragment shader.
PLRENDERER_API ProgramGetProgram ()
 Returns the used GPU program.

Detailed Description

A effect pass will set the render states, textures etc. required for proper rendering of the given pass.


Member Function Documentation

Returns the owner effect technique.

Returns:
Owner effect technique

Returns the pass name.

Returns:
Pass name
void PLRenderer::EffectPass::SetName ( const PLCore::String sName = "Pass") [inline]

Sets the pass name.

Parameters:
[in]sNameNew pass name
PLRENDERER_API bool PLRenderer::EffectPass::Bind ( ParameterManager pParameterManager = nullptr)

Binds the pass.

Parameters:
[in]pParameterManagerParameters set instead of existing effect parameters, can be a null pointer
Returns:
'true' if all went fine, else 'false'
PLRENDERER_API EffectPass& PLRenderer::EffectPass::operator= ( const EffectPass cSource)

Copy operator.

Parameters:
[in]cSourceSource to copy from
Returns:
This instance

Returns the general color.

Returns:
General color

Sets the general color.

Parameters:
[in]cColorNew general color

Returns the render states.

Returns:
The render states

Returns the fixed functions render states.

Returns:
The fixed functions render states

Resets all material states to default.

Retrieves a material-state value.

Parameters:
[in]nStateState variable that is being queried. This parameter can be any member of the renderer material enumerated type.
Returns:
The value of the queried material state variable
bool PLRenderer::EffectPass::SetMaterialState ( FixedFunctions::MaterialState::Enum  nState,
PLCore::uint32  nValue 
) [inline]

Sets a single material-state parameter.

Parameters:
[in]nStateState variable that is being modified. This parameter can be any member of the renderer material enumerated type.
[in]nValueNew value for the material state to be set. You can also set the value to unknown - then this state is ignored.
Returns:
'true' if all went fine, else 'false'
PLCore::uint32 PLRenderer::EffectPass::GetNumOfLayers ( ) const [inline]

Returns the number of texture layers.

Returns:
Number of texture layers

Adds a new layer.

Returns:
The new effect pass layer, a null pointer on error
EffectPassLayer * PLRenderer::EffectPass::GetLayer ( PLCore::uint32  nIndex = 0) const [inline]

Returns a layer.

Parameters:
[in]nIndexLayer index
Returns:
Effect pass layer, a null pointer if there was an error
PLRENDERER_API bool PLRenderer::EffectPass::RemoveLayer ( PLCore::uint32  nIndex = 0)

Removes a layer.

Parameters:
[in]nIndexIndex of the layer to remove
Returns:
'true' if all went fine, else 'false'
PLRENDERER_API void PLRenderer::EffectPass::RemoveAllLayers ( )

Removes all layers.

PLRENDERER_API bool PLRenderer::EffectPass::LoadVertexShader ( const PLCore::String sFilename,
const PLCore::String sShaderLanguage,
const PLCore::String sProfile = "" 
)

Loads a vertex shader.

Parameters:
[in]sFilenameShader filename
[in]sShaderLanguageShader language to use (for example "GLSL" or "Cg")
[in]sProfileProfile that should be used (e.g. "arbvp1")
Returns:
'true' if all went fine, else 'false'
PLRENDERER_API bool PLRenderer::EffectPass::LoadFragmentShader ( const PLCore::String sFilename,
const PLCore::String sShaderLanguage,
const PLCore::String sProfile = "" 
)

Loads a fragment shader.

Parameters:
[in]sFilenameShader filename
[in]sShaderLanguageShader language to use (for example "GLSL" or "Cg")
[in]sProfileProfile that should be used (e.g. "arbfp1")
Returns:
'true' if all went fine, else 'false'

Returns the used GPU program.

Returns:
The used GPU program, a null pointer if there's no such GPU program

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


PixelLight PixelLight 0.9.10-R1
Copyright (C) 2002-2011 by The PixelLight Team
Last modified Fri Dec 23 2011 15:51:22
The content of this PixelLight document is published under the
Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported