GraphicsDeviceExtensions.SetVertexShaderConstantFloat4<T> Method (GraphicsDevice, Int32, Int32, T%)

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Sets a constant register to a generic data type which is passed to the vertex shader on the graphics device.

Namespace:  Microsoft.Xna.Framework.Graphics
Assembly:  Microsoft.Xna.Framework.Graphics.Shaders (in Microsoft.Xna.Framework.Graphics.Shaders.dll)

Syntax

'Declaration
Public Shared Sub SetVertexShaderConstantFloat4(Of T As {Structure, New}) ( _
    graphicsDevice As GraphicsDevice, _
    startRegister As Integer, _
    registerCount As Integer, _
    ByRef data As T _
)
public static void SetVertexShaderConstantFloat4<T>(
    GraphicsDevice graphicsDevice,
    int startRegister,
    int registerCount,
    ref T data
)
where T : struct, new()

Type Parameters

  • T
    The data type of the data parameter.

Parameters

  • startRegister
    Type: System.Int32
    Zero-based index of the pixel shader constant integer register at which to begin setting values.
  • registerCount
    Type: System.Int32
    The register count. Must be greater than or equal to 1.
  • data
    Type: T%
    The constant data.

Remarks

This method passes a constant value to the shader.

Version Information

Silverlight

Supported in: 5

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.