#include <OgreGpuProgram.h>
Public Types | |
typedef ConstVectorIterator< RealConstantList > | RealConstantIterator |
typedef ConstVectorIterator< IntConstantList > | IntConstantIterator |
typedef ConstVectorIterator< 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_VIEW_MATRIX, ACT_INVERSE_WORLDVIEW_MATRIX, ACT_INVERSETRANSPOSE_WORLD_MATRIX, ACT_INVERSETRANSPOSE_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, ACT_CUSTOM, ACT_CAMERA_POSITION, 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_FPS, ACT_VIEWPORT_WIDTH, ACT_VIEWPORT_HEIGHT, ACT_INVERSE_VIEWPORT_WIDTH, ACT_INVERSE_VIEWPORT_HEIGHT, ACT_VIEW_DIRECTION, ACT_VIEW_SIDE_VECTOR, ACT_VIEW_UP_VECTOR, ACT_FOV, ACT_NEAR_CLIP_DISTANCE, ACT_FAR_CLIP_DISTANCE, ACT_INVERSE_VIEWPROJ_MATRIX, ACT_INVERSETRANSPOSE_VIEWPROJ_MATRIX, ACT_TRANSPOSE_VIEWPROJ_MATRIX, ACT_TRANSPOSE_VIEW_MATRIX, ACT_INVERSETRANSPOSE_VIEW_MATRIX, ACT_TRANSPOSE_PROJECTION_MATRIX, ACT_INVERSE_PROJECTION_MATRIX, ACT_INVERSETRANSPOSE_PROJECTION_MATRIX, ACT_TRANSPOSE_WORLDVIEWPROJ_MATRIX, ACT_INVERSE_WORLDVIEWPROJ_MATRIX, ACT_INVERSETRANSPOSE_WORLDVIEWPROJ_MATRIX, ACT_TRANSPOSE_WORLDVIEW_MATRIX, ACT_INVERSE_TRANSPOSE_WORLDVIEW_MATRIX, ACT_TRANSPOSE_WORLD_MATRIX, ACT_INVERSE_TRANSPOSE_WORLD_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 Member Functions | |
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, 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. | |
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, 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. | |
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? | |
bool | mAutoAddParamName |
flag to indicate if names not found will be automatically added |
Definition at line 55 of file OgreGpuProgram.h.
|
Definition at line 483 of file OgreGpuProgram.h. |
|
Definition at line 327 of file OgreGpuProgram.h. |
|
Definition at line 426 of file OgreGpuProgram.h. |
|
Definition at line 325 of file OgreGpuProgram.h. |
|
Mapping from parameter names to indexes - high-level programs are expected to populate this.
Definition at line 335 of file OgreGpuProgram.h. |
|
Definition at line 425 of file OgreGpuProgram.h. |
|
Definition at line 324 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 344 of file OgreGpuProgram.h. |
|
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.
|
|
Clears all the existing automatic constants.
|
|
Copies the values of all constants (including auto constants) from another GpuProgramParameters object.
|
|
Gets an iterator over the automatic constant bindings currently in place.
|
|
Gets the number of int constants that have been set.
Definition at line 454 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 |
|
Gets the constant index associated with a named parameter.
|
|
Gets the number of Real constants that have been set.
Definition at line 452 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 687 of file OgreGpuProgram.h. |
|
Returns true if this instance has any automatic constants.
Definition at line 487 of file OgreGpuProgram.h. |
|
Returns true if there are any int constants contained here.
Definition at line 458 of file OgreGpuProgram.h. |
|
Returns true if there are any Real constants contained here.
Definition at line 456 of file OgreGpuProgram.h. |
|
Deletes the contents of the int constants registers.
Definition at line 423 of file OgreGpuProgram.h. |
|
Deletes the contents of the Real constants registers.
Definition at line 421 of file OgreGpuProgram.h. |
|
Sets the auto add parameter name flag.
Definition at line 504 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.
|
|
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 685 of file OgreGpuProgram.h. |
|
flag to indicate if names not found will be automatically added
Definition at line 340 of file OgreGpuProgram.h. |
|
List of automatically updated parameters.
Definition at line 333 of file OgreGpuProgram.h. |
|
Packed list of integer constants.
Definition at line 331 of file OgreGpuProgram.h. |
|
Definition at line 336 of file OgreGpuProgram.h. |
|
Packed list of floating-point constants.
Definition at line 329 of file OgreGpuProgram.h. |
|
Do we need to transpose matrices?
Definition at line 338 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 Feb 12 13:00:34 2006