#include <OgreGpuProgram.h>
Public Types | |
typedef ConstVectorIterator< RealConstantList > | RealConstantIterator |
typedef ConstVectorIterator< IntConstantList > | IntConstantIterator |
typedef ConstVectorIterator< AutoConstantList > | AutoConstantIterator |
enum | AutoConstantType { ACT_WORLD_MATRIX, ACT_INVERSE_WORLD_MATRIX, ACT_TRANSPOSE_WORLD_MATRIX, ACT_INVERSE_TRANSPOSE_WORLD_MATRIX, ACT_WORLD_MATRIX_ARRAY_3x4, ACT_WORLD_MATRIX_ARRAY, ACT_VIEW_MATRIX, ACT_INVERSE_VIEW_MATRIX, ACT_TRANSPOSE_VIEW_MATRIX, ACT_INVERSE_TRANSPOSE_VIEW_MATRIX, ACT_PROJECTION_MATRIX, ACT_INVERSE_PROJECTION_MATRIX, ACT_TRANSPOSE_PROJECTION_MATRIX, ACT_INVERSE_TRANSPOSE_PROJECTION_MATRIX, ACT_VIEWPROJ_MATRIX, ACT_INVERSE_VIEWPROJ_MATRIX, ACT_TRANSPOSE_VIEWPROJ_MATRIX, ACT_INVERSE_TRANSPOSE_VIEWPROJ_MATRIX, ACT_WORLDVIEW_MATRIX, ACT_INVERSE_WORLDVIEW_MATRIX, ACT_TRANSPOSE_WORLDVIEW_MATRIX, ACT_INVERSE_TRANSPOSE_WORLDVIEW_MATRIX, ACT_WORLDVIEWPROJ_MATRIX, ACT_INVERSE_WORLDVIEWPROJ_MATRIX, ACT_TRANSPOSE_WORLDVIEWPROJ_MATRIX, ACT_INVERSE_TRANSPOSE_WORLDVIEWPROJ_MATRIX, ACT_RENDER_TARGET_FLIPPING, ACT_FOG_COLOUR, ACT_FOG_PARAMS, ACT_AMBIENT_LIGHT_COLOUR, ACT_LIGHT_DIFFUSE_COLOUR, ACT_LIGHT_SPECULAR_COLOUR, ACT_LIGHT_ATTENUATION, ACT_LIGHT_POSITION, ACT_LIGHT_POSITION_OBJECT_SPACE, ACT_LIGHT_POSITION_VIEW_SPACE, ACT_LIGHT_DIRECTION, ACT_LIGHT_DIRECTION_OBJECT_SPACE, ACT_LIGHT_DIRECTION_VIEW_SPACE, ACT_LIGHT_DISTANCE_OBJECT_SPACE, ACT_LIGHT_POWER_SCALE, ACT_SHADOW_EXTRUSION_DISTANCE, ACT_CAMERA_POSITION, ACT_CAMERA_POSITION_OBJECT_SPACE, ACT_TEXTURE_VIEWPROJ_MATRIX, ACT_CUSTOM, ACT_TIME, ACT_TIME_0_X, ACT_COSTIME_0_X, ACT_SINTIME_0_X, ACT_TANTIME_0_X, ACT_TIME_0_X_PACKED, ACT_TIME_0_1, ACT_COSTIME_0_1, ACT_SINTIME_0_1, ACT_TANTIME_0_1, ACT_TIME_0_1_PACKED, ACT_TIME_0_2PI, ACT_COSTIME_0_2PI, ACT_SINTIME_0_2PI, ACT_TANTIME_0_2PI, ACT_TIME_0_2PI_PACKED, ACT_FRAME_TIME, ACT_FPS, ACT_VIEWPORT_WIDTH, ACT_VIEWPORT_HEIGHT, ACT_INVERSE_VIEWPORT_WIDTH, ACT_INVERSE_VIEWPORT_HEIGHT, ACT_VIEWPORT_SIZE, ACT_VIEW_DIRECTION, ACT_VIEW_SIDE_VECTOR, ACT_VIEW_UP_VECTOR, ACT_FOV, ACT_NEAR_CLIP_DISTANCE, ACT_FAR_CLIP_DISTANCE, ACT_PASS_NUMBER, ACT_PASS_ITERATION_NUMBER, ACT_ANIMATION_PARAMETRIC } |
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... | |
enum | ACDataType { ACDT_NONE, ACDT_INT, ACDT_REAL } |
Defines the type of the extra data item used by the auto constant. More... | |
enum | ElementType { ET_INT, ET_REAL } |
Defines the base element type of the auto constant. More... | |
Public Member Functions | |
GpuProgramParameters () | |
~GpuProgramParameters () | |
GpuProgramParameters (const GpuProgramParameters &oth) | |
Copy constructor. | |
GpuProgramParameters & | operator= (const GpuProgramParameters &oth) |
Operator = overload. | |
void | setConstant (size_t index, const Vector4 &vec) |
Sets a 4-element floating-point parameter to the program. | |
void | setConstant (size_t index, Real val) |
Sets a single 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 float *val, size_t count) |
Sets a multiple value constant floating-point parameter to the program. | |
void | setConstant (size_t index, const double *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) const |
Gets an iterator over the Real constant parameters. | |
IntConstantIterator | getIntConstantIterator (void) const |
Gets an iterator over the integer constant parameters. | |
RealConstantEntry * | getRealConstantEntry (const size_t index) |
Gets a specific Real Constant entry if index is in valid range otherwise returns a NULL. | |
IntConstantEntry * | getIntConstantEntry (const size_t index) |
Gets a specific Int Constant entry if index is in valid range otherwise returns a NULL. | |
RealConstantEntry * | getNamedRealConstantEntry (const String &name) |
Gets a Named Real Constant entry if the name is found otherwise returns a NULL. | |
IntConstantEntry * | getNamedIntConstantEntry (const String &name) |
Gets a named Int Constant entry if name is found otherwise returns a NULL. | |
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 | setAutoConstantReal (size_t index, AutoConstantType acType, Real rData) |
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) const |
Gets an iterator over the automatic constant bindings currently in place. | |
size_t | getAutoConstantCount (void) const |
Gets the number of int constants that have been set. | |
AutoConstantEntry * | getAutoConstantEntry (const size_t index) |
Gets a specific Auto Constant entry if index is in valid range otherwise returns a NULL. | |
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 | setAutoAddParamName (bool state) |
Sets the auto add parameter name flag. | |
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 float *val, size_t count) |
Sets a multiple value constant floating-point parameter to the program. | |
void | setNamedConstant (const String &name, const double *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, const size_t index) |
Internal method for associating a parameter name with an index. | |
size_t | getParamIndex (const String &name) |
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. | |
void | copyConstantsFrom (const GpuProgramParameters &source) |
Copies the values of all constants (including auto constants) from another GpuProgramParameters object. | |
size_t | addConstantDefinition (const String &name, const size_t index, const size_t elementCount, const ElementType elementType) |
Add (or update) a constant definition which describes a constant. | |
const ConstantDefinition * | getConstantDefinition (const String &name) const |
gets the constant definition associated with name if found else returns NULL | |
const ConstantDefinition * | getConstantDefinition (const size_t idx) const |
gets the constant definition using an index into the constant definition array. | |
const ConstantDefinition * | findMatchingConstantDefinition (const String &name, const size_t entryIndex, const ElementType elementType) const |
Find a matching constant defintion. | |
size_t | getNumConstantDefinitions (void) const |
Returns the number of constant definitions. | |
void | setConstantDefinitionAutoState (const size_t index, const bool isAuto, const size_t autoIndex) |
Set the constant definition's Auto state. | |
void | incPassIterationNumber (void) |
increments the multipass number entry by 1 if it exists | |
RealConstantEntry * | getPassIterationEntry (void) |
gets the MultipassEntry if it exists. | |
size_t | getPassIterationEntryIndex (void) const |
gets the MultipassEntry index. | |
Static Public Member Functions | |
const AutoConstantDefinition * | getAutoConstantDefinition (const String &name) |
gets the auto constant definition associated with name if found else returns NULL | |
const AutoConstantDefinition * | getAutoConstantDefinition (const size_t idx) |
gets the auto constant definition using an index into the auto constant definition array. | |
size_t | getNumAutoConstantDefinitions (void) |
Returns the number of auto constant definitions. | |
Protected Types | |
typedef std::vector< RealConstantEntry > | RealConstantList |
typedef std::vector< IntConstantEntry > | IntConstantList |
typedef std::vector< AutoConstantEntry > | AutoConstantList |
typedef std::vector< ConstantDefinition > | ConstantDefinitionContainer |
typedef std::map< String, size_t > | ParamNameMap |
Mapping from parameter names to NamedConstantEntry - 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. | |
ConstantDefinitionContainer | mConstantDefinitions |
Container of parameter definitions. | |
ParamNameMap | mParamNameMap |
bool | mTransposeMatrices |
Do we need to transpose matrices? | |
bool | mAutoAddParamName |
flag to indicate if names not found will be automatically added | |
RealConstantEntry * | mActivePassIterationEntry |
active pass iteration parameter real constant entry; | |
size_t | mActivePassIterationEntryIndex |
index for active pass iteration parameter real constant entry; | |
Static Protected Attributes | |
AutoConstantDefinition | AutoConstantDictionary [] |
Definition at line 55 of file OgreGpuProgram.h.
|
Definition at line 613 of file OgreGpuProgram.h. |
|
Definition at line 442 of file OgreGpuProgram.h. |
|
Definition at line 444 of file OgreGpuProgram.h. |
|
Definition at line 556 of file OgreGpuProgram.h. |
|
Definition at line 440 of file OgreGpuProgram.h. |
|
Mapping from parameter names to NamedConstantEntry - high-level programs are expected to populate this.
Definition at line 454 of file OgreGpuProgram.h. |
|
Definition at line 555 of file OgreGpuProgram.h. |
|
Definition at line 439 of file OgreGpuProgram.h. |
|
Defines the type of the extra data item used by the auto constant.
Definition at line 330 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. |
|
Defines the base element type of the auto constant.
Definition at line 341 of file OgreGpuProgram.h. |
|
|
|
Definition at line 468 of file OgreGpuProgram.h. |
|
Copy constructor.
|
|
Internal method for associating a parameter name with an index.
|
|
Updates the automatic parameters for lights based on the details provided.
|
|
Updates the automatic parameters (except lights) based on the details provided.
|
|
Add (or update) a constant definition which describes a constant.
|
|
Clears all the existing automatic constants.
|
|
Copies the values of all constants (including auto constants) from another GpuProgramParameters object.
|
|
Find a matching constant defintion. Matches name, entry index, and element type.
|
|
Gets the number of int constants that have been set.
Definition at line 617 of file OgreGpuProgram.h. |
|
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;
|
|
gets the auto constant definition associated with name if found else returns NULL
|
|
Gets a specific Auto Constant entry if index is in valid range otherwise returns a NULL. index which entry is to be retrieved |
|
Gets an iterator over the automatic constant bindings currently in place.
|
|
gets the constant definition using an index into the constant definition array. If the index is out of bounds then NULL is returned;
|
|
gets the constant definition associated with name if found else returns NULL
|
|
Gets the number of int constants that have been set.
Definition at line 584 of file OgreGpuProgram.h. |
|
Gets a specific Int Constant entry if index is in valid range otherwise returns a NULL. index which entry is to be retrieved |
|
Gets an iterator over the integer constant parameters.
|
|
Gets a named Int Constant entry if name is found otherwise returns a NULL. name The name of the entry to be retrieved |
|
Gets a Named Real Constant entry if the name is found otherwise returns a NULL. name The name of the entry to be retrieved |
|
Returns the number of auto constant definitions.
|
|
Returns the number of constant definitions.
Definition at line 863 of file OgreGpuProgram.h. |
|
Gets the constant index associated with a named parameter.
|
|
gets the MultipassEntry if it exists.
|
|
gets the MultipassEntry index. The value returned is only valid if if getMultipassEntry() does not return NULL. Definition at line 893 of file OgreGpuProgram.h. |
|
Gets the number of Real constants that have been set.
Definition at line 582 of file OgreGpuProgram.h. |
|
Gets a specific Real Constant entry if index is in valid range otherwise returns a NULL. index which entry is to be retrieved |
|
Gets an iterator over the Real constant parameters.
|
|
Gets whether or not matrices are to be transposed when set.
Definition at line 824 of file OgreGpuProgram.h. |
|
Returns true if this instance has any automatic constants.
Definition at line 624 of file OgreGpuProgram.h. |
|
Returns true if there are any int constants contained here.
Definition at line 588 of file OgreGpuProgram.h. |
|
Returns true if there are any Real constants contained here.
Definition at line 586 of file OgreGpuProgram.h. |
|
increments the multipass number entry by 1 if it exists
|
|
Operator = overload.
|
|
Deletes the contents of the int constants registers.
Definition at line 553 of file OgreGpuProgram.h. |
|
Deletes the contents of the Real constants registers.
Definition at line 551 of file OgreGpuProgram.h. |
|
Sets the auto add parameter name flag.
Definition at line 641 of file OgreGpuProgram.h. |
|
Sets up a constant which will automatically be updated by the system.
|
|
|
|
Sets a multiple value constant integer parameter to the program.
|
|
Sets a ColourValue parameter to the program.
|
|
Sets a multiple value constant floating-point parameter to the program.
|
|
Sets a multiple value constant floating-point parameter to the program.
|
|
Sets a list of Matrix4 parameters to the program.
|
|
Sets a Matrix4 parameter to the program.
|
|
Sets a 4-element floating-point parameter to the program via Vector3.
|
|
Sets a single floating-point parameter to the program.
|
|
Sets a 4-element floating-point parameter to the program.
Referenced by Ogre::Renderable::_updateCustomGpuParameter(). |
|
Set the constant definition's Auto state.
|
|
Sets a named parameter up to track a derivation of the current time.
|
|
Sets up a constant which will automatically be updated by the system.
|
|
Sets a multiple value constant integer parameter to the program.
|
|
Sets a ColourValue parameter to the program.
|
|
Sets a multiple value constant floating-point parameter to the program.
|
|
Sets a multiple value constant floating-point parameter to the program.
|
|
Sets a list of Matrix4 parameters to the program.
|
|
Sets a Matrix4 parameter to the program.
|
|
Sets a Vector3 parameter to the program.
|
|
Sets a Vector4 parameter to the program.
|
|
Sets a single value constant integer parameter to the program.
|
|
Sets a single value constant floating-point parameter to the program.
|
|
Sets a named parameter up to track a derivation of the current time.
|
|
Sets whether or not we need to transpose the matrices passed in from the rest of OGRE.
Definition at line 822 of file OgreGpuProgram.h. |
|
Definition at line 437 of file OgreGpuProgram.h. |
|
active pass iteration parameter real constant entry;
Definition at line 461 of file OgreGpuProgram.h. |
|
index for active pass iteration parameter real constant entry;
Definition at line 463 of file OgreGpuProgram.h. |
|
flag to indicate if names not found will be automatically added
Definition at line 459 of file OgreGpuProgram.h. |
|
List of automatically updated parameters.
Definition at line 450 of file OgreGpuProgram.h. |
|
Container of parameter definitions.
Definition at line 452 of file OgreGpuProgram.h. |
|
Packed list of integer constants.
Definition at line 448 of file OgreGpuProgram.h. |
|
Definition at line 455 of file OgreGpuProgram.h. |
|
Packed list of floating-point constants.
Definition at line 446 of file OgreGpuProgram.h. |
|
Do we need to transpose matrices?
Definition at line 457 of file OgreGpuProgram.h. |
Copyright © 2000-2005 by The OGRE Team
This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.
Last modified Sun Mar 12 14:39:03 2006