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)
SharedPtr< UniformParameter > UniformParameterPtr
AutoConstantType
Defines the types of automatically updated values that may be bound to GpuProgram parameters...
Light direction in tangent space index 0-7.
UniformParameterList::const_iterator UniformParameterConstIterator
const Semantic & getSemantic() const
Get the semantic of this parameter.
Light vector in view space index 0-7.
GpuConstantType getType() const
Get the type of this parameter.
Helper template which is the base for our ConstParameters.
Light position in tangent space index 0-7.
Light vector in world space index 0-7.
Light position in view space index 0-7.
A class that represents a shader based program parameter.
Light direction in view space index 0-7.
Position in light space index 0-7.
4-dimensional homogeneous vector.
Standard 2-dimensional vector.
Class representing colour.
float Real
Software floating point type.
vector< UniformParameterPtr >::type UniformParameterList
ConstParameter(valueType val, GpuConstantType type, const Semantic &semantic, const Content &content)
ShaderParameterList::const_iterator ShaderParameterConstIterator
const valueType & getValue() const
Returns the native value of this parameter.
View vector in world space.
virtual bool isConstParameter() const
SharedPtr< Parameter > ParameterPtr
size_t getSize() const
Returns the number of elements in the parameter (for arrays).
vector< ParameterPtr >::type ShaderParameterList
virtual String toString() const
Returns the string representation of this parameter.
Class encapsulating a standard 4x4 homogeneous matrix.
Standard 3-dimensional vector.
Binormal in object space.
virtual String toString() const =0
Depth in projective space.
virtual ~ConstParameter()
Content getContent() const
Return the content of this parameter.
const String & getName() const
Get the name of this parameter.
Texture coordinate set index 0-7.
UniformParameterList::iterator UniformParameterIterator
View vector in tangent space.
Real * ptr()
Pointer accessor for direct copying.
int getIndex() const
Get the index of this parameter.
Light vector in object space index 0-7.
virtual bool isConstParameter() const
Returns true if this instance is a ConstParameter otherwise false.
Position in object space.
Position in projective space.
Helper utility class that creates common parameters.
Binormal in tangent space.
Light position in object space index 0-7.
Tangent in tangent space.
View vector in object space.
View vector in view space.
GpuConstantType
Enumeration of the types of constant we may encounter in programs.
ShaderParameterList::iterator ShaderParameterIterator
Light vector in tangent space index 0-7.
Light direction in world space index 0-7.
Light direction in object space index 0-7.
bool isArray() const
Returns Whether this parameter is an array.
virtual ~Parameter()
Class destructor.
Light position in world space index 0-7.
Superclass for all objects that wish to use custom memory allocators when their new / delete operator...
Collects together the program parameters used for a GpuProgram.
void setSize(size_t size)
Sets the number of elements in the parameter (for arrays).