Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ SetValueTranspose() [2/2]

unsafe void Microsoft.Xna.Framework.Graphics.EffectParameter.SetValueTranspose ( Matrix[] value)
inline

Definition at line 1324 of file EffectParameter.cs.

1325 {
1326 if (_paramClass == EffectParameterClass.Matrix)
1327 {
1328 EffectParameterCollection effectParameterCollection = pElementCollection;
1329 if ((nint)value.LongLength <= effectParameterCollection.Count && pElementCollection.Count != 0)
1330 {
1331 if (value != null && (nint)value.LongLength > 0)
1332 {
1333 fixed (void* ptr = &System.Runtime.CompilerServices.Unsafe.As<Matrix, void>(ref value[0]))
1334 {
1335 try
1336 {
1337 int num = *(int*)pEffect + 184;
1338 int num2 = ((delegate* unmanaged[Stdcall, Stdcall]<IntPtr, sbyte*, D3DXMATRIX*, uint, int>)(int)(*(uint*)num))((nint)pEffect, _handle, (D3DXMATRIX*)ptr, (uint)value.Length);
1339 if (num2 < 0)
1340 {
1341 throw GraphicsHelpers.GetExceptionFromResult((uint)num2);
1342 }
1343 }
1344 catch
1345 {
1346 //try-fault
1347 ptr = null;
1348 throw;
1349 }
1350 }
1351 }
1352 else
1353 {
1354 ID3DXBaseEffect* ptr2 = pEffect;
1355 int num3 = ((delegate* unmanaged[Stdcall, Stdcall]<IntPtr, sbyte*, D3DXMATRIX*, uint, int>)(int)(*(uint*)(*(int*)ptr2 + 184)))((nint)ptr2, _handle, null, 0u);
1356 if (num3 < 0)
1357 {
1358 throw GraphicsHelpers.GetExceptionFromResult((uint)num3);
1359 }
1360 }
1361 try
1362 {
1363 return;
1364 }
1365 catch
1366 {
1367 //try-fault
1368 throw;
1369 }
1370 }
1371 }
1372 throw new InvalidCastException();
1373 }

References Microsoft.Xna.Framework.Graphics.EffectParameter._handle, Microsoft.Xna.Framework.Graphics.EffectParameter._paramClass, Microsoft.Xna.Framework.Graphics.EffectParameterCollection.Count, Microsoft.Xna.Framework.Graphics.GraphicsHelpers.GetExceptionFromResult(), Microsoft.Xna.Framework.Graphics.EffectParameter.pEffect, Microsoft.Xna.Framework.Graphics.EffectParameter.pElementCollection, and System.value.