1243 {
1245 {
1247 }
1249 if (paramClass == EffectParameterClass.Vector &&
_rows == 1)
1250 {
1252 {
1253 default:
1255 case 4:
1256 {
1259 ID3DXBaseEffect* ptr =
pEffect;
1260 int num3 = ((delegate* unmanaged[Stdcall, Stdcall]<
IntPtr, sbyte*, D3DXVECTOR4*,
int>)(
int)(*(uint*)(*(
int*)ptr + 136)))((nint)ptr,
_handle, &d3DXVECTOR3);
1261 if (num3 < 0)
1262 {
1263 throw GraphicsHelpers.GetExceptionFromResult((uint)num3);
1264 }
1265 break;
1266 }
1267 case 3:
1268 {
1271 ID3DXBaseEffect* ptr =
pEffect;
1272 int num2 = ((delegate* unmanaged[Stdcall, Stdcall]<
IntPtr, sbyte*,
float*, uint,
int>)(
int)(*(uint*)(*(
int*)ptr + 128)))((nint)ptr,
_handle, (
float*)(&d3DXVECTOR2), 3u);
1273 if (num2 < 0)
1274 {
1275 throw GraphicsHelpers.GetExceptionFromResult((uint)num2);
1276 }
1277 break;
1278 }
1279 case 2:
1280 {
1283 ID3DXBaseEffect* ptr =
pEffect;
1284 int num = ((delegate* unmanaged[Stdcall, Stdcall]<
IntPtr, sbyte*,
float*, uint,
int>)(
int)(*(uint*)(*(
int*)ptr + 128)))((nint)ptr,
_handle, (
float*)(&d3DXVECTOR), 2u);
1285 if (num < 0)
1286 {
1287 throw GraphicsHelpers.GetExceptionFromResult((uint)num);
1288 }
1289 break;
1290 }
1291 }
1292 return;
1293 }
1294 switch (paramClass)
1295 {
1296 case EffectParameterClass.Matrix:
1297 {
1299 System.
Runtime.
CompilerServices.
Unsafe.As<D3DXMATRIX,
float>(ref
System.
Runtime.
CompilerServices.
Unsafe.AddByteOffset(ref d3DXMATRIX, 48)) = (
System.
Runtime.
CompilerServices.
Unsafe.As<D3DXMATRIX,
float>(ref
System.
Runtime.
CompilerServices.
Unsafe.AddByteOffset(ref d3DXMATRIX, 52)) = (
System.
Runtime.
CompilerServices.
Unsafe.As<D3DXMATRIX,
float>(ref
System.
Runtime.
CompilerServices.
Unsafe.AddByteOffset(ref d3DXMATRIX, 56)) = (
System.
Runtime.
CompilerServices.
Unsafe.As<D3DXMATRIX,
float>(ref
System.
Runtime.
CompilerServices.
Unsafe.AddByteOffset(ref d3DXMATRIX, 60)) = (
System.
Runtime.
CompilerServices.
Unsafe.As<D3DXMATRIX,
float>(ref
System.
Runtime.
CompilerServices.
Unsafe.AddByteOffset(ref d3DXMATRIX, 32)) = (
System.
Runtime.
CompilerServices.
Unsafe.As<D3DXMATRIX,
float>(ref
System.
Runtime.
CompilerServices.
Unsafe.AddByteOffset(ref d3DXMATRIX, 36)) = (
System.
Runtime.
CompilerServices.
Unsafe.As<D3DXMATRIX,
float>(ref
System.
Runtime.
CompilerServices.
Unsafe.AddByteOffset(ref d3DXMATRIX, 40)) = (
System.
Runtime.
CompilerServices.
Unsafe.As<D3DXMATRIX,
float>(ref
System.
Runtime.
CompilerServices.
Unsafe.AddByteOffset(ref d3DXMATRIX, 44)) = (
System.
Runtime.
CompilerServices.
Unsafe.As<D3DXMATRIX,
float>(ref
System.
Runtime.
CompilerServices.
Unsafe.AddByteOffset(ref d3DXMATRIX, 16)) = (
System.
Runtime.
CompilerServices.
Unsafe.As<D3DXMATRIX,
float>(ref
System.
Runtime.
CompilerServices.
Unsafe.AddByteOffset(ref d3DXMATRIX, 20)) = (
System.
Runtime.
CompilerServices.
Unsafe.As<D3DXMATRIX,
float>(ref
System.
Runtime.
CompilerServices.
Unsafe.AddByteOffset(ref d3DXMATRIX, 24)) = (
System.
Runtime.
CompilerServices.
Unsafe.As<D3DXMATRIX,
float>(ref
System.
Runtime.
CompilerServices.
Unsafe.AddByteOffset(ref d3DXMATRIX, 28)) = (*(
float*)(&d3DXMATRIX) = (
System.
Runtime.
CompilerServices.
Unsafe.As<D3DXMATRIX,
float>(ref
System.
Runtime.
CompilerServices.
Unsafe.AddByteOffset(ref d3DXMATRIX, 4)) = (
System.
Runtime.
CompilerServices.
Unsafe.As<D3DXMATRIX,
float>(ref
System.
Runtime.
CompilerServices.
Unsafe.AddByteOffset(ref d3DXMATRIX, 8)) = (
System.
Runtime.
CompilerServices.
Unsafe.As<D3DXMATRIX,
float>(ref
System.
Runtime.
CompilerServices.
Unsafe.AddByteOffset(ref d3DXMATRIX, 12)) = ((!
value) ? 0f : 1f))))))))))))))));
1300 ID3DXBaseEffect* ptr =
pEffect;
1301 int num6 = ((delegate* unmanaged[Stdcall, Stdcall]<
IntPtr, sbyte*, D3DXMATRIX*,
int>)(
int)(*(uint*)(*(
int*)ptr + 152)))((nint)ptr,
_handle, &d3DXMATRIX);
1302 if (num6 < 0)
1303 {
1304 throw GraphicsHelpers.GetExceptionFromResult((uint)num6);
1305 }
1306 break;
1307 }
1308 default:
1310 case EffectParameterClass.Scalar:
1311 {
1312 int num4 = (
value ? 1 : 0);
1313 ID3DXBaseEffect* ptr =
pEffect;
1314 int num5 = ((delegate* unmanaged[Stdcall, Stdcall]<
IntPtr, sbyte*, int,
int>)(
int)(*(uint*)(*(
int*)ptr + 88)))((nint)ptr,
_handle, num4);
1315 if (num5 < 0)
1316 {
1317 throw GraphicsHelpers.GetExceptionFromResult((uint)num5);
1318 }
1319 break;
1320 }
1321 }
1322 }
EffectParameterClass _paramClass
unsafe ID3DXBaseEffect * pEffect
EffectParameterCollection pElementCollection