OGRE 14.3
Object-Oriented Graphics Rendering Engine
Loading...
Searching...
No Matches
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 Member Functions

 Function (GpuProgramType type=GPT_VERTEX_PROGRAM)
 
void addAtomInstance (FunctionAtom *atomInstance)
 Add a function atom instance to this function.
 
void addInputParameter (ParameterPtr parameter)
 Add input parameter to this function.
 
void addOutputParameter (ParameterPtr parameter)
 Add output parameter to this function.
 
void deleteAllInputParameters ()
 Delete all input parameters from this function.
 
void deleteAllOutputParameters ()
 Delete all output parameters from this function.
 
bool deleteAtomInstance (FunctionAtom *atomInstance)
 Delete a function atom instance from this function.
 
void deleteInputParameter (ParameterPtr parameter)
 Delete input parameter from this function.
 
void deleteOutputParameter (ParameterPtr parameter)
 Delete output parameter from this function.
 
const FunctionAtomInstanceListgetAtomInstances ()
 Return list of atom instances composing this function.
 
ParameterPtr getInputParameter (Parameter::Content content, GpuConstantType type=GCT_UNKNOWN)
 get input parameter by content
 
const ShaderParameterListgetInputParameters () const
 Return a list of input parameters.
 
ParameterPtr getLocalParameter (const String &name)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
ParameterPtr getLocalParameter (Parameter::Content content)
 get local parameter by content
 
const ShaderParameterListgetLocalParameters () const
 Return a list of local parameters.
 
ParameterPtr getOutputParameter (Parameter::Content content, GpuConstantType type=GCT_UNKNOWN)
 get output parameter by content
 
const ShaderParameterListgetOutputParameters () const
 Return a list of output parameters.
 
FunctionStageRef getStage (uint32 s)
 get a FFPShaderStage of this function
 
ParameterPtr resolveInputParameter (const ParameterPtr &out)
 resolve input parameter from previous output
 
ParameterPtr resolveInputParameter (Parameter::Content content, GpuConstantType type=GCT_UNKNOWN)
 Resolve input parameter of this function.
 
ParameterPtr resolveInputParameter (Parameter::Semantic semantic, int index, const Parameter::Content content, GpuConstantType type)
 
ParameterPtr resolveLocalParameter (GpuConstantType type, const String &name, size_t arraySize=0)
 Resolve local parameter of this function.
 
ParameterPtr resolveLocalParameter (Parameter::Content content, GpuConstantType type=GCT_UNKNOWN)
 Resolve local parameter of this function.
 
ParameterPtr resolveLocalStructParameter (const String &type, const String &name)
 
ParameterPtr resolveOutputParameter (Parameter::Content content, GpuConstantType type=GCT_UNKNOWN)
 Resolve output parameter of this function.
 
ParameterPtr resolveOutputParameter (Parameter::Semantic semantic, int index, const Parameter::Content content, GpuConstantType type)
 

Detailed Description

A class that represents a shader based program function.

Constructor & Destructor Documentation

◆ Function()

Ogre::RTShader::Function::Function ( GpuProgramType  type = GPT_VERTEX_PROGRAM)
explicit

Member Function Documentation

◆ 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.

◆ 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
typeThe type of the desired parameter.
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.

◆ getOutputParameter()

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

get output parameter by content

Parameters
content
typeThe type of the desired parameter.
Returns
parameter or NULL if not found

◆ resolveLocalParameter() [1/2]

ParameterPtr Ogre::RTShader::Function::resolveLocalParameter ( GpuConstantType  type,
const String name,
size_t  arraySize = 0 
)

Resolve local parameter of this function.

local parameters do not have index or semantic.

Parameters
nameThe name of the parameter.
typeThe type of the desired parameter.
arraySizeIf > 0, the parameter will be an array of the given size.
Returns
parameter instance in case of that resolve operation succeeded.

◆ resolveLocalParameter() [2/2]

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

Resolve local parameter of this function.

local parameters do not have index or semantic.

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

◆ resolveLocalStructParameter()

ParameterPtr Ogre::RTShader::Function::resolveLocalStructParameter ( const String type,
const String name 
)

◆ 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.

◆ 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.

◆ getStage()

FunctionStageRef Ogre::RTShader::Function::getStage ( uint32  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.


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