Effect.SetRawValue(EffectHandle, GraphicsStream, Int32) Method (Microsoft.DirectX.Direct3D)
Set a contiguous range of shader constants with a memory copy.
Definition
Visual Basic Public Sub SetRawValue( _
ByVal parameter As EffectHandle _
ByVal data As GraphicsStream _
ByVal byteOffset As Integer _
)C# public void SetRawValue(
EffectHandle parameter
GraphicsStream data
int byteOffset
);C++ public:
void SetRawValue(
EffectHandle parameter
GraphicsStream data
int byteOffset
);JScript public function SetRawValue(
parameter : EffectHandle
data : GraphicsStream
byteOffset : int
);
Parameters
parameter Microsoft.DirectX.Direct3D.EffectHandle
An EffectHandle object that specifies the value to set, or the name of the value passed in as a string. Passing in a handle is more efficient.data Microsoft.DirectX.GraphicsStream
A GraphicsStream object that contains the data to be set. SetRawValue checks for valid memory, but does not do any checking for valid data.byteOffset System.Int32
Number of bytes between the beginning of the effect data and the beginning of the effect constants you are going to set.
Remarks
SetRawValue is a very fast way to set effect constants since it performs a memory copy without performing validation or any data conversion (like converting a row-major matrix to a column-major matrix). Use SetRawValue to set a series of contiguous effect constants.
All values are expected to be either matrix4x4s or float4s and all matrices are expected to be in column-major order. Int or float values are cast into a float4; therefore, it is highly recommended that you use SetRawValue with only float4 or matrix4x4 data.