Daily update on 20251015-002614 by Nitload Youmu. Additional Message : Organize files of numerial math.
Signed-off-by: Nitload <YoumuLiu_NSI@whv0t.onmicrosoft.com>
This commit is contained in:
@@ -1,30 +1,27 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------
|
||||
// file="Partical.cs"
|
||||
// file="Partical"
|
||||
// Project: StgSharp
|
||||
// AuthorGroup: Nitload Space
|
||||
// Copyright (c) Nitload Space. All rights reserved.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person
|
||||
// obtaining a copy of this software and associated documentation
|
||||
// files (the “Software”), to deal in the Software without restriction,
|
||||
// including without limitation the rights to use, copy, modify, merge,
|
||||
// publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
// and to permit persons to whom the Software is furnished to do so,
|
||||
// subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and
|
||||
// this permission notice shall be included in all copies
|
||||
// or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED “AS IS”,
|
||||
// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH
|
||||
// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in all
|
||||
// copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
// SOFTWARE.
|
||||
//
|
||||
// -----------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------
|
||||
@@ -34,6 +31,7 @@ using StgSharp.Graphics;
|
||||
using StgSharp.Graphics.OpenGL;
|
||||
using StgSharp.Internal.OpenGL;
|
||||
using StgSharp.Mathematics;
|
||||
using StgSharp.Mathematics.Graphic;
|
||||
using StgSharp.Timing;
|
||||
|
||||
using System;
|
||||
@@ -125,8 +123,8 @@ namespace StgSharp
|
||||
/**/
|
||||
|
||||
GL.TextureImage2d<byte>(
|
||||
Texture2DTarget.Texture2D, 0, ImageChannel.WithAlphaChannel, (uint)Width,
|
||||
(uint)Height, ImageChannel.WithAlphaChannel, PixelChannelLayout.Byte, null);
|
||||
Texture2DTarget.Texture2D, 0, ImageChannel.WithAlphaChannel, (uint)Width, (uint)Height,
|
||||
ImageChannel.WithAlphaChannel, PixelChannelLayout.Byte, null);
|
||||
/**/
|
||||
|
||||
// GL.Assert(false);
|
||||
@@ -194,10 +192,7 @@ namespace StgSharp
|
||||
GL.Assert(false);
|
||||
}
|
||||
|
||||
public void RenderButton(
|
||||
ButtonStatus status,
|
||||
float statusBegin,
|
||||
in TextureProvider provider)
|
||||
public void RenderButton(ButtonStatus status, float statusBegin, in TextureProvider provider)
|
||||
{
|
||||
provider.UpdateFromImage(i);
|
||||
}
|
||||
@@ -269,8 +264,7 @@ namespace StgSharp
|
||||
ebo = CreateElementBuffer(1);
|
||||
vbo.Bind(0);
|
||||
|
||||
Rectangle rec = new Rectangle(
|
||||
0.05f, 0.05f, 0.05f, -0.05f, -0.05f, -0.05f, -0.05f, 0.05f);
|
||||
Rectangle rec = new Rectangle(0.05f, 0.05f, 0.05f, -0.05f, -0.05f, -0.05f, -0.05f, 0.05f);
|
||||
|
||||
// GL.Assert(true);
|
||||
vao.Bind(0);
|
||||
@@ -280,8 +274,7 @@ namespace StgSharp
|
||||
|
||||
vbo.WriteVectorData<Vec4>(1, buffer.CoordAndRotationSpan, BufferUsage.StreamDraw);
|
||||
vao.SetVertexAttribute(1, 3, TypeCode.Single, false, 4 * sizeof(float), 0);
|
||||
vao.SetVertexAttribute(
|
||||
2, 1, TypeCode.Single, false, 4 * sizeof(float), 3 * sizeof(float));
|
||||
vao.SetVertexAttribute(2, 1, TypeCode.Single, false, 4 * sizeof(float), 3 * sizeof(float));
|
||||
|
||||
GL.VertexAttributeDivisor(1, 1);
|
||||
GL.VertexAttributeDivisor(2, 1);
|
||||
@@ -294,7 +287,7 @@ namespace StgSharp
|
||||
vbo.Unbind();
|
||||
GL.BindVertexArray(GlHandle.Zero);
|
||||
|
||||
NativeCameraViewTarget([0f, 0f, -100f], [0f, 0f, 0f], [0f, 1f, 0f]);
|
||||
NativeCameraViewTarget([ 0f, 0f, -100f ], [ 0f, 0f, 0f ], [ 0f, 1f, 0f ]);
|
||||
NativeCameraViewRange(new Degree(1.5f), Vec2.Zero, (50, 50));
|
||||
NativeCameraUniform(s, "Camera");
|
||||
|
||||
@@ -309,8 +302,8 @@ namespace StgSharp
|
||||
t = CreateTexture(1);
|
||||
t.Bind2D(0);
|
||||
GL.TextureImage2d<byte>(
|
||||
Texture2DTarget.Texture2D, 0, ImageChannel.WithAlphaChannel, (uint)Width,
|
||||
(uint)Height, ImageChannel.WithAlphaChannel, PixelChannelLayout.Byte, null!);
|
||||
Texture2DTarget.Texture2D, 0, ImageChannel.WithAlphaChannel, (uint)Width, (uint)Height,
|
||||
ImageChannel.WithAlphaChannel, PixelChannelLayout.Byte, null!);
|
||||
t.Set2dWrapProperty(0, TextureWrap.Repeat, TextureWrap.Repeat);
|
||||
t.Set2dFilterProperty(0, TextureFilter.Linear, TextureFilter.Linear);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user