daily update on 20240901 by nitload youmu

This commit is contained in:
Nitload
2024-09-02 05:57:07 +08:00
parent 1ee4e4a42f
commit 0979123ac0
47 changed files with 869 additions and 707 deletions
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
Binary file not shown.
Binary file not shown.
@@ -14,7 +14,7 @@ using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("OEM")] [assembly: System.Reflection.AssemblyCompanyAttribute("OEM")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+d082071f2d004b4566bd19a1a030cf06b112c3af")] [assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+1ee4e4a42f2a6b8609a6fce1d36c8da7f4182da6")]
[assembly: System.Reflection.AssemblyProductAttribute("OEM")] [assembly: System.Reflection.AssemblyProductAttribute("OEM")]
[assembly: System.Reflection.AssemblyTitleAttribute("OEM")] [assembly: System.Reflection.AssemblyTitleAttribute("OEM")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
@@ -41,6 +41,12 @@ using StgSharp.Collections;
namespace StgSharp.Graphics.OpenGL namespace StgSharp.Graphics.OpenGL
{ {
/// <summary>
/// A collection of a sets of OpenGL textures. The collection can automatically select one of the
/// texture with minimum costs to upgrade pixels to buffer. Usually <see cref="AutoTextureGL"/> is used for
/// <see cref="IImageProvider"/> loading, but not for target of
/// <see cref="OpenGLFunction.FrameBufferTexture2d(FrameBufferTarget, uint, Texture2DTarget, GlHandle, int)"/>.
/// </summary>
public sealed class AutoTextureGL public sealed class AutoTextureGL
{ {
private BidirectionalDictionary<Image, int> imageIndexMap = new BidirectionalDictionary<Image, int>(); private BidirectionalDictionary<Image, int> imageIndexMap = new BidirectionalDictionary<Image, int>();
@@ -70,7 +76,7 @@ namespace StgSharp.Graphics.OpenGL
propertyCache = new TextureProperty[_size]; propertyCache = new TextureProperty[_size];
} }
public AutoTextureGL(int textureObjectSize, [NotNull]glRenderStream binding) public AutoTextureGL(int textureObjectSize, [NotNull]glRender binding)
{ {
this._size = textureObjectSize; this._size = textureObjectSize;
imageIndexMap = new BidirectionalDictionary<Image, int>(); imageIndexMap = new BidirectionalDictionary<Image, int>();
@@ -48,7 +48,7 @@ namespace StgSharp.Graphics.OpenGL
public sealed unsafe class ElementBuffer : GlBufferObjectBase public sealed unsafe class ElementBuffer : GlBufferObjectBase
{ {
internal ElementBuffer(int n, glRenderStream binding) : base(binding) internal ElementBuffer(int n, glRender binding) : base(binding)
{ {
_bufferHandle = GL.GenBuffers(n); _bufferHandle = GL.GenBuffers(n);
} }
@@ -54,7 +54,7 @@ namespace StgSharp.Graphics.OpenGL
public sealed class FrameBuffer : GlBufferObjectBase public sealed class FrameBuffer : GlBufferObjectBase
{ {
internal unsafe FrameBuffer(int count, glRenderStream binding) : base(binding) internal unsafe FrameBuffer(int count, glRender binding) : base(binding)
{ {
_bufferHandle = GL.GenFrameBuffers(count); _bufferHandle = GL.GenFrameBuffers(count);
} }
@@ -39,9 +39,9 @@ namespace StgSharp.Graphics.OpenGL
public abstract class GlBufferObjectBase : BufferObjectBase public abstract class GlBufferObjectBase : BufferObjectBase
{ {
private readonly glRenderStream _contextBinding; private readonly glRender _contextBinding;
protected GlBufferObjectBase(glRenderStream contextBinding) protected GlBufferObjectBase(glRender contextBinding)
{ {
binding = contextBinding; binding = contextBinding;
_contextBinding = contextBinding; _contextBinding = contextBinding;
@@ -44,7 +44,7 @@ namespace StgSharp.Graphics.OpenGL
public sealed class RenderBuffer : GlBufferObjectBase public sealed class RenderBuffer : GlBufferObjectBase
{ {
public RenderBuffer(int count, glRenderStream binding) : base(binding) public RenderBuffer(int count, glRender binding) : base(binding)
{ {
_bufferHandle = GL.GenRenderBuffer(count); _bufferHandle = GL.GenRenderBuffer(count);
} }
@@ -51,7 +51,7 @@ namespace StgSharp.Graphics.OpenGL
private OpenGLFunction _gl; private OpenGLFunction _gl;
internal GlHandle[] _textureHandle; internal GlHandle[] _textureHandle;
internal TextureGL( int count, glRenderStream binding ) internal TextureGL( int count, glRender binding )
{ {
//sourceList = new Image[count]; //sourceList = new Image[count];
this._gl = binding.GL; this._gl = binding.GL;
@@ -40,7 +40,7 @@ namespace StgSharp.Graphics.OpenGL
public sealed unsafe class VertexArray : GlBufferObjectBase public sealed unsafe class VertexArray : GlBufferObjectBase
{ {
internal VertexArray(int n, glRenderStream binding) : base(binding) internal VertexArray(int n, glRender binding) : base(binding)
{ {
_bufferHandle = GL.GenVertexArrays(n); _bufferHandle = GL.GenVertexArrays(n);
} }
@@ -43,7 +43,7 @@ namespace StgSharp.Graphics.OpenGL
public sealed unsafe class VertexBuffer : GlBufferObjectBase public sealed unsafe class VertexBuffer : GlBufferObjectBase
{ {
internal VertexBuffer(int n, glRenderStream binding) : base(binding) internal VertexBuffer(int n, glRender binding) : base(binding)
{ {
_bufferHandle = GL.GenBuffers(n); _bufferHandle = GL.GenBuffers(n);
} }
@@ -41,7 +41,7 @@ using System.Xml.Linq;
namespace StgSharp.Graphics.OpenGL namespace StgSharp.Graphics.OpenGL
{ {
public abstract partial class glRenderStream : RenderStream public abstract partial class glRender : RenderStream
{ {
/// <summary> /// <summary>
@@ -69,7 +69,7 @@ namespace StgSharp.Graphics.OpenGL
internal readonly GlHandle[] handle; internal readonly GlHandle[] handle;
public readonly ShaderType type; public readonly ShaderType type;
internal unsafe Shader(GlHandle[] handle, ShaderType usage, glRenderStream stream) internal unsafe Shader(GlHandle[] handle, ShaderType usage, glRender stream)
{ {
this.handle = handle; this.handle = handle;
GL = stream.GL; GL = stream.GL;
@@ -168,7 +168,7 @@ namespace StgSharp.Graphics.OpenGL
/// <summary> /// <summary>
/// CustomizeInit a program with no shader attached. /// CustomizeInit a program with no shader attached.
/// </summary> /// </summary>
internal unsafe ShaderProgram(glRenderStream binding) internal unsafe ShaderProgram(glRender binding)
{ {
GL = binding.GL; GL = binding.GL;
handle = GL.CreateProgram(); handle = GL.CreateProgram();
@@ -1,6 +1,6 @@
//----------------------------------------------------------------------- //-----------------------------------------------------------------------
//----------------------------------------------------------------------- //-----------------------------------------------------------------------
// file="glRenderStream.cs" // file="glRender.cs"
// Project: StgSharp // Project: StgSharp
// AuthorGroup: Nitload Space // AuthorGroup: Nitload Space
// Copyright (c) Nitload Space. All rights reserved. // Copyright (c) Nitload Space. All rights reserved.
@@ -43,7 +43,7 @@ using System.Threading.Tasks;
namespace StgSharp.Graphics.OpenGL namespace StgSharp.Graphics.OpenGL
{ {
public abstract partial class glRenderStream : RenderStream public abstract partial class glRender : RenderStream
{ {
private OpenGLFunction _context; private OpenGLFunction _context;
+9 -1
View File
@@ -93,6 +93,11 @@ namespace StgSharp.Graphics
get => primeArgs.Name; get => primeArgs.Name;
} }
protected bool IsWaitingUserEvent
{
get => primeArgs.IsWaitingEvent;
}
public vec2d GlobalCoordSize => ((Width * 1.0f) / _coordStretch.x, (Height * 1.0f) / _coordStretch.y); public vec2d GlobalCoordSize => ((Width * 1.0f) / _coordStretch.x, (Height * 1.0f) / _coordStretch.y);
public ViewPort Port public ViewPort Port
@@ -155,6 +160,7 @@ namespace StgSharp.Graphics
return target; return target;
} }
/**/
protected internal static void PollEvents() protected internal static void PollEvents()
{ {
InternalIO.glfwPollEvents(); InternalIO.glfwPollEvents();
@@ -164,7 +170,7 @@ namespace StgSharp.Graphics
{ {
InternalIO.glfwSwapBuffers(CanvasHandle); InternalIO.glfwSwapBuffers(CanvasHandle);
} }
/**/
#region native camera operation #region native camera operation
protected abstract void NativeCameraViewRange(Radius fieldOfRange, vec2d offset, (float frontDepth, float backDepth) viewDepth); protected abstract void NativeCameraViewRange(Radius fieldOfRange, vec2d offset, (float frontDepth, float backDepth) viewDepth);
protected abstract void NativeCameraViewTarget(vec3d position, vec3d direction, vec3d up); protected abstract void NativeCameraViewTarget(vec3d position, vec3d direction, vec3d up);
@@ -211,6 +217,8 @@ namespace StgSharp.Graphics
protected abstract void CustomizeInit(); protected abstract void CustomizeInit();
protected abstract void Main(); protected abstract void Main();
#endregion #endregion
#region public resource generator #region public resource generator
@@ -0,0 +1,62 @@
//-----------------------------------------------------------------------
//-----------------------------------------------------------------------
// file="OpenGLControllingItemRender.cs"
// 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.
//
//-----------------------------------------------------------------------
//-----------------------------------------------------------------------
using StgSharp.Graphics.OpenGL;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace StgSharp.MVVM
{
public class OpenGLControllingItemRender : glRender
{
public override bool IsContextSharable => true;
protected override void CustomizeDeinit()
{
throw new NotImplementedException();
}
protected override void CustomizeInit()
{
throw new NotImplementedException();
}
protected override void Main()
{
throw new NotImplementedException();
}
}
}
+9 -3
View File
@@ -44,6 +44,7 @@ using System.Runtime.InteropServices;
using System.Security.Cryptography; using System.Security.Cryptography;
using System.Text; using System.Text;
using System.Threading; using System.Threading;
using System.Diagnostics.CodeAnalysis;
namespace StgSharp.MVVM.View namespace StgSharp.MVVM.View
{ {
@@ -61,7 +62,7 @@ namespace StgSharp.MVVM.View
private GetDataBindingEntryDelegate getDataBindingEntry; private GetDataBindingEntryDelegate getDataBindingEntry;
private int usedFrame = 0; private int usedFrame;
private IViewDesigner<ViewBase> _design; private IViewDesigner<ViewBase> _design;
private IViewRender<ViewBase> _render; private IViewRender<ViewBase> _render;
private IViewResponder<ViewBase> _responder; private IViewResponder<ViewBase> _responder;
@@ -87,6 +88,11 @@ namespace StgSharp.MVVM.View
} }
} }
internal bool IsWaitingWindowEvent
{
get => context.IsWaitingEvent;
}
public (int x, int y, int z) UnitCubeSize public (int x, int y, int z) UnitCubeSize
{ {
get => unitCubeSize; get => unitCubeSize;
@@ -142,7 +148,7 @@ namespace StgSharp.MVVM.View
set => _responder = value; set => _responder = value;
} }
public abstract void CustomizedInitialize(ViewModelBase viewModelBinding); public abstract void CustomizedInitialize([NotNull]ViewModelBase viewModelBinding);
/// <summary> /// <summary>
/// Get the status of a certain key on the keyboard. /// Get the status of a certain key on the keyboard.
@@ -155,7 +161,7 @@ namespace StgSharp.MVVM.View
return InternalIO.glfwGetKey(context.ViewPortID, (int)key); return InternalIO.glfwGetKey(context.ViewPortID, (int)key);
} }
public void InternalInitialize(string name, (int, int, int) cubeSize, ViewModelBase viewModelBinding) public void InternalInitialize(string name, (int, int, int) cubeSize, [NotNull]ViewModelBase viewModelBinding)
{ {
SelfName = name; SelfName = name;
unitCubeSize = cubeSize; unitCubeSize = cubeSize;
@@ -28,13 +28,16 @@
// //
//----------------------------------------------------------------------- //-----------------------------------------------------------------------
//----------------------------------------------------------------------- //-----------------------------------------------------------------------
using StgSharp.Data;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Data.Common; using System.Data.Common;
using System.Diagnostics.CodeAnalysis; using System.Diagnostics.CodeAnalysis;
using System.IO;
using System.Linq; using System.Linq;
using System.Reflection;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using System.Security.Cryptography.X509Certificates;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
@@ -45,10 +48,40 @@ namespace StgSharp.MVVM.ViewModel
[UnmanagedFunctionPointer(CallingConvention.Cdecl)] public delegate ref object BindingDataGetter(); [UnmanagedFunctionPointer(CallingConvention.Cdecl)] public delegate ref object BindingDataGetter();
[UnmanagedFunctionPointer(CallingConvention.Cdecl)] public delegate void BindingDataSetter(ref object value); [UnmanagedFunctionPointer(CallingConvention.Cdecl)] public delegate void BindingDataSetter(ref object value);
public abstract partial class ViewModelBase
{
public bool MethodLookup(string methodName, out Action callback)
{
MethodInfo method = GetType().GetMethod(methodName);
try
{
callback = (Action)Delegate.CreateDelegate(typeof(Action), this, methodName);
return true;
}
catch (MissingMethodException)
{
callback = null!;
return false;
}
catch (MethodAccessException)
{
callback = null!;
return false;
}
catch (Exception)
{
throw;
}
}
}
[StructLayout(LayoutKind.Explicit)]
public unsafe struct DataBindingEntry public unsafe struct DataBindingEntry
{ {
[FieldOffset(0)] private M128 _mask;
private IntPtr getterPtr, setterPtr; [FieldOffset(0)] private IntPtr getterPtr;
[FieldOffset(8)] private IntPtr setterPtr;
public DataBindingEntry( public DataBindingEntry(
[NotNull] BindingDataGetter gettingCallback, [NotNull] BindingDataGetter gettingCallback,
@@ -73,11 +106,39 @@ namespace StgSharp.MVVM.ViewModel
return ref ((delegate* unmanaged[Cdecl]<ref object>)getterPtr)(); return ref ((delegate* unmanaged[Cdecl]<ref object>)getterPtr)();
} }
public void SetData(ref object value) public void SetValue(ref object value)
{ {
((delegate* unmanaged[Cdecl]<ref object, void>)setterPtr)(ref value); ((delegate* unmanaged[Cdecl]<ref object, void>)setterPtr)(ref value);
} }
public static bool operator ==(DataBindingEntry left, DataBindingEntry right)
{
return left._mask == right._mask;
}
public static bool operator !=(DataBindingEntry left, DataBindingEntry right)
{
return left._mask != right._mask;
}
public bool Equals(DataBindingEntry other)
{
return (_mask == other._mask);
}
public override bool Equals(object obj)
{
if (obj is not DataBindingEntry other)
{
return false;
}
return Equals(other);
}
public override int GetHashCode()
{
return _mask.GetHashCode();
}
} }
#nullable restore #nullable restore
@@ -40,7 +40,6 @@ namespace StgSharp.MVVM.ViewModel
{ {
public abstract partial class ViewModelBase public abstract partial class ViewModelBase
{ {
private ViewBase _nextView, _currentView; private ViewBase _nextView, _currentView;
protected ViewBase CurrentView protected ViewBase CurrentView
+31 -11
View File
@@ -77,6 +77,19 @@ namespace StgSharp.MVVM.ViewModel
() => () =>
{ {
}; };
viewPortDisplay.FrameSizeCallback = (handle, width, height)
=>
{
InternalIO.glfwMakeContextCurrent(viewPortDisplay.ViewPortID);
OpenGLFunction.CurrentGL.Viewport(0, 0, width, height);
PrivateShow();
};
viewPortDisplay.FramePostionCallback = (handle, xpos, ypos)
=>
{
PrivateShow();
};
} }
protected ViewModelBase(float frameLength) protected ViewModelBase(float frameLength)
@@ -95,17 +108,30 @@ namespace StgSharp.MVVM.ViewModel
() => () =>
{ {
}; };
viewPortDisplay.FrameSizeCallback = (handle, width, height)
=>
{
InternalIO.glfwMakeContextCurrent(viewPortDisplay.ViewPortID);
OpenGLFunction.CurrentGL.Viewport(0, 0, width, height);
PrivateShow();
};
viewPortDisplay.FramePostionCallback = (handle, xpos, ypos)
=>
{
PrivateShow();
};
} }
public ViewModelBase(ViewPort vbinding, int framespeed) public ViewModelBase(ViewPort vBinding, int frameSpeed)
{ {
viewPortDisplay = vbinding; viewPortDisplay = vBinding;
allView = new(); allView = new();
fpsCountProvider = new TimeSpanProvider(1.0, TimeSpanProvider.DefaultProvider); fpsCountProvider = new TimeSpanProvider(1.0, TimeSpanProvider.DefaultProvider);
_frameSpeed = 0; _frameSpeed = 0;
_frameCount = 0; _frameCount = 0;
fpsCountProvider.SpanRefreshCallback = CountFps; fpsCountProvider.SpanRefreshCallback = CountFps;
long frameLength = (framespeed > 0) ? ((1000L * 1000L) / framespeed) : 0; long frameLength = (frameSpeed > 0) ? ((1000L * 1000L) / frameSpeed) : 0;
frameTimeProvider = new TimeSpanProvider( frameTimeProvider = new TimeSpanProvider(
frameLength, TimeSpanProvider.DefaultProvider frameLength, TimeSpanProvider.DefaultProvider
); );
@@ -127,9 +153,9 @@ namespace StgSharp.MVVM.ViewModel
}; };
} }
public ViewModelBase(ViewPort vbinding, float frameLength) public ViewModelBase(ViewPort vBinding, float frameLength)
{ {
viewPortDisplay = vbinding; viewPortDisplay = vBinding;
allView = new(); allView = new();
fpsCountProvider = new TimeSpanProvider(1.0, TimeSpanProvider.DefaultProvider); fpsCountProvider = new TimeSpanProvider(1.0, TimeSpanProvider.DefaultProvider);
_frameSpeed = 0; _frameSpeed = 0;
@@ -251,12 +277,6 @@ namespace StgSharp.MVVM.ViewModel
public abstract void CustomizeInitialize(); public abstract void CustomizeInitialize();
public Action MethodLookup(string methodName)
{
MethodInfo method = GetType().GetMethod(methodName);
return (method != null) ? ((Action)Delegate.CreateDelegate(typeof(Action), this, method)) : null;
}
/// <summary> /// <summary>
/// Resize the current form /// Resize the current form
/// </summary> /// </summary>
+14 -1
View File
@@ -43,7 +43,6 @@ namespace StgSharp.MVVM
{ {
public class ViewPort public class ViewPort
{ {
private FrameBufferSizeHandler _sizeHandler; private FrameBufferSizeHandler _sizeHandler;
private FramePositionHandler _positionHandler; private FramePositionHandler _positionHandler;
private int _width, _height; private int _width, _height;
@@ -132,5 +131,19 @@ namespace StgSharp.MVVM
} }
} }
private int _eventWaitingMask;
internal bool IsWaitingEvent
{
get => _eventWaitingMask == 1;
}
internal unsafe void InternalShowViewModelMain()
{
Interlocked.Exchange(ref _eventWaitingMask, 1);
InternalIO.glfwWaitEvents();
Interlocked.Exchange(ref _eventWaitingMask, 0);
}
} }
} }
+1 -1
View File
@@ -53,7 +53,7 @@ namespace StgSharp.Stg
} }
public sealed class OneDimensionalCollisionTexture2D_GL : glRenderStream, IOneDimensionalCollisionTexture2D public sealed class OneDimensionalCollisionTexture2D_GL : glRender, IOneDimensionalCollisionTexture2D
{ {
float[] textureOutput; float[] textureOutput;
@@ -14,7 +14,7 @@ using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("StgSharp")] [assembly: System.Reflection.AssemblyCompanyAttribute("StgSharp")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Release")] [assembly: System.Reflection.AssemblyConfigurationAttribute("Release")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+d082071f2d004b4566bd19a1a030cf06b112c3af")] [assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+1ee4e4a42f2a6b8609a6fce1d36c8da7f4182da6")]
[assembly: System.Reflection.AssemblyProductAttribute("StgSharp")] [assembly: System.Reflection.AssemblyProductAttribute("StgSharp")]
[assembly: System.Reflection.AssemblyTitleAttribute("StgSharp")] [assembly: System.Reflection.AssemblyTitleAttribute("StgSharp")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
+3
View File
@@ -177,6 +177,9 @@
<ClInclude Include="StgSharpC.h" /> <ClInclude Include="StgSharpC.h" />
<ClInclude Include="wgl.h" /> <ClInclude Include="wgl.h" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<None Include="ClassDiagram.cd" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets"> <ImportGroup Label="ExtensionTargets">
</ImportGroup> </ImportGroup>
+2 -1
View File
@@ -35,6 +35,7 @@ using StgSharp.Graphics;
using StgSharp.Math; using StgSharp.Math;
using StgSharp.MVVM; using StgSharp.MVVM;
using StgSharp.MVVM.ViewModel;
using System; using System;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
@@ -59,7 +60,7 @@ namespace StgSharp
ViewPort vp = new ViewPort(); ViewPort vp = new ViewPort();
ViewModelMain mainModel = new ViewModelMain(vp); ViewModelBase mainModel = new ViewModelMain(vp);
mainModel.CreateAndBindView<ViewMain>("MainView", (1, 1, 1)); mainModel.CreateAndBindView<ViewMain>("MainView", (1, 1, 1));
mainModel.UseViewModel("MainView"); mainModel.UseViewModel("MainView");
@@ -44,7 +44,7 @@ using System.Threading.Tasks;
namespace StgSharp namespace StgSharp
{ {
public class ParticleRenderStream : glRenderStream public class ParticleRenderStream : glRender
{ {
private ElementBuffer ebo; private ElementBuffer ebo;
@@ -1,33 +1,3 @@
//-----------------------------------------------------------------------
//-----------------------------------------------------------------------
// file="StgSharpDebug.AssemblyInfo.cs"
// 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.
//
//-----------------------------------------------------------------------
//-----------------------------------------------------------------------
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// 此代码由工具生成。 // 此代码由工具生成。
@@ -44,7 +14,7 @@ using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("StgSharpDebug")] [assembly: System.Reflection.AssemblyCompanyAttribute("StgSharpDebug")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+d082071f2d004b4566bd19a1a030cf06b112c3af")] [assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+1ee4e4a42f2a6b8609a6fce1d36c8da7f4182da6")]
[assembly: System.Reflection.AssemblyProductAttribute("StgSharpDebug")] [assembly: System.Reflection.AssemblyProductAttribute("StgSharpDebug")]
[assembly: System.Reflection.AssemblyTitleAttribute("StgSharpDebug")] [assembly: System.Reflection.AssemblyTitleAttribute("StgSharpDebug")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
@@ -1 +1 @@
{"documents":{"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\*":"https://raw.githubusercontent.com/Nitload-NSI/CCD_Github/d082071f2d004b4566bd19a1a030cf06b112c3af/*"}} {"documents":{"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\*":"https://raw.githubusercontent.com/Nitload-NSI/CCD_Github/1ee4e4a42f2a6b8609a6fce1d36c8da7f4182da6/*"}}
@@ -14,7 +14,7 @@ using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("StgsharpEnvDebug")] [assembly: System.Reflection.AssemblyCompanyAttribute("StgsharpEnvDebug")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+d082071f2d004b4566bd19a1a030cf06b112c3af")] [assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+1ee4e4a42f2a6b8609a6fce1d36c8da7f4182da6")]
[assembly: System.Reflection.AssemblyProductAttribute("StgsharpEnvDebug")] [assembly: System.Reflection.AssemblyProductAttribute("StgsharpEnvDebug")]
[assembly: System.Reflection.AssemblyTitleAttribute("StgsharpEnvDebug")] [assembly: System.Reflection.AssemblyTitleAttribute("StgsharpEnvDebug")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]