27#ifndef _ShaderProgramFunction_
28#define _ShaderProgramFunction_
Superclass for all objects that wish to use custom memory allocators when their new / delete operator...
A class that represents an atomic code section of shader based program function.
A class that represents a shader based program function.
const ShaderParameterList & getOutputParameters() const
Return a list of output parameters.
void addParameter(ShaderParameterList ¶meterList, ParameterPtr parameter)
Add parameter to given list.
void addInputParameter(ParameterPtr parameter)
Add input parameter to this function.
ShaderParameterList mOutputParameters
Function(const String &name, const String &desc, const FunctionType functionType)
Class constructor.
ShaderParameterList mInputParameters
ParameterPtr resolveLocalParameter(Parameter::Semantic semantic, int index, const String &name, GpuConstantType type)
Resolve local parameter of this function
void sortAtomInstances()
Sort all atom instances of this function.
ParameterPtr resolveLocalParameter(Parameter::Semantic semantic, int index, const Parameter::Content content, GpuConstantType type)
Resolve local parameter of this function
static ParameterPtr getParameterBySemantic(const ShaderParameterList ¶meterList, const Parameter::Semantic semantic, int index)
Get parameter by a given semantic and index from the given parameter list.
ParameterPtr getParameterByContent(const ShaderParameterList ¶meterList, const Parameter::Content content, GpuConstantType type)
Get parameter by a given content and type from the given parameter list.
FunctionType mFunctionType
FunctionType getFunctionType() const
get function type.
void deleteInputParameter(ParameterPtr parameter)
Delete input parameter from this function.
void deleteAllOutputParameters()
Delete all output parameters from this function.
void deleteAllInputParameters()
Delete all input parameters from this function.
const ShaderParameterList & getInputParameters() const
Return a list of input parameters.
void deleteOutputParameter(ParameterPtr parameter)
Delete output parameter from this function.
ShaderParameterList mLocalParameters
FunctionAtomInstanceList & getAtomInstances()
Return list of atom instances composing this function.
~Function()
Class destructor.
const FunctionAtomInstanceList & getAtomInstances() const
Return list of atom instances composing this function.
const String & getDescription() const
Get the description of this function.
void deleteParameter(ShaderParameterList ¶meterList, ParameterPtr parameter)
Delete parameter from a given list.
bool deleteAtomInstance(FunctionAtom *atomInstance)
Delete a function atom instance from this function.
ParameterPtr resolveOutputParameter(Parameter::Semantic semantic, int index, const Parameter::Content content, GpuConstantType type)
Resolve output parameter of this function.
ParameterPtr resolveInputParameter(Parameter::Semantic semantic, int index, const Parameter::Content content, GpuConstantType type)
Resolve input parameter of this function.
FunctionAtomInstanceList mAtomInstances
const ShaderParameterList & getLocalParameters() const
Return a list of local parameters.
static ParameterPtr getParameterByName(const ShaderParameterList ¶meterList, const String &name)
Get parameter by a given name from the given parameter list.
void addAtomInstance(FunctionAtom *atomInstance)
Add a function atom instance to this function.
void addOutputParameter(ParameterPtr parameter)
Add output parameter to this function.
const String & getName() const
Get the name of this function.
A class that represents a shader based program.
GpuConstantType
Enumeration of the types of constant we may encounter in programs.
ShaderFunctionList::const_iterator ShaderFunctionConstIterator
vector< Function * >::type ShaderFunctionList
ShaderFunctionList::iterator ShaderFunctionIterator