swiss ok, needs more benchmark

This commit is contained in:
Youmu Liu
2026-03-06 18:22:30 +08:00
parent 83997f64d0
commit f6e897ed06
70 changed files with 1889 additions and 3371 deletions
+6 -6
View File
@@ -25,7 +25,6 @@
//
// -----------------------------------------------------------------------
// -----------------------------------------------------------------------
using StgSharp.Controls;
using StgSharp.Geometries;
using StgSharp.Graphics;
using StgSharp.Graphics.OpenGL;
@@ -192,6 +191,7 @@ namespace StgSharp
GL.Assert(false);
}
/*
public void RenderButton(
ButtonStatus status,
float statusBegin,
@@ -200,7 +200,7 @@ namespace StgSharp
{
provider.UpdateFromImage(i);
}
/**/
internal static Vec3 DefaultRotation(
TimeSpanProvider provider,
out float rotation
@@ -208,7 +208,7 @@ namespace StgSharp
{
rotation = 1.0f / 60;
float angle = (float)provider.CurrentSecond * 2;
return (new Vec3(Scalar.Cos(angle), Scalar.Sin(angle),
return (new Vec3(MathF.Cos(angle), MathF.Sin(angle),
0)) * rotation;
}
@@ -222,16 +222,16 @@ namespace StgSharp
buffer = new PlainInstancingBuffer<ParticleOnPlain>();
for (int i = 0; i < 10; i++)
{
float ai = Scalar.Abs(i - 5.0f);
float ai = MathF.Abs(i - 5.0f);
for (int t = 0; t < 10; t++)
{
float at = Scalar.Abs(t - 5.0f);
float at = MathF.Abs(t - 5.0f);
ParticleOnPlain p = new ParticleOnPlain(buffer);
((IInstancing)p).Coord = new Vec3(
(((-5) + i) * 0.2f) + 0.1f, (((-5) + t) * 0.2f) + 0.1f, 0);
((IInstancing)p).Scale =
Scalar.MinOf(i, t) * 0.15f;
float.Min(i, t) * 0.15f;
((IInstancing)p).Motion = new GeometryMotion(
true, TimeProvider, DefaultRotation);
}