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

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.