27 #ifndef _ShaderParameter_
28 #define _ShaderParameter_
60 SPS_BLEND_WEIGHTS = 2,
62 SPS_BLEND_INDICES = 3,
68 SPS_TEXTURE_COORDINATES = 7,
299 SPC_CUSTOM_CONTENT_BEGIN = 1000,
300 SPC_CUSTOM_CONTENT_END = 2000
316 const Semantic& semantic,
int index,
317 const Content& content,
size_t size = 0);
390 const Semantic& semantic,
int index,
392 uint16 variability,
size_t size);
432 bool isFloat()
const;
435 bool isSampler()
const;
460 if (mParamsPtr != NULL)
462 mParamsPtr->_writeRawConstant(mPhysicalIndex, val);
469 if (mParamsPtr != NULL)
471 mParamsPtr->_writeRawConstant(mPhysicalIndex, val);
478 if (mParamsPtr != NULL)
480 mParamsPtr->_writeRawConstant(mPhysicalIndex, val);
487 if (mParamsPtr != NULL)
489 mParamsPtr->_writeRawConstants(mPhysicalIndex, val.
ptr(), 2);
496 if (mParamsPtr != NULL)
498 mParamsPtr->_writeRawConstant(mPhysicalIndex, val);
505 if (mParamsPtr != NULL)
507 mParamsPtr->_writeRawConstant(mPhysicalIndex, val);
514 if (mParamsPtr != NULL)
516 mParamsPtr->_writeRawConstant(mPhysicalIndex, val, 16);
523 if (mParamsPtr != NULL)
525 mParamsPtr->_writeRawConstants(mPhysicalIndex, val, count * multiple);
532 if (mParamsPtr != NULL)
534 mParamsPtr->_writeRawConstants(mPhysicalIndex, val, count * multiple);
541 if (mParamsPtr != NULL)
543 mParamsPtr->_writeRawConstants(mPhysicalIndex, val, count * multiple);
575 template <
class valueType>
584 :
Parameter(type,
"Constant", semantic, 0, content)
Light direction in object space index 0-7.
Light direction in view space index 0-7.
Class encapsulating a standard 4x4 homogeneous matrix.
float Real
Software floating point type.
Light vector in world space index 0-7.
Light direction in world space index 0-7.
Tangent in tangent space.
Binormal in tangent space.
vector< ParameterPtr >::type ShaderParameterList
virtual String toString() const =0
virtual bool isConstParameter() const
Class representing colour.
SharedPtr< Parameter > ParameterPtr
size_t getSize() const
Returns the number of elements in the parameter (for arrays).
Binormal in object space.
Light vector in tangent space index 0-7.
Light vector in view space index 0-7.
virtual bool isConstParameter() const
Returns true if this instance is a ConstParameter otherwise false.
virtual ~ConstParameter()
AutoConstantType
Defines the types of automatically updated values that may be bound to GpuProgram parameters...
GpuConstantType
Enumeration of the types of constant we may encounter in programs.
Position in projective space.
Texture coordinate set index 0-7.
A class that represents a shader based program parameter.
Superclass for all objects that wish to use custom memory allocators when their new / delete operator...
vector< UniformParameterPtr >::type UniformParameterList
Collects together the program parameters used for a GpuProgram.
Standard 2-dimensional vector.
Depth in projective space.
View vector in object space.
int getIndex() const
Get the index of this parameter.
Position in object space.
Light position in view space index 0-7.
ShaderParameterList::iterator ShaderParameterIterator
View vector in tangent space.
Light direction in tangent space index 0-7.
const Semantic & getSemantic() const
Get the semantic of this parameter.
Helper utility class that creates common parameters.
Standard 3-dimensional vector.
void setSize(size_t size)
Sets the number of elements in the parameter (for arrays).
UniformParameterList::const_iterator UniformParameterConstIterator
virtual ~Parameter()
Class destructor.
const String & getName() const
Get the name of this parameter.
View vector in world space.
GpuConstantType getType() const
Get the type of this parameter.
virtual String toString() const
Returns the string representation of this parameter.
Light position in tangent space index 0-7.
View vector in view space.
bool isArray() const
Returns Whether this parameter is an array.
ShaderParameterList::const_iterator ShaderParameterConstIterator
Content getContent() const
Return the content of this parameter.
Helper template which is the base for our ConstParameters.
const valueType & getValue() const
Returns the native value of this parameter.
4-dimensional homogeneous vector.
SharedPtr< UniformParameter > UniformParameterPtr
UniformParameterList::iterator UniformParameterIterator
Light vector in object space index 0-7.
Light position in object space index 0-7.
Light position in world space index 0-7.
Real * ptr()
Pointer accessor for direct copying.
Position in light space index 0-7.
ConstParameter(valueType val, GpuConstantType type, const Semantic &semantic, const Content &content)