Collects together the program parameters used for a GpuProgram. More...
#include <OgreGpuProgramParams.h>
Classes | |
struct | AutoConstantDefinition |
Structure defining an auto constant that's available for use in a parameters object. More... | |
class | AutoConstantEntry |
Structure recording the use of an automatic parameter. More... | |
Public Member Functions | |
GpuProgramParameters () | |
GpuProgramParameters (const GpuProgramParameters &oth) | |
Copy constructor. More... | |
~GpuProgramParameters () | |
void | _copySharedParams () |
Update the parameters by copying the data from the shared parameters. More... | |
const GpuConstantDefinition * | _findNamedConstantDefinition (const String &name, bool throwExceptionIfMissing=false) const |
Find a constant definition for a named parameter. More... | |
const AutoConstantEntry * | _findRawAutoConstantEntryDouble (size_t physicalIndex) |
Finds an auto constant that's affecting a given physical position in the double-point buffer. More... | |
const AutoConstantEntry * | _findRawAutoConstantEntryFloat (size_t physicalIndex) |
Finds an auto constant that's affecting a given physical position in the floating-point buffer. More... | |
const AutoConstantEntry * | _findRawAutoConstantEntryInt (size_t physicalIndex) |
Finds an auto constant that's affecting a given physical position in the integer buffer. More... | |
size_t | _getDoubleConstantPhysicalIndex (size_t logicalIndex, size_t requestedSize, uint16 variability) |
Gets the physical buffer index associated with a logical double constant index. More... | |
size_t | _getFloatConstantPhysicalIndex (size_t logicalIndex, size_t requestedSize, uint16 variability) |
Gets the physical buffer index associated with a logical float constant index. More... | |
size_t | _getIntConstantPhysicalIndex (size_t logicalIndex, size_t requestedSize, uint16 variability) |
Gets the physical buffer index associated with a logical int constant index. More... | |
const Any & | _getRenderSystemData () const |
Internal method that the RenderSystem might use to store optional data. More... | |
void | _readRawConstants (size_t physicalIndex, size_t count, float *dest) |
Read a series of floating point values from the underlying float constant buffer at the given physical index. More... | |
void | _readRawConstants (size_t physicalIndex, size_t count, int *dest) |
Read a series of integer values from the underlying integer constant buffer at the given physical index. More... | |
void | _setLogicalIndexes (const GpuLogicalBufferStructPtr &floatIndexMap, const GpuLogicalBufferStructPtr &doubleIndexMap, const GpuLogicalBufferStructPtr &intIndexMap) |
Internal method for providing a link to a logical index->physical index map for parameters. More... | |
void | _setNamedConstants (const GpuNamedConstantsPtr &constantmap) |
Internal method for providing a link to a name->definition map for parameters. More... | |
void | _setRawAutoConstant (size_t physicalIndex, AutoConstantType acType, size_t extraInfo, uint16 variability, size_t elementSize=4) |
As setAutoConstant, but sets up the auto constant directly against a physical buffer index. More... | |
void | _setRawAutoConstantReal (size_t physicalIndex, AutoConstantType acType, Real rData, uint16 variability, size_t elementSize=4) |
As setAutoConstantReal, but sets up the auto constant directly against a physical buffer index. More... | |
void | _setRenderSystemData (const Any &data) const |
Internal method that the RenderSystem might use to store optional data. More... | |
void | _updateAutoParams (const AutoParamDataSource *source, uint16 variabilityMask) |
Update automatic parameters. More... | |
void | _writeRawConstant (size_t physicalIndex, const Vector4 &vec, size_t count=4) |
Write a 4-element floating-point parameter to the program directly to the underlying constants buffer. More... | |
void | _writeRawConstant (size_t physicalIndex, Real val) |
Write a single floating-point parameter to the program. More... | |
void | _writeRawConstant (size_t physicalIndex, Real val, size_t count) |
Write a variable number of floating-point parameters to the program. More... | |
void | _writeRawConstant (size_t physicalIndex, int val) |
Write a single integer parameter to the program. More... | |
void | _writeRawConstant (size_t physicalIndex, const Vector3 &vec) |
Write a 3-element floating-point parameter to the program via Vector3. More... | |
void | _writeRawConstant (size_t physicalIndex, const Vector2 &vec) |
Write a 2-element floating-point parameter to the program via Vector2. More... | |
void | _writeRawConstant (size_t physicalIndex, const Matrix4 &m, size_t elementCount) |
Write a Matrix4 parameter to the program. More... | |
void | _writeRawConstant (size_t physicalIndex, const Matrix4 *m, size_t numEntries) |
Write a list of Matrix4 parameters to the program. More... | |
void | _writeRawConstant (size_t physicalIndex, const ColourValue &colour, size_t count=4) |
Write a ColourValue parameter to the program. More... | |
void | _writeRawConstants (size_t physicalIndex, const float *val, size_t count) |
Write a series of floating point values into the underlying float constant buffer at the given physical index. More... | |
void | _writeRawConstants (size_t physicalIndex, const double *val, size_t count) |
Write a series of floating point values into the underlying float constant buffer at the given physical index. More... | |
void | _writeRawConstants (size_t physicalIndex, const int *val, size_t count) |
Write a series of integer values into the underlying integer constant buffer at the given physical index. More... | |
void | addSharedParameters (GpuSharedParametersPtr sharedParams) |
Use a set of shared parameters in this parameters object. More... | |
void | addSharedParameters (const String &sharedParamsName) |
Use a set of shared parameters in this parameters object. More... | |
size_t | calculateSize (void) const |
void | clearAutoConstant (size_t index) |
Unbind an auto constant so that the constant is manually controlled again. More... | |
void | clearAutoConstants (void) |
Clears all the existing automatic constants. More... | |
void | clearNamedAutoConstant (const String &name) |
Unbind an auto constant so that the constant is manually controlled again. More... | |
void | copyConstantsFrom (const GpuProgramParameters &source) |
Copies the values of all constants (including auto constants) from another GpuProgramParameters object. More... | |
void | copyMatchingNamedConstantsFrom (const GpuProgramParameters &source) |
Copies the values of all matching named constants (including auto constants) from another GpuProgramParameters object. More... | |
const AutoConstantEntry * | findAutoConstantEntry (const String ¶mName) |
Finds an auto constant that's affecting a given named parameter index. More... | |
const AutoConstantEntry * | findDoubleAutoConstantEntry (size_t logicalIndex) |
Finds an auto constant that's affecting a given logical parameter index for double-point values. More... | |
const AutoConstantEntry * | findFloatAutoConstantEntry (size_t logicalIndex) |
Finds an auto constant that's affecting a given logical parameter index for floating-point values. More... | |
const AutoConstantEntry * | findIntAutoConstantEntry (size_t logicalIndex) |
Finds an auto constant that's affecting a given logical parameter index for integer values. More... | |
size_t | getAutoConstantCount (void) const |
Gets the number of int constants that have been set. More... | |
AutoConstantEntry * | getAutoConstantEntry (const size_t index) |
Gets a specific Auto Constant entry if index is in valid range otherwise returns a NULL. More... | |
AutoConstantIterator | getAutoConstantIterator (void) const |
Gets an iterator over the automatic constant bindings currently in place. More... | |
const AutoConstantList & | getAutoConstantList () const |
Get a reference to the list of auto constant bindings. More... | |
const GpuConstantDefinition & | getConstantDefinition (const String &name) const |
Get a specific GpuConstantDefinition for a named parameter. More... | |
GpuConstantDefinitionIterator | getConstantDefinitionIterator (void) const |
Gets an iterator over the named GpuConstantDefinition instances as defined by the program for which these parameters exist. More... | |
const GpuNamedConstants & | getConstantDefinitions () const |
Get the full list of GpuConstantDefinition instances. More... | |
const DoubleConstantList & | getDoubleConstantList () const |
Get a reference to the list of double constants. More... | |
const GpuLogicalBufferStructPtr & | getDoubleLogicalBufferStruct () const |
Retrieves the logical index relating to a physical index in the int buffer, for programs which support that (low-level programs and high-level programs which use logical parameter indexes). More... | |
size_t | getDoubleLogicalIndexForPhysicalIndex (size_t physicalIndex) |
Retrieves the logical index relating to a physical index in the double buffer, for programs which support that (low-level programs and high-level programs which use logical parameter indexes). More... | |
double * | getDoublePointer (size_t pos) |
Get a pointer to the 'nth' item in the double buffer. More... | |
const double * | getDoublePointer (size_t pos) const |
Get a pointer to the 'nth' item in the double buffer. More... | |
const FloatConstantList & | getFloatConstantList () const |
Get a reference to the list of float constants. More... | |
const GpuLogicalBufferStructPtr & | getFloatLogicalBufferStruct () const |
Get the current list of mappings from low-level logical param indexes to physical buffer locations in the float buffer. More... | |
size_t | getFloatLogicalIndexForPhysicalIndex (size_t physicalIndex) |
Retrieves the logical index relating to a physical index in the float buffer, for programs which support that (low-level programs and high-level programs which use logical parameter indexes). More... | |
float * | getFloatPointer (size_t pos) |
Get a pointer to the 'nth' item in the float buffer. More... | |
const float * | getFloatPointer (size_t pos) const |
Get a pointer to the 'nth' item in the float buffer. More... | |
const IntConstantList & | getIntConstantList () const |
Get a reference to the list of int constants. More... | |
const GpuLogicalBufferStructPtr & | getIntLogicalBufferStruct () const |
Get the current list of mappings from low-level logical param indexes to physical buffer locations in the integer buffer. More... | |
size_t | getIntLogicalIndexForPhysicalIndex (size_t physicalIndex) |
Retrieves the logical index relating to a physical index in the int buffer, for programs which support that (low-level programs and high-level programs which use logical parameter indexes). More... | |
int * | getIntPointer (size_t pos) |
Get a pointer to the 'nth' item in the int buffer. More... | |
const int * | getIntPointer (size_t pos) const |
Get a pointer to the 'nth' item in the int buffer. More... | |
size_t | getPassIterationNumberIndex () const |
Get the physical buffer index of the pass iteration number constant. More... | |
const GpuSharedParamUsageList & | getSharedParameters () const |
Get the list of shared parameter sets. More... | |
const SubroutineMap & | getSubroutineMap () const |
Get map with. More... | |
bool | getTransposeMatrices (void) const |
Gets whether or not matrices are to be transposed when set. More... | |
bool | hasAutoConstants (void) const |
Returns true if this instance has any automatic constants. More... | |
bool | hasLogicalIndexedParameters () const |
Does this parameter set include logically indexed parameters? More... | |
bool | hasNamedParameters () const |
Does this parameter set include named parameters? More... | |
bool | hasPassIterationNumber () const |
Does this parameters object have a pass iteration number constant? More... | |
void | incPassIterationNumber (void) |
increments the multipass number entry by 1 if it exists More... | |
bool | isUsingSharedParameters (const String &sharedParamsName) const |
Returns whether this parameter set is using the named shared parameter set. More... | |
void | operator delete (void *ptr) |
void | operator delete (void *ptr, void *) |
void | operator delete (void *ptr, const char *, int, const char *) |
void | operator delete[] (void *ptr) |
void | operator delete[] (void *ptr, const char *, int, const char *) |
void * | operator new (size_t sz, const char *file, int line, const char *func) |
operator new, with debug line info More... | |
void * | operator new (size_t sz) |
void * | operator new (size_t sz, void *ptr) |
placement operator new More... | |
void * | operator new[] (size_t sz, const char *file, int line, const char *func) |
array operator new, with debug line info More... | |
void * | operator new[] (size_t sz) |
GpuProgramParameters & | operator= (const GpuProgramParameters &oth) |
Operator = overload. More... | |
void | removeAllSharedParameters () |
Stop using all shared parameter sets. More... | |
void | removeSharedParameters (const String &sharedParamsName) |
Stop using the named shared parameter set. More... | |
void | setAutoConstant (size_t index, AutoConstantType acType, size_t extraInfo=0) |
Sets up a constant which will automatically be updated by the system. More... | |
void | setAutoConstant (size_t index, AutoConstantType acType, uint16 extraInfo1, uint16 extraInfo2) |
Sets up a constant which will automatically be updated by the system. More... | |
void | setAutoConstantReal (size_t index, AutoConstantType acType, Real rData) |
void | setConstant (size_t index, const Vector4 &vec) |
Sets a 4-element floating-point parameter to the program. More... | |
void | setConstant (size_t index, Real val) |
Sets a single floating-point parameter to the program. More... | |
void | setConstant (size_t index, const Vector3 &vec) |
Sets a 4-element floating-point parameter to the program via Vector3. More... | |
void | setConstant (size_t index, const Vector2 &vec) |
Sets a 4-element floating-point parameter to the program via Vector2. More... | |
void | setConstant (size_t index, const Matrix4 &m) |
Sets a Matrix4 parameter to the program. More... | |
void | setConstant (size_t index, const Matrix4 *m, size_t numEntries) |
Sets a list of Matrix4 parameters to the program. More... | |
void | setConstant (size_t index, const float *val, size_t count) |
Sets a multiple value constant floating-point parameter to the program. More... | |
void | setConstant (size_t index, const double *val, size_t count) |
Sets a multiple value constant floating-point parameter to the program. More... | |
void | setConstant (size_t index, const ColourValue &colour) |
Sets a ColourValue parameter to the program. More... | |
void | setConstant (size_t index, const int *val, size_t count) |
Sets a multiple value constant integer parameter to the program. More... | |
void | setConstantFromTime (size_t index, Real factor) |
Sets a named parameter up to track a derivation of the current time. More... | |
void | setIgnoreMissingParams (bool state) |
Tells the program whether to ignore missing parameters or not. More... | |
void | setNamedAutoConstant (const String &name, AutoConstantType acType, size_t extraInfo=0) |
Sets up a constant which will automatically be updated by the system. More... | |
void | setNamedAutoConstant (const String &name, AutoConstantType acType, uint16 extraInfo1, uint16 extraInfo2) |
Sets up a constant which will automatically be updated by the system. More... | |
void | setNamedAutoConstantReal (const String &name, AutoConstantType acType, Real rData) |
void | setNamedConstant (const String &name, Real val) |
Sets a single value constant floating-point parameter to the program. More... | |
void | setNamedConstant (const String &name, int val) |
Sets a single value constant integer parameter to the program. More... | |
void | setNamedConstant (const String &name, const Vector4 &vec) |
Sets a Vector4 parameter to the program. More... | |
void | setNamedConstant (const String &name, const Vector3 &vec) |
Sets a Vector3 parameter to the program. More... | |
void | setNamedConstant (const String &name, const Vector2 &vec) |
Sets a Vector2 parameter to the program. More... | |
void | setNamedConstant (const String &name, const Matrix4 &m) |
Sets a Matrix4 parameter to the program. More... | |
void | setNamedConstant (const String &name, const Matrix4 *m, size_t numEntries) |
Sets a list of Matrix4 parameters to the program. More... | |
void | setNamedConstant (const String &name, const float *val, size_t count, size_t multiple=4) |
Sets a multiple value constant floating-point parameter to the program. More... | |
void | setNamedConstant (const String &name, const double *val, size_t count, size_t multiple=4) |
Sets a multiple value constant floating-point parameter to the program. More... | |
void | setNamedConstant (const String &name, const ColourValue &colour) |
Sets a ColourValue parameter to the program. More... | |
void | setNamedConstant (const String &name, const int *val, size_t count, size_t multiple=4) |
Sets a multiple value constant floating-point parameter to the program. More... | |
void | setNamedConstantFromTime (const String &name, Real factor) |
Sets a named parameter up to track a derivation of the current time. More... | |
void | setNamedSubroutine (const String &subroutineSlot, const String &subroutine) |
Set subroutine name by slot name. More... | |
void | setSubroutine (size_t index, const String &subroutine) |
Set subroutine name by slot index. More... | |
void | setTransposeMatrices (bool val) |
Sets whether or not we need to transpose the matrices passed in from the rest of OGRE. More... | |
Static Public Member Functions | |
static const AutoConstantDefinition * | getAutoConstantDefinition (const String &name) |
gets the auto constant definition associated with name if found else returns NULL More... | |
static const AutoConstantDefinition * | getAutoConstantDefinition (const size_t idx) |
gets the auto constant definition using an index into the auto constant definition array. More... | |
static size_t | getNumAutoConstantDefinitions (void) |
Returns the number of auto constant definitions. More... | |
Protected Member Functions | |
GpuLogicalIndexUse * | _getDoubleConstantLogicalIndexUse (size_t logicalIndex, size_t requestedSize, uint16 variability) |
Gets the low-level structure for a logical index. More... | |
GpuLogicalIndexUse * | _getFloatConstantLogicalIndexUse (size_t logicalIndex, size_t requestedSize, uint16 variability) |
Gets the low-level structure for a logical index. More... | |
GpuLogicalIndexUse * | _getIntConstantLogicalIndexUse (size_t logicalIndex, size_t requestedSize, uint16 variability) |
Gets the physical buffer index associated with a logical int constant index. More... | |
void | copySharedParamSetUsage (const GpuSharedParamUsageList &srcList) |
uint16 | deriveVariability (AutoConstantType act) |
Return the variability for an auto constant. More... | |
Protected Attributes | |
size_t | mActivePassIterationIndex |
physical index for active pass iteration parameter real constant entry; More... | |
AutoConstantList | mAutoConstants |
List of automatically updated parameters. More... | |
uint16 | mCombinedVariability |
The combined variability masks of all parameters. More... | |
DoubleConstantList | mDoubleConstants |
Packed list of double-point constants (physical indexing) More... | |
GpuLogicalBufferStructPtr | mDoubleLogicalToPhysical |
Logical index to physical index map - for low-level programs or high-level programs which pass params this way. More... | |
FloatConstantList | mFloatConstants |
Packed list of floating-point constants (physical indexing) More... | |
GpuLogicalBufferStructPtr | mFloatLogicalToPhysical |
Logical index to physical index map - for low-level programs or high-level programs which pass params this way. More... | |
bool | mIgnoreMissingParams |
flag to indicate if names not found will be ignored More... | |
IntConstantList | mIntConstants |
Packed list of integer constants (physical indexing) More... | |
GpuLogicalBufferStructPtr | mIntLogicalToPhysical |
Logical index to physical index map - for low-level programs or high-level programs which pass params this way. More... | |
GpuNamedConstantsPtr | mNamedConstants |
Mapping from parameter names to def - high-level programs are expected to populate this. More... | |
Any | mRenderSystemData |
GpuSharedParamUsageList | mSharedParamSets |
SubroutineMap | mSubroutineMap |
bool | mTransposeMatrices |
Do we need to transpose matrices? More... | |
Static Protected Attributes | |
static AutoConstantDefinition | AutoConstantDictionary [] |
Collects together the program parameters used for a GpuProgram.
Definition at line 702 of file OgreGpuProgramParams.h.
Definition at line 1673 of file OgreGpuProgramParams.h.
typedef vector<AutoConstantEntry>::type Ogre::GpuProgramParameters::AutoConstantList |
Definition at line 1246 of file OgreGpuProgramParams.h.
Definition at line 1248 of file OgreGpuProgramParams.h.
typedef HashMap<unsigned int, String>::const_iterator Ogre::GpuProgramParameters::SubroutineIterator |
Definition at line 1252 of file OgreGpuProgramParams.h.
typedef HashMap<unsigned int, String> Ogre::GpuProgramParameters::SubroutineMap |
Definition at line 1251 of file OgreGpuProgramParams.h.
Ogre::GpuProgramParameters::GpuProgramParameters | ( | ) |
Ogre::GpuProgramParameters::~GpuProgramParameters | ( | ) |
Definition at line 1310 of file OgreGpuProgramParams.h.
Ogre::GpuProgramParameters::GpuProgramParameters | ( | const GpuProgramParameters & | oth | ) |
Copy constructor.
void Ogre::GpuProgramParameters::_copySharedParams | ( | ) |
Update the parameters by copying the data from the shared parameters.
const GpuConstantDefinition* Ogre::GpuProgramParameters::_findNamedConstantDefinition | ( | const String & | name, |
bool | throwExceptionIfMissing = false |
||
) | const |
Find a constant definition for a named parameter.
name | The name to look up |
throwExceptionIfMissing | If set to true, failure to find an entry will throw an exception. |
const AutoConstantEntry* Ogre::GpuProgramParameters::_findRawAutoConstantEntryDouble | ( | size_t | physicalIndex | ) |
Finds an auto constant that's affecting a given physical position in the double-point buffer.
const AutoConstantEntry* Ogre::GpuProgramParameters::_findRawAutoConstantEntryFloat | ( | size_t | physicalIndex | ) |
Finds an auto constant that's affecting a given physical position in the floating-point buffer.
const AutoConstantEntry* Ogre::GpuProgramParameters::_findRawAutoConstantEntryInt | ( | size_t | physicalIndex | ) |
Finds an auto constant that's affecting a given physical position in the integer buffer.
|
protected |
Gets the low-level structure for a logical index.
size_t Ogre::GpuProgramParameters::_getDoubleConstantPhysicalIndex | ( | size_t | logicalIndex, |
size_t | requestedSize, | ||
uint16 | variability | ||
) |
Gets the physical buffer index associated with a logical double constant index.
logicalIndex | The logical parameter index |
requestedSize | The requested size - pass 0 to ignore missing entries and return std::numeric_limits<size_t>::max() |
|
protected |
Gets the low-level structure for a logical index.
size_t Ogre::GpuProgramParameters::_getFloatConstantPhysicalIndex | ( | size_t | logicalIndex, |
size_t | requestedSize, | ||
uint16 | variability | ||
) |
Gets the physical buffer index associated with a logical float constant index.
logicalIndex | The logical parameter index |
requestedSize | The requested size - pass 0 to ignore missing entries and return std::numeric_limits<size_t>::max() |
|
protected |
Gets the physical buffer index associated with a logical int constant index.
size_t Ogre::GpuProgramParameters::_getIntConstantPhysicalIndex | ( | size_t | logicalIndex, |
size_t | requestedSize, | ||
uint16 | variability | ||
) |
Gets the physical buffer index associated with a logical int constant index.
logicalIndex | The logical parameter index |
requestedSize | The requested size - pass 0 to ignore missing entries and return std::numeric_limits<size_t>::max() |
const Any& Ogre::GpuProgramParameters::_getRenderSystemData | ( | ) | const |
Internal method that the RenderSystem might use to store optional data.
Definition at line 2023 of file OgreGpuProgramParams.h.
void Ogre::GpuProgramParameters::_readRawConstants | ( | size_t | physicalIndex, |
size_t | count, | ||
float * | dest | ||
) |
Read a series of floating point values from the underlying float constant buffer at the given physical index.
physicalIndex | The buffer position to start reading |
count | The number of floats to read |
dest | Pointer to a buffer to receive the values |
void Ogre::GpuProgramParameters::_readRawConstants | ( | size_t | physicalIndex, |
size_t | count, | ||
int * | dest | ||
) |
Read a series of integer values from the underlying integer constant buffer at the given physical index.
physicalIndex | The buffer position to start reading |
count | The number of ints to read |
dest | Pointer to a buffer to receive the values |
void Ogre::GpuProgramParameters::_setLogicalIndexes | ( | const GpuLogicalBufferStructPtr & | floatIndexMap, |
const GpuLogicalBufferStructPtr & | doubleIndexMap, | ||
const GpuLogicalBufferStructPtr & | intIndexMap | ||
) |
Internal method for providing a link to a logical index->physical index map for parameters.
void Ogre::GpuProgramParameters::_setNamedConstants | ( | const GpuNamedConstantsPtr & | constantmap | ) |
Internal method for providing a link to a name->definition map for parameters.
void Ogre::GpuProgramParameters::_setRawAutoConstant | ( | size_t | physicalIndex, |
AutoConstantType | acType, | ||
size_t | extraInfo, | ||
uint16 | variability, | ||
size_t | elementSize = 4 |
||
) |
As setAutoConstant, but sets up the auto constant directly against a physical buffer index.
void Ogre::GpuProgramParameters::_setRawAutoConstantReal | ( | size_t | physicalIndex, |
AutoConstantType | acType, | ||
Real | rData, | ||
uint16 | variability, | ||
size_t | elementSize = 4 |
||
) |
As setAutoConstantReal, but sets up the auto constant directly against a physical buffer index.
void Ogre::GpuProgramParameters::_setRenderSystemData | ( | const Any & | data | ) | const |
Internal method that the RenderSystem might use to store optional data.
Definition at line 2021 of file OgreGpuProgramParams.h.
void Ogre::GpuProgramParameters::_updateAutoParams | ( | const AutoParamDataSource * | source, |
uint16 | variabilityMask | ||
) |
Update automatic parameters.
source | The source of the parameters |
variabilityMask | A mask of GpuParamVariability which identifies which autos will need updating |
void Ogre::GpuProgramParameters::_writeRawConstant | ( | size_t | physicalIndex, |
const Vector4 & | vec, | ||
size_t | count = 4 |
||
) |
Write a 4-element floating-point parameter to the program directly to the underlying constants buffer.
physicalIndex | The physical buffer index at which to place the parameter |
vec | The value to set |
count | The number of floats to write; if for example the uniform constant 'slot' is smaller than a Vector4 |
Referenced by Ogre::Renderable::_updateCustomGpuParameter().
void Ogre::GpuProgramParameters::_writeRawConstant | ( | size_t | physicalIndex, |
Real | val | ||
) |
Write a single floating-point parameter to the program.
physicalIndex | The physical buffer index at which to place the parameter |
val | The value to set |
void Ogre::GpuProgramParameters::_writeRawConstant | ( | size_t | physicalIndex, |
Real | val, | ||
size_t | count | ||
) |
Write a variable number of floating-point parameters to the program.
physicalIndex | The physical buffer index at which to place the parameter |
val | The value to set |
void Ogre::GpuProgramParameters::_writeRawConstant | ( | size_t | physicalIndex, |
int | val | ||
) |
Write a single integer parameter to the program.
physicalIndex | The physical buffer index at which to place the parameter |
val | The value to set |
void Ogre::GpuProgramParameters::_writeRawConstant | ( | size_t | physicalIndex, |
const Vector3 & | vec | ||
) |
Write a 3-element floating-point parameter to the program via Vector3.
physicalIndex | The physical buffer index at which to place the parameter |
vec | The value to set |
void Ogre::GpuProgramParameters::_writeRawConstant | ( | size_t | physicalIndex, |
const Vector2 & | vec | ||
) |
Write a 2-element floating-point parameter to the program via Vector2.
physicalIndex | The physical buffer index at which to place the parameter |
vec | The value to set |
void Ogre::GpuProgramParameters::_writeRawConstant | ( | size_t | physicalIndex, |
const Matrix4 & | m, | ||
size_t | elementCount | ||
) |
Write a Matrix4 parameter to the program.
physicalIndex | The physical buffer index at which to place the parameter |
m | The value to set |
elementCount | actual element count used with shader |
void Ogre::GpuProgramParameters::_writeRawConstant | ( | size_t | physicalIndex, |
const Matrix4 * | m, | ||
size_t | numEntries | ||
) |
Write a list of Matrix4 parameters to the program.
physicalIndex | The physical buffer index at which to place the parameter |
numEntries | Number of Matrix4 entries |
void Ogre::GpuProgramParameters::_writeRawConstant | ( | size_t | physicalIndex, |
const ColourValue & | colour, | ||
size_t | count = 4 |
||
) |
Write a ColourValue parameter to the program.
physicalIndex | The physical buffer index at which to place the parameter |
colour | The value to set |
count | The number of floats to write; if for example the uniform constant 'slot' is smaller than a Vector4 |
void Ogre::GpuProgramParameters::_writeRawConstants | ( | size_t | physicalIndex, |
const float * | val, | ||
size_t | count | ||
) |
Write a series of floating point values into the underlying float constant buffer at the given physical index.
physicalIndex | The buffer position to start writing |
val | Pointer to a list of values to write |
count | The number of floats to write |
void Ogre::GpuProgramParameters::_writeRawConstants | ( | size_t | physicalIndex, |
const double * | val, | ||
size_t | count | ||
) |
Write a series of floating point values into the underlying float constant buffer at the given physical index.
physicalIndex | The buffer position to start writing |
val | Pointer to a list of values to write |
count | The number of floats to write |
void Ogre::GpuProgramParameters::_writeRawConstants | ( | size_t | physicalIndex, |
const int * | val, | ||
size_t | count | ||
) |
Write a series of integer values into the underlying integer constant buffer at the given physical index.
physicalIndex | The buffer position to start writing |
val | Pointer to a list of values to write |
count | The number of ints to write |
void Ogre::GpuProgramParameters::addSharedParameters | ( | GpuSharedParametersPtr | sharedParams | ) |
Use a set of shared parameters in this parameters object.
void Ogre::GpuProgramParameters::addSharedParameters | ( | const String & | sharedParamsName | ) |
Use a set of shared parameters in this parameters object.
sharedParamsName | The name of a shared parameter set as defined in GpuProgramManager |
size_t Ogre::GpuProgramParameters::calculateSize | ( | void | ) | const |
void Ogre::GpuProgramParameters::clearAutoConstant | ( | size_t | index | ) |
Unbind an auto constant so that the constant is manually controlled again.
void Ogre::GpuProgramParameters::clearAutoConstants | ( | void | ) |
Clears all the existing automatic constants.
void Ogre::GpuProgramParameters::clearNamedAutoConstant | ( | const String & | name | ) |
Unbind an auto constant so that the constant is manually controlled again.
void Ogre::GpuProgramParameters::copyConstantsFrom | ( | const GpuProgramParameters & | source | ) |
Copies the values of all constants (including auto constants) from another GpuProgramParameters object.
void Ogre::GpuProgramParameters::copyMatchingNamedConstantsFrom | ( | const GpuProgramParameters & | source | ) |
Copies the values of all matching named constants (including auto constants) from another GpuProgramParameters object.
|
protected |
|
protected |
Return the variability for an auto constant.
const AutoConstantEntry* Ogre::GpuProgramParameters::findAutoConstantEntry | ( | const String & | paramName | ) |
Finds an auto constant that's affecting a given named parameter index.
const AutoConstantEntry* Ogre::GpuProgramParameters::findDoubleAutoConstantEntry | ( | size_t | logicalIndex | ) |
Finds an auto constant that's affecting a given logical parameter index for double-point values.
const AutoConstantEntry* Ogre::GpuProgramParameters::findFloatAutoConstantEntry | ( | size_t | logicalIndex | ) |
Finds an auto constant that's affecting a given logical parameter index for floating-point values.
const AutoConstantEntry* Ogre::GpuProgramParameters::findIntAutoConstantEntry | ( | size_t | logicalIndex | ) |
Finds an auto constant that's affecting a given logical parameter index for integer values.
size_t Ogre::GpuProgramParameters::getAutoConstantCount | ( | void | ) | const |
Gets the number of int constants that have been set.
Definition at line 1677 of file OgreGpuProgramParams.h.
|
static |
gets the auto constant definition associated with name if found else returns NULL
name | The name of the auto constant |
|
static |
gets the auto constant definition using an index into the auto constant definition array.
If the index is out of bounds then NULL is returned;
idx | The auto constant index |
AutoConstantEntry* Ogre::GpuProgramParameters::getAutoConstantEntry | ( | const size_t | index | ) |
Gets a specific Auto Constant entry if index is in valid range otherwise returns a NULL.
index | which entry is to be retrieved |
AutoConstantIterator Ogre::GpuProgramParameters::getAutoConstantIterator | ( | void | ) | const |
Gets an iterator over the automatic constant bindings currently in place.
const AutoConstantList& Ogre::GpuProgramParameters::getAutoConstantList | ( | ) | const |
Get a reference to the list of auto constant bindings.
Definition at line 1616 of file OgreGpuProgramParams.h.
const GpuConstantDefinition& Ogre::GpuProgramParameters::getConstantDefinition | ( | const String & | name | ) | const |
Get a specific GpuConstantDefinition for a named parameter.
GpuConstantDefinitionIterator Ogre::GpuProgramParameters::getConstantDefinitionIterator | ( | void | ) | const |
Gets an iterator over the named GpuConstantDefinition instances as defined by the program for which these parameters exist.
const GpuNamedConstants& Ogre::GpuProgramParameters::getConstantDefinitions | ( | ) | const |
Get the full list of GpuConstantDefinition instances.
const DoubleConstantList& Ogre::GpuProgramParameters::getDoubleConstantList | ( | ) | const |
Get a reference to the list of double constants.
Definition at line 1604 of file OgreGpuProgramParams.h.
const GpuLogicalBufferStructPtr& Ogre::GpuProgramParameters::getDoubleLogicalBufferStruct | ( | ) | const |
Retrieves the logical index relating to a physical index in the int buffer, for programs which support that (low-level programs and high-level programs which use logical parameter indexes).
Definition at line 1576 of file OgreGpuProgramParams.h.
size_t Ogre::GpuProgramParameters::getDoubleLogicalIndexForPhysicalIndex | ( | size_t | physicalIndex | ) |
Retrieves the logical index relating to a physical index in the double buffer, for programs which support that (low-level programs and high-level programs which use logical parameter indexes).
double* Ogre::GpuProgramParameters::getDoublePointer | ( | size_t | pos | ) |
Get a pointer to the 'nth' item in the double buffer.
Definition at line 1606 of file OgreGpuProgramParams.h.
const double* Ogre::GpuProgramParameters::getDoublePointer | ( | size_t | pos | ) | const |
Get a pointer to the 'nth' item in the double buffer.
Definition at line 1608 of file OgreGpuProgramParams.h.
const FloatConstantList& Ogre::GpuProgramParameters::getFloatConstantList | ( | ) | const |
Get a reference to the list of float constants.
Definition at line 1598 of file OgreGpuProgramParams.h.
const GpuLogicalBufferStructPtr& Ogre::GpuProgramParameters::getFloatLogicalBufferStruct | ( | ) | const |
Get the current list of mappings from low-level logical param indexes to physical buffer locations in the float buffer.
Definition at line 1558 of file OgreGpuProgramParams.h.
size_t Ogre::GpuProgramParameters::getFloatLogicalIndexForPhysicalIndex | ( | size_t | physicalIndex | ) |
Retrieves the logical index relating to a physical index in the float buffer, for programs which support that (low-level programs and high-level programs which use logical parameter indexes).
float* Ogre::GpuProgramParameters::getFloatPointer | ( | size_t | pos | ) |
Get a pointer to the 'nth' item in the float buffer.
Definition at line 1600 of file OgreGpuProgramParams.h.
const float* Ogre::GpuProgramParameters::getFloatPointer | ( | size_t | pos | ) | const |
Get a pointer to the 'nth' item in the float buffer.
Definition at line 1602 of file OgreGpuProgramParams.h.
const IntConstantList& Ogre::GpuProgramParameters::getIntConstantList | ( | ) | const |
Get a reference to the list of int constants.
Definition at line 1610 of file OgreGpuProgramParams.h.
const GpuLogicalBufferStructPtr& Ogre::GpuProgramParameters::getIntLogicalBufferStruct | ( | ) | const |
Get the current list of mappings from low-level logical param indexes to physical buffer locations in the integer buffer.
Definition at line 1596 of file OgreGpuProgramParams.h.
size_t Ogre::GpuProgramParameters::getIntLogicalIndexForPhysicalIndex | ( | size_t | physicalIndex | ) |
Retrieves the logical index relating to a physical index in the int buffer, for programs which support that (low-level programs and high-level programs which use logical parameter indexes).
int* Ogre::GpuProgramParameters::getIntPointer | ( | size_t | pos | ) |
Get a pointer to the 'nth' item in the int buffer.
Definition at line 1612 of file OgreGpuProgramParams.h.
const int* Ogre::GpuProgramParameters::getIntPointer | ( | size_t | pos | ) | const |
Get a pointer to the 'nth' item in the int buffer.
Definition at line 1614 of file OgreGpuProgramParams.h.
|
static |
Returns the number of auto constant definitions.
size_t Ogre::GpuProgramParameters::getPassIterationNumberIndex | ( | ) | const |
Get the physical buffer index of the pass iteration number constant.
Definition at line 1988 of file OgreGpuProgramParams.h.
const GpuSharedParamUsageList& Ogre::GpuProgramParameters::getSharedParameters | ( | ) | const |
Get the list of shared parameter sets.
const SubroutineMap& Ogre::GpuProgramParameters::getSubroutineMap | ( | ) | const |
Get map with.
Definition at line 2046 of file OgreGpuProgramParams.h.
bool Ogre::GpuProgramParameters::getTransposeMatrices | ( | void | ) | const |
Gets whether or not matrices are to be transposed when set.
Definition at line 1947 of file OgreGpuProgramParams.h.
bool Ogre::GpuProgramParameters::hasAutoConstants | ( | void | ) | const |
Returns true if this instance has any automatic constants.
Definition at line 1684 of file OgreGpuProgramParams.h.
bool Ogre::GpuProgramParameters::hasLogicalIndexedParameters | ( | ) | const |
Does this parameter set include logically indexed parameters?
Definition at line 1332 of file OgreGpuProgramParams.h.
References Ogre::SharedPtr< T >::isNull().
bool Ogre::GpuProgramParameters::hasNamedParameters | ( | ) | const |
Does this parameter set include named parameters?
Definition at line 1326 of file OgreGpuProgramParams.h.
References Ogre::SharedPtr< T >::isNull().
bool Ogre::GpuProgramParameters::hasPassIterationNumber | ( | ) | const |
Does this parameters object have a pass iteration number constant?
Definition at line 1985 of file OgreGpuProgramParams.h.
void Ogre::GpuProgramParameters::incPassIterationNumber | ( | void | ) |
increments the multipass number entry by 1 if it exists
bool Ogre::GpuProgramParameters::isUsingSharedParameters | ( | const String & | sharedParamsName | ) | const |
Returns whether this parameter set is using the named shared parameter set.
|
inherited |
Definition at line 96 of file OgreMemoryAllocatedObject.h.
|
inherited |
Definition at line 102 of file OgreMemoryAllocatedObject.h.
|
inherited |
Definition at line 108 of file OgreMemoryAllocatedObject.h.
|
inherited |
Definition at line 113 of file OgreMemoryAllocatedObject.h.
|
inherited |
Definition at line 119 of file OgreMemoryAllocatedObject.h.
|
inherited |
operator new, with debug line info
Definition at line 68 of file OgreMemoryAllocatedObject.h.
|
inherited |
Definition at line 73 of file OgreMemoryAllocatedObject.h.
|
inherited |
placement operator new
Definition at line 79 of file OgreMemoryAllocatedObject.h.
|
inherited |
array operator new, with debug line info
Definition at line 86 of file OgreMemoryAllocatedObject.h.
|
inherited |
Definition at line 91 of file OgreMemoryAllocatedObject.h.
GpuProgramParameters& Ogre::GpuProgramParameters::operator= | ( | const GpuProgramParameters & | oth | ) |
Operator = overload.
void Ogre::GpuProgramParameters::removeAllSharedParameters | ( | ) |
Stop using all shared parameter sets.
void Ogre::GpuProgramParameters::removeSharedParameters | ( | const String & | sharedParamsName | ) |
Stop using the named shared parameter set.
void Ogre::GpuProgramParameters::setAutoConstant | ( | size_t | index, |
AutoConstantType | acType, | ||
size_t | extraInfo = 0 |
||
) |
Sets up a constant which will automatically be updated by the system.
index | The location in the constant list to place this updated constant every time it is changed. Note that because of the nature of the types, we know how big the parameter details will be so you don't need to set that like you do for manual constants. |
acType | The type of automatic constant to set |
extraInfo | If the constant type needs more information (like a light index) put it here. |
void Ogre::GpuProgramParameters::setAutoConstant | ( | size_t | index, |
AutoConstantType | acType, | ||
uint16 | extraInfo1, | ||
uint16 | extraInfo2 | ||
) |
Sets up a constant which will automatically be updated by the system.
index | The location in the constant list to place this updated constant every time it is changed. Note that because of the nature of the types, we know how big the parameter details will be so you don't need to set that like you do for manual constants. |
acType | The type of automatic constant to set |
extraInfo1 | The first extra parameter required by the auto constant type |
extraInfo2 | The first extra parameter required by the auto constant type |
void Ogre::GpuProgramParameters::setAutoConstantReal | ( | size_t | index, |
AutoConstantType | acType, | ||
Real | rData | ||
) |
void Ogre::GpuProgramParameters::setConstant | ( | size_t | index, |
const Vector4 & | vec | ||
) |
Sets a 4-element floating-point parameter to the program.
index | The logical constant index at which to place the parameter (each constant is a 4D float) |
vec | The value to set |
void Ogre::GpuProgramParameters::setConstant | ( | size_t | index, |
Real | val | ||
) |
Sets a single floating-point parameter to the program.
index | The logical constant index at which to place the parameter (each constant is a 4D float) |
val | The value to set |
void Ogre::GpuProgramParameters::setConstant | ( | size_t | index, |
const Vector3 & | vec | ||
) |
Sets a 4-element floating-point parameter to the program via Vector3.
index | The logical constant index at which to place the parameter (each constant is a 4D float). Note that since you're passing a Vector3, the last element of the 4-element value will be set to 1 (a homogeneous vector) |
vec | The value to set |
void Ogre::GpuProgramParameters::setConstant | ( | size_t | index, |
const Vector2 & | vec | ||
) |
Sets a 4-element floating-point parameter to the program via Vector2.
index | The logical constant index at which to place the parameter (each constant is a 4D float). Note that since you're passing a Vector2, the last 2 elements of the 4-element value will be set to 1 (a homogeneous vector) |
vec | The value to set |
void Ogre::GpuProgramParameters::setConstant | ( | size_t | index, |
const Matrix4 & | m | ||
) |
void Ogre::GpuProgramParameters::setConstant | ( | size_t | index, |
const Matrix4 * | m, | ||
size_t | numEntries | ||
) |
Sets a list of Matrix4 parameters to the program.
void Ogre::GpuProgramParameters::setConstant | ( | size_t | index, |
const float * | val, | ||
size_t | count | ||
) |
Sets a multiple value constant floating-point parameter to the program.
index | The logical constant index at which to start placing parameters (each constant is a 4D float) |
val | Pointer to the values to write, must contain 4*count floats |
count | The number of groups of 4 floats to write |
void Ogre::GpuProgramParameters::setConstant | ( | size_t | index, |
const double * | val, | ||
size_t | count | ||
) |
Sets a multiple value constant floating-point parameter to the program.
index | The logical constant index at which to start placing parameters (each constant is a 4D float) |
val | Pointer to the values to write, must contain 4*count floats |
count | The number of groups of 4 floats to write |
void Ogre::GpuProgramParameters::setConstant | ( | size_t | index, |
const ColourValue & | colour | ||
) |
Sets a ColourValue parameter to the program.
index | The logical constant index at which to place the parameter (each constant is a 4D float) |
colour | The value to set |
void Ogre::GpuProgramParameters::setConstant | ( | size_t | index, |
const int * | val, | ||
size_t | count | ||
) |
Sets a multiple value constant integer parameter to the program.
index | The logical constant index at which to place the parameter (each constant is a 4D integer) |
val | Pointer to the values to write, must contain 4*count ints |
count | The number of groups of 4 ints to write |
void Ogre::GpuProgramParameters::setConstantFromTime | ( | size_t | index, |
Real | factor | ||
) |
Sets a named parameter up to track a derivation of the current time.
index | The index of the parameter |
factor | The amount by which to scale the time value |
void Ogre::GpuProgramParameters::setIgnoreMissingParams | ( | bool | state | ) |
Tells the program whether to ignore missing parameters or not.
Definition at line 1725 of file OgreGpuProgramParams.h.
void Ogre::GpuProgramParameters::setNamedAutoConstant | ( | const String & | name, |
AutoConstantType | acType, | ||
size_t | extraInfo = 0 |
||
) |
Sets up a constant which will automatically be updated by the system.
name | The name of the parameter |
acType | The type of automatic constant to set |
extraInfo | If the constant type needs more information (like a light index) put it here. |
void Ogre::GpuProgramParameters::setNamedAutoConstant | ( | const String & | name, |
AutoConstantType | acType, | ||
uint16 | extraInfo1, | ||
uint16 | extraInfo2 | ||
) |
Sets up a constant which will automatically be updated by the system.
name | The name of the parameter |
acType | The type of automatic constant to set |
extraInfo1 | The first extra info required by this auto constant type |
extraInfo2 | The first extra info required by this auto constant type |
void Ogre::GpuProgramParameters::setNamedAutoConstantReal | ( | const String & | name, |
AutoConstantType | acType, | ||
Real | rData | ||
) |
Sets a single value constant floating-point parameter to the program.
name | The name of the parameter |
val | The value to set |
void Ogre::GpuProgramParameters::setNamedConstant | ( | const String & | name, |
int | val | ||
) |
Sets a single value constant integer parameter to the program.
name | The name of the parameter |
val | The value to set |
Sets a Vector4 parameter to the program.
name | The name of the parameter |
vec | The value to set |
Sets a Vector3 parameter to the program.
name | The name of the parameter |
vec | The value to set |
Sets a Vector2 parameter to the program.
name | The name of the parameter |
vec | The value to set |
Sets a Matrix4 parameter to the program.
name | The name of the parameter |
m | The value to set |
void Ogre::GpuProgramParameters::setNamedConstant | ( | const String & | name, |
const Matrix4 * | m, | ||
size_t | numEntries | ||
) |
Sets a list of Matrix4 parameters to the program.
void Ogre::GpuProgramParameters::setNamedConstant | ( | const String & | name, |
const float * | val, | ||
size_t | count, | ||
size_t | multiple = 4 |
||
) |
Sets a multiple value constant floating-point parameter to the program.
name | The name of the parameter |
val | Pointer to the values to write |
count | The number of 'multiples' of floats to write |
multiple | The number of raw entries in each element to write, the default is 4 so count = 1 would write 4 floats. |
void Ogre::GpuProgramParameters::setNamedConstant | ( | const String & | name, |
const double * | val, | ||
size_t | count, | ||
size_t | multiple = 4 |
||
) |
Sets a multiple value constant floating-point parameter to the program.
name | The name of the parameter |
val | Pointer to the values to write |
count | The number of 'multiples' of floats to write |
multiple | The number of raw entries in each element to write, the default is 4 so count = 1 would write 4 floats. |
void Ogre::GpuProgramParameters::setNamedConstant | ( | const String & | name, |
const ColourValue & | colour | ||
) |
Sets a ColourValue parameter to the program.
name | The name of the parameter |
colour | The value to set |
void Ogre::GpuProgramParameters::setNamedConstant | ( | const String & | name, |
const int * | val, | ||
size_t | count, | ||
size_t | multiple = 4 |
||
) |
Sets a multiple value constant floating-point parameter to the program.
name | The name of the parameter |
val | Pointer to the values to write |
count | The number of 'multiples' of floats to write |
multiple | The number of raw entries in each element to write, the default is 4 so count = 1 would write 4 floats. |
Sets a named parameter up to track a derivation of the current time.
name | The name of the parameter |
factor | The amount by which to scale the time value |
void Ogre::GpuProgramParameters::setNamedSubroutine | ( | const String & | subroutineSlot, |
const String & | subroutine | ||
) |
Set subroutine name by slot name.
void Ogre::GpuProgramParameters::setSubroutine | ( | size_t | index, |
const String & | subroutine | ||
) |
Set subroutine name by slot index.
void Ogre::GpuProgramParameters::setTransposeMatrices | ( | bool | val | ) |
Sets whether or not we need to transpose the matrices passed in from the rest of OGRE.
Definition at line 1945 of file OgreGpuProgramParams.h.
|
staticprotected |
Definition at line 1257 of file OgreGpuProgramParams.h.
|
protected |
physical index for active pass iteration parameter real constant entry;
Definition at line 1284 of file OgreGpuProgramParams.h.
|
protected |
List of automatically updated parameters.
Definition at line 1276 of file OgreGpuProgramParams.h.
|
protected |
The combined variability masks of all parameters.
Definition at line 1278 of file OgreGpuProgramParams.h.
|
protected |
Packed list of double-point constants (physical indexing)
Definition at line 1261 of file OgreGpuProgramParams.h.
|
protected |
Logical index to physical index map - for low-level programs or high-level programs which pass params this way.
Definition at line 1269 of file OgreGpuProgramParams.h.
|
protected |
Packed list of floating-point constants (physical indexing)
Definition at line 1259 of file OgreGpuProgramParams.h.
|
protected |
Logical index to physical index map - for low-level programs or high-level programs which pass params this way.
Definition at line 1266 of file OgreGpuProgramParams.h.
|
protected |
flag to indicate if names not found will be ignored
Definition at line 1282 of file OgreGpuProgramParams.h.
|
protected |
Packed list of integer constants (physical indexing)
Definition at line 1263 of file OgreGpuProgramParams.h.
|
protected |
Logical index to physical index map - for low-level programs or high-level programs which pass params this way.
Definition at line 1272 of file OgreGpuProgramParams.h.
|
protected |
Mapping from parameter names to def - high-level programs are expected to populate this.
Definition at line 1274 of file OgreGpuProgramParams.h.
|
mutableprotected |
Definition at line 1304 of file OgreGpuProgramParams.h.
|
protected |
Definition at line 1301 of file OgreGpuProgramParams.h.
|
protected |
Definition at line 1255 of file OgreGpuProgramParams.h.
|
protected |
Do we need to transpose matrices?
Definition at line 1280 of file OgreGpuProgramParams.h.
Copyright © 2012 Torus Knot Software Ltd
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
Last modified Sat Sep 20 2014 20:06:41