OGRE  1.11.6
Object-Oriented Graphics Rendering Engine
Ogre::RTShader::Function Class Reference

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

#include <OgreShaderFunction.h>

+ Inheritance diagram for Ogre::RTShader::Function:

Public Types

enum  FunctionType { FFT_INTERNAL, FFT_VS_MAIN, FFT_PS_MAIN }
 

Public Member Functions

void addAtomAssign (ParameterPtr lhs, ParameterPtr rhs, int groupOrder)
 
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 FunctionAtomInstanceListgetAtomInstances ()
 Return list of atom instances composing this function. More...
 
const StringgetDescription () const
 Get the description of this function. More...
 
FunctionType getFunctionType () const
 get function type. More...
 
ParameterPtr getInputParameter (Parameter::Content content, GpuConstantType type=GCT_UNKNOWN)
 get input parameter by content More...
 
const ShaderParameterListgetInputParameters () const
 Return a list of input parameters. More...
 
ParameterPtr getLocalParameter (Parameter::Content content)
 get local parameter by content More...
 
ParameterPtr getLocalParameter (const String &name)
 
const ShaderParameterListgetLocalParameters () const
 Return a list of local parameters. More...
 
const StringgetName () const
 Get the name of this function. More...
 
ParameterPtr getOutputParameter (Parameter::Content content, GpuConstantType type=GCT_UNKNOWN)
 get output parameter by content More...
 
const ShaderParameterListgetOutputParameters () const
 Return a list of output parameters. More...
 
FunctionStageRef getStage (size_t s)
 get a FFPShaderStage of this function More...
 
ParameterPtr resolveInputParameter (Parameter::Semantic semantic, int index, const Parameter::Content content, GpuConstantType type)
 
ParameterPtr resolveInputParameter (Parameter::Content content, GpuConstantType type=GCT_UNKNOWN)
 Resolve input parameter of this function. More...
 
ParameterPtr resolveInputParameter (const ParameterPtr &out)
 resolve input parameter from previous output More...
 
ParameterPtr resolveLocalParameter (Parameter::Semantic semantic, int index, const String &name, GpuConstantType type)
 
ParameterPtr resolveLocalParameter (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)
 
ParameterPtr resolveLocalParameter (Parameter::Content content, GpuConstantType type=GCT_UNKNOWN)
 Resolve local parameter of this function. More...
 
ParameterPtr resolveOutputParameter (Parameter::Semantic semantic, int index, const Parameter::Content content, GpuConstantType type)
 
ParameterPtr resolveOutputParameter (Parameter::Content content, GpuConstantType type=GCT_UNKNOWN)
 Resolve output parameter of this function. More...
 

Static Public Member Functions

static ParameterPtr getParameterByContent (const ShaderParameterList &parameterList, const Parameter::Content content, GpuConstantType type)
 
static ParameterPtr getParameterByName (const ShaderParameterList &parameterList, const String &name)
 
static ParameterPtr getParameterBySemantic (const ShaderParameterList &parameterList, const Parameter::Semantic semantic, int index)
 

Friends

class Program
 

Detailed Description

A class that represents a shader based program function.

Member Enumeration Documentation

◆ 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() [1/3]

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

◆ resolveInputParameter() [2/3]

ParameterPtr Ogre::RTShader::Function::resolveInputParameter ( Parameter::Content  content,
GpuConstantType  type = GCT_UNKNOWN 
)
inline

Resolve input parameter of this function.

Parameters
contentThe content of the parameter.
typeThe type of the desired parameter.
Returns
parameter instance in case of that resolve operation succeeded.

References Ogre::RTShader::Parameter::SPS_UNKNOWN.

◆ resolveInputParameter() [3/3]

ParameterPtr Ogre::RTShader::Function::resolveInputParameter ( const ParameterPtr out)
inline

resolve input parameter from previous output

References OgreAssert.

◆ getInputParameter()

ParameterPtr Ogre::RTShader::Function::getInputParameter ( Parameter::Content  content,
GpuConstantType  type = GCT_UNKNOWN 
)
inline

