Daily update on 20230505 by nitload youmu, confuse on OpenGL

This commit is contained in:
Nitload
2023-05-05 02:42:16 +08:00
parent 4dd3f4f6d1
commit 6da268056c
99 changed files with 58766 additions and 8132 deletions
+4
View File
@@ -90,6 +90,10 @@ namespace StgSharp.Math
return new vec2d(vec.X/x, vec.Y/x);
}
public static implicit operator float[](vec2d vec)
{
return new float[2] {vec.X,vec.Y };
}
}
}
+18 -2
View File
@@ -1,4 +1,5 @@
using System;
using StgSharp.Optimization;
using System;
using System.Collections.Generic;
using System.Data.Common;
using System.Runtime.InteropServices;
@@ -6,7 +7,7 @@ using System.Text;
namespace StgSharp.Math
{
[StructLayout(LayoutKind.Explicit)]
[StructLayout(LayoutKind.Explicit,Size =12,Pack =16)]
public struct vec3d : IEquatable<vec3d>
{
[FieldOffset(0)]
@@ -129,5 +130,20 @@ namespace StgSharp.Math
vec.Z / x
);
}
public static implicit operator float[](vec3d vec)
{
return new float[3] { vec.X, vec.Y, vec.Y };
}
public static implicit operator m128(vec3d vec)
{
return new m128()
{
float0 = vec.X,
float1 = vec.Y,
float2 = vec.Z,
};
}
}
}
+4 -1
View File
@@ -138,7 +138,10 @@ namespace StgSharp.Math
return new vec4d(vec.X / x, vec.Y / x, vec.Z / x, vec.W / x);
}
public static implicit operator float[](vec4d vec)
{
return new float[] { vec.X, vec.Y, vec.Z, vec.W };
}
}