| OGRE 1.11.1 Object-Oriented Graphics Rendering Engine

Public Types | Public Member Functions | Static Public Member Functions | Friends | List of all members
Ogre::RTShader::Function Class Reference
Optional Components » RTShaderSystem

A class that represents a shader based program function. More...

`#include <OgreShaderFunction.h>`

Inheritance diagram for Ogre::RTShader::Function:
[legend]

## Public Types
enum | FunctionType { FFT_INTERNAL, FFT_VS_MAIN, FFT_PS_MAIN }

## Public Member Functions
void | addAtomAssign (ParameterPtr lhs, ParameterPtr rhs, int groupOrder)
| shorthand for a simple assignment "a = b;" More...
void | addAtomInstance (FunctionAtom *atomInstance)
| Add a function atom instance to this function. More...
void | addInputParameter (ParameterPtr parameter)
| Add input parameter to this function. More...
void | addOutputParameter (ParameterPtr parameter)
| Add output parameter to this function. More...
void | deleteAllInputParameters ()
| Delete all input parameters from this function. More...
void | deleteAllOutputParameters ()
| Delete all output parameters from this function. More...
bool | deleteAtomInstance (FunctionAtom *atomInstance)
| Delete a function atom instance from this function. More...
void | deleteInputParameter (ParameterPtr parameter)
| Delete input parameter from this function. More...
void | deleteOutputParameter (ParameterPtr parameter)
| Delete output parameter from this function. More...
const FunctionAtomInstanceList & | getAtomInstances ()
| Return list of atom instances composing this function. More...
const String & | getDescription () const
| Get the description of this function. More...
FunctionType | getFunctionType () const
| get function type. More...
const ShaderParameterList & | getInputParameters () const
| Return a list of input parameters. More...
const ShaderParameterList & | getLocalParameters () const
| Return a list of local parameters. More...
const String & | getName () const
| Get the name of this function. More...
const ShaderParameterList & | getOutputParameters () const
| Return a list of output parameters. More...
ParameterPtr | getParameterByContent (const ShaderParameterList &parameterList, const Parameter::Content content, GpuConstantType type)
| Get parameter by a given content and type from the given parameter list. More...
ParameterPtr | resolveInputParameter (Parameter::Semantic semantic, int index, const Parameter::Content content, GpuConstantType type)
| Resolve input parameter of this function. More...
ParameterPtr | resolveLocalParameter (Parameter::Semantic semantic, int index, const String &name, GpuConstantType type)
| Resolve local parameter of this function More...
ParameterPtr | resolveLocalParameter (Parameter::Semantic semantic, int index, const Parameter::Content content, GpuConstantType type)
| Resolve local parameter of this function More...
ParameterPtr | resolveOutputParameter (Parameter::Semantic semantic, int index, const Parameter::Content content, GpuConstantType type)
| Resolve output parameter of this function. More...

## Static Public Member Functions
static ParameterPtr | getParameterByName (const ShaderParameterList &parameterList, const String &name)
| Get parameter by a given name from the given parameter list. More...
static ParameterPtr | getParameterBySemantic (const ShaderParameterList &parameterList, const Parameter::Semantic semantic, int index)
| Get parameter by a given semantic and index from the given parameter list. More...

## Friends
class | Program

## Detailed Description

A class that represents a shader based program function.

## Member Enumeration Documentation

## ◆ FunctionType

enum Ogre::RTShader::Function::FunctionType

Enumerator
FFT_INTERNAL |
FFT_VS_MAIN |
FFT_PS_MAIN |

## Member Function Documentation

## ◆ getName()

const String& Ogre::RTShader::Function::getName | ( | void |  | ) | const
| inline

Get the name of this function.

## ◆ getDescription()

const String& Ogre::RTShader::Function::getDescription | ( |  | ) | const
| inline

Get the description of this function.

## ◆ resolveInputParameter()

ParameterPtr Ogre::RTShader::Function::resolveInputParameter | ( | Parameter::Semantic | semantic,
|  | int | index,
|  | const Parameter::Content | content,
|  | GpuConstantType | type
| ) |  |

Resolve input parameter of this function.

Parameters

  semantic | The desired parameter semantic.
  index | The index of the desired parameter.
  content | The content of the parameter.
  type | The type of the desired parameter. Return parameter instance in case of that resolve operation succeeded.

Remarks
  Pass -1 as index parameter to create a new parameter with the desired semantic and type.

## ◆ resolveOutputParameter()

ParameterPtr Ogre::RTShader::Function::resolveOutputParameter | ( | Parameter::Semantic | semantic,
|  | int | index,
|  | const Parameter::Content | content,
|  | GpuConstantType | type
| ) |  |

Resolve output parameter of this function.

Parameters

  semantic | The desired parameter semantic.
  index | The index of the desired parameter.
  content | The content of the parameter.
  type | The type of the desired parameter. Return parameter instance in case of that resolve operation succeeded.

Remarks
  Pass -1 as index parameter to create a new parameter with the desired semantic and type.

## ◆ resolveLocalParameter() [1/2]

