#include <OgreGpuProgram.h>
Public Types | |
typedef VectorIterator< RealConstantList > | RealConstantIterator |
typedef VectorIterator< IntConstantList > | IntConstantIterator |
typedef VectorIterator< AutoConstantList > | AutoConstantIterator |
enum | AutoConstantType { ACT_WORLD_MATRIX, ACT_WORLD_MATRIX_ARRAY_3x4, ACT_WORLD_MATRIX_ARRAY, ACT_VIEW_MATRIX, ACT_PROJECTION_MATRIX, ACT_VIEWPROJ_MATRIX, ACT_WORLDVIEW_MATRIX, ACT_WORLDVIEWPROJ_MATRIX, ACT_INVERSE_WORLD_MATRIX, ACT_INVERSE_WORLDVIEW_MATRIX, ACT_LIGHT_DIFFUSE_COLOUR, ACT_LIGHT_SPECULAR_COLOUR, ACT_LIGHT_ATTENUATION, ACT_LIGHT_POSITION, ACT_LIGHT_DIRECTION, ACT_LIGHT_POSITION_OBJECT_SPACE, ACT_LIGHT_DIRECTION_OBJECT_SPACE, ACT_LIGHT_DISTANCE_OBJECT_SPACE, ACT_SHADOW_EXTRUSION_DISTANCE, ACT_CAMERA_POSITION_OBJECT_SPACE, ACT_AMBIENT_LIGHT_COLOUR, ACT_TEXTURE_VIEWPROJ_MATRIX } |
Defines the types of automatically updated values that may be bound to GpuProgram parameters, or used to modify parameters on a per-object basis. More... | |
Public Methods | |
GpuProgramParameters () | |
~GpuProgramParameters () | |
void | setConstant (size_t index, const Vector4 &vec) |
Sets a 4-element floating-point parameter to the program. | |
void | setConstant (size_t index, const Vector3 &vec) |
Sets a 4-element floating-point parameter to the program via Vector3. | |
void | setConstant (size_t index, const Matrix4 &m) |
Sets a Matrix4 parameter to the program. | |
void | setConstant (size_t index, const Matrix4 *m, size_t numEntries) |
Sets a list of Matrix4 parameters to the program. | |
void | setConstant (size_t index, const Real *val, size_t count) |
Sets a multiple value constant floating-point parameter to the program. | |
void | setConstant (size_t index, const ColourValue &colour) |
Sets a ColourValue parameter to the program. | |
void | setConstant (size_t index, const int *val, size_t count) |
Sets a multiple value constant integer parameter to the program. | |
void | resetRealConstants (void) |
Deletes the contents of the Real constants registers. | |
void | resetIntConstants (void) |
Deletes the contents of the int constants registers. | |
RealConstantIterator | getRealConstantIterator (void) |
Gets an iterator over the Real constant parameters. | |
IntConstantIterator | getIntConstantIterator (void) |
Gets an iterator over the integer constant parameters. | |
size_t | getRealConstantCount (void) const |
Gets the number of Real constants that have been set. | |
size_t | getIntConstantCount (void) const |
Gets the number of int constants that have been set. | |
bool | hasRealConstantParams (void) const |
Returns true if there are any Real constants contained here. | |
bool | hasIntConstantParams (void) const |
Returns true if there are any int constants contained here. | |
void | setAutoConstant (size_t index, AutoConstantType acType, size_t extraInfo=0) |
Sets up a constant which will automatically be updated by the system. | |
void | setConstantFromTime (size_t index, Real factor) |
Sets a named parameter up to track a derivation of the current time. | |
void | clearAutoConstants (void) |
Clears all the existing automatic constants. | |
AutoConstantIterator | getAutoConstantIterator (void) |
Gets an iterator over the automatic constant bindings currently in place. | |
bool | hasAutoConstants (void) const |
Returns true if this instance has any automatic constants. | |
void | _updateAutoParamsNoLights (const AutoParamDataSource &source) |
Updates the automatic parameters (except lights) based on the details provided. | |
void | _updateAutoParamsLightsOnly (const AutoParamDataSource &source) |
Updates the automatic parameters for lights based on the details provided. | |
void | setNamedConstant (const String &name, Real val) |
Sets a single value constant floating-point parameter to the program. | |
void | setNamedConstant (const String &name, int val) |
Sets a single value constant integer parameter to the program. | |
void | setNamedConstant (const String &name, const Vector4 &vec) |
Sets a Vector4 parameter to the program. | |
void | setNamedConstant (const String &name, const Vector3 &vec) |
Sets a Vector3 parameter to the program. | |
void | setNamedConstant (const String &name, const Matrix4 &m) |
Sets a Matrix4 parameter to the program. | |
void | setNamedConstant (const String &name, const Matrix4 *m, size_t numEntries) |
Sets a list of Matrix4 parameters to the program. | |
void | setNamedConstant (const String &name, const Real *val, size_t count) |
Sets a multiple value constant floating-point parameter to the program. | |
void | setNamedConstant (const String &name, const ColourValue &colour) |
Sets a ColourValue parameter to the program. | |
void | setNamedConstant (const String &name, const int *val, size_t count) |
Sets a multiple value constant integer parameter to the program. | |
void | setNamedAutoConstant (const String &name, AutoConstantType acType, size_t extraInfo=0) |
Sets up a constant which will automatically be updated by the system. | |
void | setNamedConstantFromTime (const String &name, Real factor) |
Sets a named parameter up to track a derivation of the current time. | |
void | _mapParameterNameToIndex (const String &name, size_t index) |
Internal method for associating a parameter name with an index. | |
size_t | getParamIndex (const String &name) const |
Gets the constant index associated with a named parameter. | |
void | setTransposeMatrices (bool val) |
Sets whether or not we need to transpose the matrices passed in from the rest of OGRE. | |
bool | getTransposeMatrices (void) const |
Gets whether or not matrices are to be transposed when set. | |
Protected Types | |
typedef std::vector< RealConstantEntry > | RealConstantList |
typedef std::vector< IntConstantEntry > | IntConstantList |
typedef std::vector< AutoConstantEntry > | AutoConstantList |
typedef std::map< String, size_t > | ParamNameMap |
Mapping from parameter names to indexes - high-level programs are expected to populate this. | |
Protected Attributes | |
RealConstantList | mRealConstants |
Packed list of floating-point constants. | |
IntConstantList | mIntConstants |
Packed list of integer constants. | |
AutoConstantList | mAutoConstants |
List of automatically updated parameters. | |
ParamNameMap | mParamNameMap |
bool | mTransposeMatrices |
Do we need to transpose matrices? |
GpuProgramParameters objects should be created through the GpuProgramManager and may be shared between multiple GpuProgram instances. For this reason they are managed using a shared pointer, which will ensure they are automatically deleted when no program is using them anymore.
Definition at line 55 of file OgreGpuProgram.h.
|
Definition at line 272 of file OgreGpuProgram.h. Referenced by getAutoConstantIterator(). |
|
Definition at line 153 of file OgreGpuProgram.h. |
|
Definition at line 235 of file OgreGpuProgram.h. Referenced by getIntConstantIterator(). |
|
Definition at line 151 of file OgreGpuProgram.h. |
|
Mapping from parameter names to indexes - high-level programs are expected to populate this.
Definition at line 161 of file OgreGpuProgram.h. |
|
Definition at line 234 of file OgreGpuProgram.h. Referenced by getRealConstantIterator(). |
|
Definition at line 150 of file OgreGpuProgram.h. |
|
Defines the types of automatically updated values that may be bound to GpuProgram parameters, or used to modify parameters on a per-object basis.
Definition at line 61 of file OgreGpuProgram.h. |
|
Definition at line 100 of file OgreGpuProgram.cpp. |
|
Definition at line 168 of file OgreGpuProgram.h. |
|
Internal method for associating a parameter name with an index.
Definition at line 346 of file OgreGpuProgram.cpp. References mParamNameMap. |
|
|
|
Clears all the existing automatic constants.
Definition at line 203 of file OgreGpuProgram.cpp. References mAutoConstants. |
|
Gets an iterator over the automatic constant bindings currently in place.
Definition at line 208 of file OgreGpuProgram.cpp. References AutoConstantIterator, and mAutoConstants. |
|
Gets the number of int constants that have been set.
Definition at line 244 of file OgreGpuProgram.h. |
|
Gets an iterator over the integer constant parameters.
Definition at line 431 of file OgreGpuProgram.cpp. References IntConstantIterator, and mIntConstants. |
|
Gets the constant index associated with a named parameter.
Definition at line 352 of file OgreGpuProgram.cpp. References Except, and mParamNameMap. Referenced by setNamedAutoConstant(), setNamedConstant(), and setNamedConstantFromTime(). |
|
Gets the number of Real constants that have been set.
Definition at line 242 of file OgreGpuProgram.h. |
|
Gets an iterator over the Real constant parameters.
Definition at line 426 of file OgreGpuProgram.cpp. References mRealConstants, and RealConstantIterator. |
|
Gets whether or not matrices are to be transposed when set.
Definition at line 441 of file OgreGpuProgram.h. |
|
Returns true if this instance has any automatic constants.
Definition at line 276 of file OgreGpuProgram.h. Referenced by _updateAutoParamsLightsOnly(), and _updateAutoParamsNoLights(). |
|
Returns true if there are any int constants contained here.
Definition at line 248 of file OgreGpuProgram.h. |
|
Returns true if there are any Real constants contained here.
Definition at line 246 of file OgreGpuProgram.h. |
|
Deletes the contents of the int constants registers.
Definition at line 232 of file OgreGpuProgram.h. |
|
Deletes the contents of the Real constants registers.
Definition at line 230 of file OgreGpuProgram.h. |
|
Sets up a constant which will automatically be updated by the system.
Definition at line 198 of file OgreGpuProgram.cpp. References mAutoConstants. Referenced by setNamedAutoConstant(). |
|
Sets a multiple value constant integer parameter to the program.
Definition at line 182 of file OgreGpuProgram.cpp. References Ogre::GpuProgramParameters::IntConstantEntry::isSet, mIntConstants, and Ogre::GpuProgramParameters::IntConstantEntry::val. |
|
Sets a ColourValue parameter to the program.
Definition at line 160 of file OgreGpuProgram.cpp. References setConstant(), and Ogre::ColourValue::val. |
|
Sets a multiple value constant floating-point parameter to the program.
Definition at line 165 of file OgreGpuProgram.cpp. References Ogre::GpuProgramParameters::RealConstantEntry::isSet, mRealConstants, Ogre::Real, and Ogre::GpuProgramParameters::RealConstantEntry::val. |
|
Sets a list of Matrix4 parameters to the program.
Definition at line 135 of file OgreGpuProgram.cpp. References Ogre::Matrix4::transpose(). |
|
Sets a Matrix4 parameter to the program.
Definition at line 115 of file OgreGpuProgram.cpp. References Ogre::Matrix4::transpose(). |
|
Sets a 4-element floating-point parameter to the program via Vector3.
Definition at line 110 of file OgreGpuProgram.cpp. References setConstant(), Ogre::Vector3::x, Ogre::Vector3::y, and Ogre::Vector3::z. |
|
Sets a 4-element floating-point parameter to the program.
Definition at line 105 of file OgreGpuProgram.cpp. References Ogre::Vector4::val. Referenced by _updateAutoParamsLightsOnly(), _updateAutoParamsNoLights(), setConstant(), setNamedConstant(), and Ogre::FloatGpuParameterControllerValue::setValue(). |
|
Sets a named parameter up to track a derivation of the current time.
Definition at line 414 of file OgreGpuProgram.cpp. References Ogre::Real. Referenced by setNamedConstantFromTime(). |
|
Sets up a constant which will automatically be updated by the system.
Definition at line 409 of file OgreGpuProgram.cpp. References getParamIndex(), and setAutoConstant(). |
|
Sets a multiple value constant integer parameter to the program.
Definition at line 404 of file OgreGpuProgram.cpp. References getParamIndex(), and setConstant(). |
|
Sets a ColourValue parameter to the program.
Definition at line 399 of file OgreGpuProgram.cpp. References getParamIndex(), and setConstant(). |
|
Sets a multiple value constant floating-point parameter to the program.
Definition at line 394 of file OgreGpuProgram.cpp. References getParamIndex(), Ogre::Real, and setConstant(). |
|
Sets a list of Matrix4 parameters to the program.
Definition at line 388 of file OgreGpuProgram.cpp. References getParamIndex(), and setConstant(). |
|
Sets a Matrix4 parameter to the program.
Definition at line 383 of file OgreGpuProgram.cpp. References getParamIndex(), and setConstant(). |
|
Sets a Vector3 parameter to the program.
Definition at line 378 of file OgreGpuProgram.cpp. References getParamIndex(), and setConstant(). |
|
Sets a Vector4 parameter to the program.
Definition at line 373 of file OgreGpuProgram.cpp. References getParamIndex(), and setConstant(). |
|
Sets a single value constant integer parameter to the program.
Definition at line 368 of file OgreGpuProgram.cpp. References getParamIndex(), and setConstant(). |
|
Sets a single value constant floating-point parameter to the program.
Definition at line 363 of file OgreGpuProgram.cpp. References getParamIndex(), Ogre::Real, and setConstant(). |
|
Sets a named parameter up to track a derivation of the current time.
Definition at line 421 of file OgreGpuProgram.cpp. References getParamIndex(), Ogre::Real, and setConstantFromTime(). |
|
Sets whether or not we need to transpose the matrices passed in from the rest of OGRE.
Definition at line 439 of file OgreGpuProgram.h. |
|
List of automatically updated parameters.
Definition at line 159 of file OgreGpuProgram.h. Referenced by _updateAutoParamsLightsOnly(), _updateAutoParamsNoLights(), clearAutoConstants(), getAutoConstantIterator(), and setAutoConstant(). |
|
Packed list of integer constants.
Definition at line 157 of file OgreGpuProgram.h. Referenced by getIntConstantIterator(), and setConstant(). |
|
Definition at line 162 of file OgreGpuProgram.h. Referenced by _mapParameterNameToIndex(), and getParamIndex(). |
|
Packed list of floating-point constants.
Definition at line 155 of file OgreGpuProgram.h. Referenced by getRealConstantIterator(), and setConstant(). |
|
Do we need to transpose matrices?
Definition at line 164 of file OgreGpuProgram.h. |
Copyright © 2002-2003 by The OGRE Team
Last modified Fri May 14 23:26:12 2004