GraphicsDevice.SetVertexShaderConstant Method (Int32, Vector3 )
Sets the specified vertex shader constant float registers to an array of Vector3 values.
Namespace: Microsoft.Xna.Framework.Graphics
Assembly: Microsoft.Xna.Framework (in microsoft.xna.framework.dll)
Syntax
public void SetVertexShaderConstant (
int startRegister,
Vector3[] constantData
)
Parameters
- startRegister
Zero-based index of the vertex shader constant float register at which to begin setting values. - constantData
The constant data.
Remarks
Because the data in the Vector3 type is not large enough to fill the constant float registers, the constant data will be padded to fill the registers. This means that setting register 0 to to an array of Vector3 values containing (1,2,3) and (4,5,6) will fill register 0 with (1,2,3,0) and register 1 with (4,5,6,0).
Exceptions
Exception type | Condition |
---|---|
ArgumentOutOfRangeException | constantData is outside the allowable range of values as defined by the invoked method. |
InvalidOperationException | The method call is invalid. For example, a method's parameter may have an invalid value. |
See Also
Reference
GraphicsDevice Class
GraphicsDevice Members
Microsoft.Xna.Framework.Graphics Namespace
Platforms
Xbox 360, Windows XP SP2, Windows Vista