ParameterPtr Ogre::RTShader::Function::resolveLocalParameter | ( | Parameter::Semantic | semantic,
|  | int | index,
|  | const String & | name,
|  | GpuConstantType | type
| ) |  |

Resolve local parameter of this function

Parameters

  semantic | The desired parameter semantic.
  index | The index of the desired parameter.
  name | The name of the parameter.
  type | The type of the desired parameter. Return parameter instance in case of that resolve operation succeeded.

## ◆ resolveLocalParameter() [2/2]

ParameterPtr Ogre::RTShader::Function::resolveLocalParameter | ( | Parameter::Semantic | semantic,
|  | int | index,
|  | const Parameter::Content | content,
|  | GpuConstantType | type
| ) |  |

Resolve local parameter of this function

Parameters

  semantic | The desired parameter semantic.
  index | The index of the desired parameter.
  content | The content of the parameter.
  type | The type of the desired parameter. Return parameter instance in case of that resolve operation succeeded.

## ◆ getParameterByName()

static ParameterPtr Ogre::RTShader::Function::getParameterByName | ( | const ShaderParameterList & | parameterList,
|  | const String & | name
| ) |  |
| static

Get parameter by a given name from the given parameter list.

Parameters

  parameterList | The parameters list to look in.
  name | The name of the parameter to search in the list.

Remarks
  Return NULL if no matching parameter found.

## ◆ getParameterBySemantic()

static ParameterPtr Ogre::RTShader::Function::getParameterBySemantic | ( | const ShaderParameterList & | parameterList,
|  | const Parameter::Semantic | semantic,
|  | int | index
| ) |  |
| static

Get parameter by a given semantic and index from the given parameter list.

Parameters

  parameterList | The parameters list to look in.
  semantic | The semantic of the parameter to search in the list.
  index | The index of the parameter to search in the list.

Remarks
  Return NULL if no matching parameter found.

## ◆ getParameterByContent()

ParameterPtr Ogre::RTShader::Function::getParameterByContent | ( | const ShaderParameterList & | parameterList,
|  | const Parameter::Content | content,
|  | GpuConstantType | type
| ) |  |

Get parameter by a given content and type from the given parameter list.

Parameters

  parameterList | The parameters list to look in.
  content | The content of the parameter to search in the list.
  type | The type of the parameter to search in the list.

Remarks
  Return NULL if no matching parameter found.

## ◆ getInputParameters()

const ShaderParameterList& Ogre::RTShader::Function::getInputParameters | ( |  | ) | const
| inline

Return a list of input parameters.

## ◆ getOutputParameters()

const ShaderParameterList& Ogre::RTShader::Function::getOutputParameters | ( |  | ) | const
| inline

Return a list of output parameters.

## ◆ getLocalParameters()

const ShaderParameterList& Ogre::RTShader::Function::getLocalParameters | ( |  | ) | const
| inline

Return a list of local parameters.

## ◆ addAtomInstance()

void Ogre::RTShader::Function::addAtomInstance | ( | FunctionAtom * | atomInstance | ) |

Add a function atom instance to this function.

Parameters

  atomInstance | The atom instance to add.

## ◆ addAtomAssign()

void Ogre::RTShader::Function::addAtomAssign | ( | ParameterPtr | lhs,
|  | ParameterPtr | rhs,
|  | int | groupOrder
| ) |  |

shorthand for a simple assignment "a = b;"

## ◆ deleteAtomInstance()

bool Ogre::RTShader::Function::deleteAtomInstance | ( | FunctionAtom * | atomInstance | ) |

Delete a function atom instance from this function.

Parameters

  atomInstance | The atom instance to OGRE_DELETE.

## ◆ getAtomInstances()

const FunctionAtomInstanceList& Ogre::RTShader::Function::getAtomInstances | ( |  | ) |

Return list of atom instances composing this function.

(Const version)

## ◆ addInputParameter()

void Ogre::RTShader::Function::addInputParameter | ( | ParameterPtr | parameter | ) |

Add input parameter to this function.

## ◆ addOutputParameter()

void Ogre::RTShader::Function::addOutputParameter | ( | ParameterPtr | parameter | ) |

Add output parameter to this function.

## ◆ deleteInputParameter()

void Ogre::RTShader::Function::deleteInputParameter | ( | ParameterPtr | parameter | ) |

Delete input parameter from this function.

## ◆ deleteOutputParameter()

void Ogre::RTShader::Function::deleteOutputParameter | ( | ParameterPtr | parameter | ) |

Delete output parameter from this function.

## ◆ deleteAllInputParameters()

void Ogre::RTShader::Function::deleteAllInputParameters | ( |  | ) |

Delete all input parameters from this function.

## ◆ deleteAllOutputParameters()

void Ogre::RTShader::Function::deleteAllOutputParameters | ( |  | ) |

Delete all output parameters from this function.

## ◆ getFunctionType()

FunctionType Ogre::RTShader::Function::getFunctionType | ( |  | ) | const

get function type.

## Friends And Related Function Documentation

## ◆ Program

friend class Program
| friend

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

- OgreShaderFunction.h