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.
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.
FunctionAtomInstanceList & getAtomInstances()
Return list of atom instances composing 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.
const ShaderParameterList & getOutputParameters() const
Return a list of output parameters.
FunctionType mFunctionType
const String & getName() const
Get the name of this function.
FunctionType getFunctionType() const
get function type.
const ShaderParameterList & getLocalParameters() const
Return a list of local parameters.
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.
void deleteOutputParameter(ParameterPtr parameter)
Delete output parameter from this function.
ShaderParameterList mLocalParameters
~Function()
Class destructor.
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.
const ShaderParameterList & getInputParameters() const
Return a list of input parameters.
ParameterPtr resolveInputParameter(Parameter::Semantic semantic, int index, const Parameter::Content content, GpuConstantType type)
Resolve input parameter of this function.
FunctionAtomInstanceList mAtomInstances
static ParameterPtr getParameterByName(const ShaderParameterList ¶meterList, const String &name)
Get parameter by a given name from the given parameter list.
const String & getDescription() const
Get the description of this function.
void addAtomInstance(FunctionAtom *atomInstance)
Add a function atom instance to this function.
const FunctionAtomInstanceList & getAtomInstances() const
Return list of atom instances composing this function.
void addOutputParameter(ParameterPtr parameter)
Add output parameter to 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< FunctionAtom * >::type FunctionAtomInstanceList
vector< ParameterPtr >::type ShaderParameterList
vector< Function * >::type ShaderFunctionList
ShaderFunctionList::iterator ShaderFunctionIterator