OGRE
1.11.6
Object-Oriented Graphics Rendering Engine
|
A group of manually updated parameters that are shared between many parameter sets. More...
#include <OgreGpuProgramParams.h>
Public Member Functions | |
GpuSharedParameters (const String &name) | |
const Any & | _getRenderSystemData () const |
Internal method that the RenderSystem might use to store optional data. More... | |
void | _markClean () |
Mark the shared set as being clean (values successfully updated by the render system). More... | |
void | _markDirty () |
Mark the shared set as being dirty (values modified and not yet updated in render system). More... | |
void | _setRenderSystemData (const Any &data) const |
Internal method that the RenderSystem might use to store optional data. More... | |
void | addConstantDefinition (const String &name, GpuConstantType constType, size_t arraySize=1) |
Add a new constant definition to this shared set of parameters. More... | |
size_t | calculateSize (void) const |
Calculate the expected size of the shared parameter buffer based on constant definition data types. 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 user. 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... | |
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... | |
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... | |
size_t | getFrameLastUpdated () const |
Get the frame in which this shared parameter set was last updated. More... | |
const IntConstantList & | getIntConstantList () const |
Get a reference to the list of int constants. 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... | |
const String & | getName () |
Get the name of this shared parameter set. More... | |
const UnsignedIntConstantList & | getUnsignedIntConstantList () const |
uint * | getUnsignedIntPointer (size_t pos) |
Get a pointer to the 'nth' item in the uint buffer. More... | |
const uint * | getUnsignedIntPointer (size_t pos) const |
Get a pointer to the 'nth' item in the uint buffer. More... | |
unsigned long | getVersion () const |
Get the version number of this shared parameter set, can be used to identify when changes have occurred. More... | |
bool | isDirty () const |
True if this parameter set is dirty (values have been modified, but the render system has not updated them yet). More... | |
void | removeAllConstantDefinitions () |
Remove a constant definition from this shared set of parameters. More... | |
void | removeConstantDefinition (const String &name) |
Remove a constant definition from this shared set of parameters. More... | |
void | setNamedConstant (const String &name, Real val) |
Sets a single value constant parameter to the program. More... | |
void | setNamedConstant (const String &name, int val) |
void | setNamedConstant (const String &name, uint val) |
void | setNamedConstant (const String &name, const Vector4 &vec) |
void | setNamedConstant (const String &name, const Vector3 &vec) |
void | setNamedConstant (const String &name, const Vector2 &vec) |
void | setNamedConstant (const String &name, const Matrix4 &m) |
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) |
void | setNamedConstant (const String &name, const double *val, size_t count) |
void | setNamedConstant (const String &name, const ColourValue &colour) |
void | setNamedConstant (const String &name, const int *val, size_t count) |
void | setNamedConstant (const String &name, const uint *val, size_t count) |
A group of manually updated parameters that are shared between many parameter sets.
Ogre::GpuSharedParameters::GpuSharedParameters | ( | const String & | name | ) |
|
inline |
Get the name of this shared parameter set.
Referenced by Ogre::GpuSharedParametersUsage::getName().
void Ogre::GpuSharedParameters::addConstantDefinition | ( | const String & | name, |
GpuConstantType | constType, | ||
size_t | arraySize = 1 |
||
) |
Add a new constant definition to this shared set of parameters.
void Ogre::GpuSharedParameters::removeConstantDefinition | ( | const String & | name | ) |
Remove a constant definition from this shared set of parameters.
void Ogre::GpuSharedParameters::removeAllConstantDefinitions | ( | ) |
Remove a constant definition from this shared set of parameters.
|
inline |
Get the version number of this shared parameter set, can be used to identify when changes have occurred.
size_t Ogre::GpuSharedParameters::calculateSize | ( | void | ) | const |
Calculate the expected size of the shared parameter buffer based on constant definition data types.
|
inline |
True if this parameter set is dirty (values have been modified, but the render system has not updated them yet).
void Ogre::GpuSharedParameters::_markClean | ( | ) |
Mark the shared set as being clean (values successfully updated by the render system).
void Ogre::GpuSharedParameters::_markDirty | ( | ) |
Mark the shared set as being dirty (values modified and not yet updated in render system).
|
inline |
Get the frame in which this shared parameter set was last updated.
GpuConstantDefinitionIterator Ogre::GpuSharedParameters::getConstantDefinitionIterator | ( | void | ) | const |
Gets an iterator over the named GpuConstantDefinition instances as defined by the user.
const GpuConstantDefinition& Ogre::GpuSharedParameters::getConstantDefinition | ( | const String & | name | ) | const |
Get a specific GpuConstantDefinition for a named parameter.
const GpuNamedConstants& Ogre::GpuSharedParameters::getConstantDefinitions | ( | ) | const |
Get the full list of GpuConstantDefinition instances.
Sets a single value constant parameter to the program.
Different types of GPU programs support different types of constant parameters. For example, it's relatively common to find that vertex programs only support floating point constants, and that fragment programs only support integer (fixed point) parameters. This can vary depending on the program version supported by the graphics card being used. You should consult the documentation for the type of low level program you are using, or alternatively use the methods provided on RenderSystemCapabilities to determine the options.
Another possible limitation is that some systems only allow constants to be set on certain boundaries, e.g. in sets of 4 values for example. Again, see RenderSystemCapabilities for full details.
name | The name of the parameter |
val | The value to set |
void Ogre::GpuSharedParameters::setNamedConstant | ( | const String & | name, |
int | val | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void Ogre::GpuSharedParameters::setNamedConstant | ( | const String & | name, |
const Matrix4 * | m, | ||
size_t | numEntries | ||
) |
Sets a list of Matrix4 parameters to the program.
void Ogre::GpuSharedParameters::setNamedConstant | ( | const String & | name, |
const float * | val, | ||
size_t | count | ||
) |
void Ogre::GpuSharedParameters::setNamedConstant | ( | const String & | name, |
const double * | val, | ||
size_t | count | ||
) |
void Ogre::GpuSharedParameters::setNamedConstant | ( | const String & | name, |
const ColourValue & | colour | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void Ogre::GpuSharedParameters::setNamedConstant | ( | const String & | name, |
const int * | val, | ||
size_t | count | ||
) |
void Ogre::GpuSharedParameters::setNamedConstant | ( | const String & | name, |
const uint * | val, | ||
size_t | count | ||
) |
|
inline |
Get a pointer to the 'nth' item in the float buffer.
|
inline |
Get a pointer to the 'nth' item in the float buffer.
|
inline |
Get a pointer to the 'nth' item in the double buffer.
|
inline |
Get a pointer to the 'nth' item in the double buffer.
|
inline |
Get a pointer to the 'nth' item in the int buffer.
|
inline |
Get a pointer to the 'nth' item in the int buffer.
|
inline |
Get a pointer to the 'nth' item in the uint buffer.
|
inline |
Get a pointer to the 'nth' item in the uint buffer.
|
inline |
Get a reference to the list of float constants.
|
inline |
Get a reference to the list of double constants.
|
inline |
Get a reference to the list of int constants.
|
inline |
|
inline |
Internal method that the RenderSystem might use to store optional data.
|
inline |
Internal method that the RenderSystem might use to store optional data.