get input parameter by content

Parameters
content
Returns
parameter or NULL if not found

◆ resolveOutputParameter() [1/2]

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

◆ resolveOutputParameter() [2/2]

ParameterPtr Ogre::RTShader::Function::resolveOutputParameter ( Parameter::Content  content,
GpuConstantType  type = GCT_UNKNOWN 
)
inline

Resolve output parameter of this function.

Parameters
contentThe content of the parameter.
typeThe type of the desired parameter.
Returns
parameter instance in case of that resolve operation succeeded.

References Ogre::RTShader::Parameter::SPS_UNKNOWN.

◆ getOutputParameter()

ParameterPtr Ogre::RTShader::Function::getOutputParameter ( Parameter::Content  content,
GpuConstantType  type = GCT_UNKNOWN 
)
inline

get output parameter by content

Parameters
content
Returns
parameter or NULL if not found

◆ resolveLocalParameter() [1/4]

ParameterPtr Ogre::RTShader::Function::resolveLocalParameter ( Parameter::Semantic  semantic,
int  index,
const String name,
GpuConstantType  type 
)
Deprecated:
local parameters do not have index or sematic. use resolveLocalParameter(const String&, GpuConstantType)

◆ resolveLocalParameter() [2/4]

ParameterPtr Ogre::RTShader::Function::resolveLocalParameter ( const String name,
GpuConstantType  type 
)
inline

Resolve local parameter of this function.

Parameters
nameThe name of the parameter.
typeThe type of the desired parameter. Return parameter instance in case of that resolve operation succeeded.

References Ogre::RTShader::Parameter::SPS_UNKNOWN.

◆ resolveLocalParameter() [3/4]

ParameterPtr Ogre::RTShader::Function::resolveLocalParameter ( Parameter::Semantic  semantic,
int  index,
const Parameter::Content  content,
GpuConstantType  type 
)
Deprecated:
local parameters do not have index or sematic. use resolveLocalParameter(const String&, GpuConstantType)

◆ resolveLocalParameter() [4/4]

ParameterPtr Ogre::RTShader::Function::resolveLocalParameter ( Parameter::Content  content,
GpuConstantType  type = GCT_UNKNOWN 
)
inline

Resolve local parameter of this function.

Parameters
contentThe content of the parameter.
typeThe type of the desired parameter. Return parameter instance in case of that resolve operation succeeded.

References Ogre::RTShader::Parameter::SPS_UNKNOWN.

◆ getLocalParameter() [1/2]

ParameterPtr Ogre::RTShader::Function::getLocalParameter ( Parameter::Content  content)
inline

get local parameter by content

Parameters
content
Returns
parameter or NULL if not found

References Ogre::GCT_UNKNOWN.

◆ getLocalParameter() [2/2]

ParameterPtr Ogre::RTShader::Function::getLocalParameter ( const String name)
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ getParameterByName()

static ParameterPtr Ogre::RTShader::Function::getParameterByName ( const ShaderParameterList parameterList,
const String name 
)
inlinestatic
Deprecated:
do not use

◆ getParameterBySemantic()

static ParameterPtr Ogre::RTShader::Function::getParameterBySemantic ( const ShaderParameterList parameterList,
const Parameter::Semantic  semantic,
int  index 
)
inlinestatic
Deprecated:
do not use

◆ getParameterByContent()

static ParameterPtr Ogre::RTShader::Function::getParameterByContent ( const ShaderParameterList parameterList,
const Parameter::Content  content,
GpuConstantType  type 
)
inlinestatic
Deprecated:
use getInputParameter / getOutputParameter / getLocalParameter instead

◆ 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
atomInstanceThe atom instance to add.

◆ addAtomAssign()

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

◆ getStage()

FunctionStageRef Ogre::RTShader::Function::getStage ( size_t  s)
inline

get a FFPShaderStage of this function

◆ deleteAtomInstance()

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

Delete a function atom instance from this function.

Parameters
atomInstanceThe 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: