daily update on 20240203 by nitloadd youmu. New glhandle setup.
This commit is contained in:
@@ -1,70 +1,53 @@
|
||||
using StgSharp.Controlling;
|
||||
using StgSharp.Math;
|
||||
using System.Data.Common;
|
||||
using System.Numerics;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace StgSharp.Math
|
||||
{
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
internal struct M128F
|
||||
[StructLayout(LayoutKind.Explicit)]
|
||||
public unsafe struct M128
|
||||
{
|
||||
internal float X;
|
||||
internal float Y;
|
||||
internal float Z;
|
||||
internal float W;
|
||||
[FieldOffset(0)] internal fixed float Single[4];
|
||||
[FieldOffset(0)] internal fixed double Double[2];
|
||||
|
||||
[FieldOffset(0)] internal fixed sbyte Int8[16];
|
||||
[FieldOffset(0)] internal fixed short Int16[8];
|
||||
[FieldOffset(0)] internal fixed int Int32[4];
|
||||
[FieldOffset(0)] internal fixed long Int64[2];
|
||||
|
||||
[FieldOffset(0)] internal fixed byte UInt8[16];
|
||||
[FieldOffset(0)] internal fixed ushort UInt16[8];
|
||||
[FieldOffset(0)] internal fixed uint UInt32[4];
|
||||
[FieldOffset(0)] internal fixed ulong UInt64[2];
|
||||
|
||||
[FieldOffset(0)] internal IntPtr IntPtr0;
|
||||
[FieldOffset(1)] internal IntPtr IntPtr1;
|
||||
|
||||
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Explicit, Size = 16, Pack = 16)]
|
||||
public struct Vec4d
|
||||
{
|
||||
[FieldOffset(0)] internal Vector4 vec;
|
||||
[FieldOffset(0)] internal M128F fvec;
|
||||
[FieldOffset(0)] internal M128 reg;
|
||||
|
||||
[FieldOffset(0)] public float X;
|
||||
[FieldOffset(4)] public float Y;
|
||||
[FieldOffset(8)] public float Z;
|
||||
[FieldOffset(12)] public float W;
|
||||
|
||||
[FieldOffset(0)] public int X_int;
|
||||
[FieldOffset(4)] public int Y_int;
|
||||
[FieldOffset(8)] public int Z_int;
|
||||
[FieldOffset(12)] public int W_int;
|
||||
|
||||
[FieldOffset(0)] public uint X_uint;
|
||||
[FieldOffset(4)] public uint Y_uint;
|
||||
[FieldOffset(8)] public uint Z_uint;
|
||||
[FieldOffset(12)] public uint W_uint;
|
||||
|
||||
[FieldOffset(0)] public long X_long;
|
||||
[FieldOffset(8)] public long Y_long;
|
||||
|
||||
[FieldOffset(0)] public long X_ulong;
|
||||
[FieldOffset(8)] public long Y_ulong;
|
||||
|
||||
[FieldOffset(0)] public byte byte_0;
|
||||
[FieldOffset(1)] public byte byte_1;
|
||||
[FieldOffset(2)] public byte byte_2;
|
||||
[FieldOffset(3)] public byte byte_3;
|
||||
[FieldOffset(4)] public byte byte_4;
|
||||
[FieldOffset(5)] public byte byte_5;
|
||||
[FieldOffset(6)] public byte byte_6;
|
||||
[FieldOffset(7)] public byte byte_7;
|
||||
[FieldOffset(8)] public byte byte_8;
|
||||
[FieldOffset(9)] public byte byte_9;
|
||||
[FieldOffset(10)] public byte byte_10;
|
||||
[FieldOffset(11)] public byte byte_11;
|
||||
[FieldOffset(12)] public byte byte_12;
|
||||
[FieldOffset(13)] public byte byte_13;
|
||||
[FieldOffset(14)] public byte byte_14;
|
||||
[FieldOffset(15)] public byte byte_15;
|
||||
|
||||
public Vec4d(
|
||||
float x, float y, float z, float w)
|
||||
{
|
||||
X = x; Y = y; Z = z; W = w;
|
||||
}
|
||||
|
||||
internal Vec4d(uint x) => X_uint = x;
|
||||
|
||||
public static implicit operator M128(Vec4d vec)
|
||||
{
|
||||
return vec.reg;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user