diff --git a/源代码/.vs/ProjectEvaluation/stgsharpdevelop.metadata.v7.bin b/源代码/.vs/ProjectEvaluation/stgsharpdevelop.metadata.v7.bin
index e59ee0ed..ba7664b4 100644
Binary files a/源代码/.vs/ProjectEvaluation/stgsharpdevelop.metadata.v7.bin and b/源代码/.vs/ProjectEvaluation/stgsharpdevelop.metadata.v7.bin differ
diff --git a/源代码/.vs/ProjectEvaluation/stgsharpdevelop.projects.v7.bin b/源代码/.vs/ProjectEvaluation/stgsharpdevelop.projects.v7.bin
index fd4b5072..c3d34743 100644
Binary files a/源代码/.vs/ProjectEvaluation/stgsharpdevelop.projects.v7.bin and b/源代码/.vs/ProjectEvaluation/stgsharpdevelop.projects.v7.bin differ
diff --git a/源代码/.vs/StgSharpDevelop/DesignTimeBuild/.dtbcache.v2 b/源代码/.vs/StgSharpDevelop/DesignTimeBuild/.dtbcache.v2
index 5b976e9f..d7dac299 100644
Binary files a/源代码/.vs/StgSharpDevelop/DesignTimeBuild/.dtbcache.v2 and b/源代码/.vs/StgSharpDevelop/DesignTimeBuild/.dtbcache.v2 differ
diff --git a/源代码/.vs/StgSharpDevelop/FileContentIndex/08051b70-582d-4512-a8d3-b0528db24eee.vsidx b/源代码/.vs/StgSharpDevelop/FileContentIndex/08051b70-582d-4512-a8d3-b0528db24eee.vsidx
deleted file mode 100644
index 5fbfd98a..00000000
Binary files a/源代码/.vs/StgSharpDevelop/FileContentIndex/08051b70-582d-4512-a8d3-b0528db24eee.vsidx and /dev/null differ
diff --git a/源代码/.vs/StgSharpDevelop/FileContentIndex/1f1f5394-27fb-4218-9f50-bae42ed078ca.vsidx b/源代码/.vs/StgSharpDevelop/FileContentIndex/1f1f5394-27fb-4218-9f50-bae42ed078ca.vsidx
deleted file mode 100644
index 897aafc6..00000000
Binary files a/源代码/.vs/StgSharpDevelop/FileContentIndex/1f1f5394-27fb-4218-9f50-bae42ed078ca.vsidx and /dev/null differ
diff --git a/源代码/.vs/StgSharpDevelop/FileContentIndex/2d022621-543d-4e28-893b-814a4531387f.vsidx b/源代码/.vs/StgSharpDevelop/FileContentIndex/2d022621-543d-4e28-893b-814a4531387f.vsidx
deleted file mode 100644
index 13b2656c..00000000
Binary files a/源代码/.vs/StgSharpDevelop/FileContentIndex/2d022621-543d-4e28-893b-814a4531387f.vsidx and /dev/null differ
diff --git a/源代码/.vs/StgSharpDevelop/FileContentIndex/503c8794-1343-4689-8fd0-d23438bd1ee2.vsidx b/源代码/.vs/StgSharpDevelop/FileContentIndex/503c8794-1343-4689-8fd0-d23438bd1ee2.vsidx
new file mode 100644
index 00000000..e404f1c8
Binary files /dev/null and b/源代码/.vs/StgSharpDevelop/FileContentIndex/503c8794-1343-4689-8fd0-d23438bd1ee2.vsidx differ
diff --git a/源代码/.vs/StgSharpDevelop/FileContentIndex/5eb6cf61-944d-4acf-a951-ae5812dc51b4.vsidx b/源代码/.vs/StgSharpDevelop/FileContentIndex/5eb6cf61-944d-4acf-a951-ae5812dc51b4.vsidx
new file mode 100644
index 00000000..6171a185
Binary files /dev/null and b/源代码/.vs/StgSharpDevelop/FileContentIndex/5eb6cf61-944d-4acf-a951-ae5812dc51b4.vsidx differ
diff --git a/源代码/.vs/StgSharpDevelop/FileContentIndex/600a13f3-877c-43f9-ae1c-06e3bb49cff0.vsidx b/源代码/.vs/StgSharpDevelop/FileContentIndex/600a13f3-877c-43f9-ae1c-06e3bb49cff0.vsidx
new file mode 100644
index 00000000..1b7caf38
Binary files /dev/null and b/源代码/.vs/StgSharpDevelop/FileContentIndex/600a13f3-877c-43f9-ae1c-06e3bb49cff0.vsidx differ
diff --git a/源代码/.vs/StgSharpDevelop/FileContentIndex/740aa9c3-058b-4fdd-a17d-7e6677dd8557.vsidx b/源代码/.vs/StgSharpDevelop/FileContentIndex/740aa9c3-058b-4fdd-a17d-7e6677dd8557.vsidx
deleted file mode 100644
index ed616de9..00000000
Binary files a/源代码/.vs/StgSharpDevelop/FileContentIndex/740aa9c3-058b-4fdd-a17d-7e6677dd8557.vsidx and /dev/null differ
diff --git a/源代码/.vs/StgSharpDevelop/FileContentIndex/df1168c8-f339-4a86-907a-0aa6f7511e8e.vsidx b/源代码/.vs/StgSharpDevelop/FileContentIndex/df1168c8-f339-4a86-907a-0aa6f7511e8e.vsidx
deleted file mode 100644
index 9f0c5ace..00000000
Binary files a/源代码/.vs/StgSharpDevelop/FileContentIndex/df1168c8-f339-4a86-907a-0aa6f7511e8e.vsidx and /dev/null differ
diff --git a/源代码/.vs/StgSharpDevelop/FileContentIndex/e53b05e8-8a92-4a98-8337-60609d0140d5.vsidx b/源代码/.vs/StgSharpDevelop/FileContentIndex/e53b05e8-8a92-4a98-8337-60609d0140d5.vsidx
new file mode 100644
index 00000000..4b1aeb6a
Binary files /dev/null and b/源代码/.vs/StgSharpDevelop/FileContentIndex/e53b05e8-8a92-4a98-8337-60609d0140d5.vsidx differ
diff --git a/源代码/.vs/StgSharpDevelop/FileContentIndex/edd62bb3-7ffc-4b98-8b17-1a9e946ab1ed.vsidx b/源代码/.vs/StgSharpDevelop/FileContentIndex/edd62bb3-7ffc-4b98-8b17-1a9e946ab1ed.vsidx
new file mode 100644
index 00000000..95ff964c
Binary files /dev/null and b/源代码/.vs/StgSharpDevelop/FileContentIndex/edd62bb3-7ffc-4b98-8b17-1a9e946ab1ed.vsidx differ
diff --git a/源代码/.vs/StgSharpDevelop/v17/.suo b/源代码/.vs/StgSharpDevelop/v17/.suo
index f4cdd01c..61f21be3 100644
Binary files a/源代码/.vs/StgSharpDevelop/v17/.suo and b/源代码/.vs/StgSharpDevelop/v17/.suo differ
diff --git a/源代码/.vs/StgSharpDevelop/v17/Browse.VC.db b/源代码/.vs/StgSharpDevelop/v17/Browse.VC.db
index 8f4f2a98..9352d447 100644
Binary files a/源代码/.vs/StgSharpDevelop/v17/Browse.VC.db and b/源代码/.vs/StgSharpDevelop/v17/Browse.VC.db differ
diff --git a/源代码/.vs/StgSharpDevelop/v17/fileList.bin b/源代码/.vs/StgSharpDevelop/v17/fileList.bin
index 906fdabc..7fcabfe8 100644
Binary files a/源代码/.vs/StgSharpDevelop/v17/fileList.bin and b/源代码/.vs/StgSharpDevelop/v17/fileList.bin differ
diff --git a/源代码/.vs/StgSharpDevelop/v17/ipch/AutoPCH/fd8fe869b9042dc6/STGSHARPC.ipch b/源代码/.vs/StgSharpDevelop/v17/ipch/AutoPCH/fd8fe869b9042dc6/STGSHARPC.ipch
index 57a64dd2..b11480ad 100644
Binary files a/源代码/.vs/StgSharpDevelop/v17/ipch/AutoPCH/fd8fe869b9042dc6/STGSHARPC.ipch and b/源代码/.vs/StgSharpDevelop/v17/ipch/AutoPCH/fd8fe869b9042dc6/STGSHARPC.ipch differ
diff --git a/源代码/StgSharp/Graphics/Form.cs b/源代码/StgSharp/Graphics/Form.cs
index 6ff9ca22..c920aa31 100644
--- a/源代码/StgSharp/Graphics/Form.cs
+++ b/源代码/StgSharp/Graphics/Form.cs
@@ -31,7 +31,7 @@ namespace StgSharp.Graphics
internal int width;
internal IntPtr windowID;
- protected IglFunc GL;
+ internal IglFunc GL;
internal FormUpdateBuffer UpdateBuffer;
internal FormRenderBuffer RenderBuffer;
@@ -41,12 +41,6 @@ namespace StgSharp.Graphics
private SemaphoreSlim pong = new SemaphoreSlim(0, 1);
internal readonly SemaphoreSlim ouetrPong = new SemaphoreSlim(0, 1);
- private UpdateWhenRender updateWhenRender;
- private DynamicMethod updateWhenRenderDM;
- private ILGenerator updateWhenRenderIL;
-
- private delegate void UpdateWhenRender();
-
///
/// Height of this form, represent in
///
@@ -56,6 +50,15 @@ namespace StgSharp.Graphics
set => height = value;
}
+ private Form()
+ {
+#if NET5_0_OR_GREATER
+ Unsafe.SkipInit(out UpdateBuffer);
+ Unsafe.SkipInit(out RenderBuffer);
+ Unsafe.SkipInit(out GL);
+#endif
+ }
+
///
/// Width of this form, represent in
///
@@ -85,6 +88,10 @@ namespace StgSharp.Graphics
public abstract void Deinit(object[] args);
+ ///
+ /// Necessary operation to init this form.
+ ///
+ ///
public abstract void Init(object[] args);
public abstract void OnRenderFrame(object[] args);
@@ -135,16 +142,7 @@ namespace StgSharp.Graphics
internal void InternalInit(object args)
{
- updateWhenRenderDM = new DynamicMethod(
- name: "updateWhenRender",
- returnType: typeof(void),
- parameterTypes: new Type[] { typeof(void) },
- restrictedSkipVisibility: true
- );
- updateWhenRenderIL = updateWhenRenderDM.GetILGenerator();
-
Init((object[])args);
-
}
@@ -234,8 +232,8 @@ namespace StgSharp.Graphics
{
windowID = windowPtr;
}
- glRender = new GLonRender();
- glContext = new GLcontext();
+ GLonRender glRender = new GLonRender();
+ GLcontext glContext = new GLcontext();
IntPtr ptr = Marshal.AllocHGlobal(sizeof(GLcontextIO));
contextID = (GLcontextIO*)ptr;
*contextID = new GLcontextIO();
diff --git a/源代码/StgSharp/Graphics/GL/GLloader.cs b/源代码/StgSharp/Graphics/GL/GLloader.cs
index c27abb10..ce5b67c6 100644
--- a/源代码/StgSharp/Graphics/GL/GLloader.cs
+++ b/源代码/StgSharp/Graphics/GL/GLloader.cs
@@ -16,11 +16,11 @@ namespace StgSharp.Graphics
internal GLcontext glContext
{
- get { return glRender.api; }
+ get { return RenderBuffer.GL.api; }
set
{
- glUpdate.api = value;
- glRender.api = value;
+ UpdateBuffer.GL.api = value;
+ RenderBuffer.GL.api = value;
}
}
diff --git a/源代码/StgSharp/Graphics/GL/GLonRender.cs b/源代码/StgSharp/Graphics/GL/GLonRender.cs
index aac87092..93af34fa 100644
--- a/源代码/StgSharp/Graphics/GL/GLonRender.cs
+++ b/源代码/StgSharp/Graphics/GL/GLonRender.cs
@@ -10,6 +10,11 @@ namespace StgSharp.Graphics
internal unsafe partial class GLonRender : IglFunc
{
+ internal GLonRender(GLcontext context)
+ {
+ api = context;
+ }
+
internal GLcontext api;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
diff --git a/源代码/StgSharp/obj/x64/Debug/netstandard2.1/StgSharp.AssemblyInfo.cs b/源代码/StgSharp/obj/x64/Debug/netstandard2.1/StgSharp.AssemblyInfo.cs
index 187e3ba9..2274e4da 100644
--- a/源代码/StgSharp/obj/x64/Debug/netstandard2.1/StgSharp.AssemblyInfo.cs
+++ b/源代码/StgSharp/obj/x64/Debug/netstandard2.1/StgSharp.AssemblyInfo.cs
@@ -14,7 +14,7 @@ using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("StgSharp")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
-[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
+[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+8b14599233aebdea7b06c2073fd92aa31800164d")]
[assembly: System.Reflection.AssemblyProductAttribute("StgSharp")]
[assembly: System.Reflection.AssemblyTitleAttribute("StgSharp")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
diff --git a/源代码/StgSharp/obj/x64/Debug/netstandard2.1/StgSharp.AssemblyInfoInputs.cache b/源代码/StgSharp/obj/x64/Debug/netstandard2.1/StgSharp.AssemblyInfoInputs.cache
index 3d933be5..e943956a 100644
--- a/源代码/StgSharp/obj/x64/Debug/netstandard2.1/StgSharp.AssemblyInfoInputs.cache
+++ b/源代码/StgSharp/obj/x64/Debug/netstandard2.1/StgSharp.AssemblyInfoInputs.cache
@@ -1 +1 @@
-e8b19b35bca753348ef94df4faf984102d2e81946d465d23132400b7d6c8fb6d
+d5b3ffe3df8161f7f0a9fcb263e3044aa5365c6f966b40447a4af1ba4b298326
diff --git a/源代码/StgSharp/obj/x64/Debug/netstandard2.1/StgSharp.csproj.CoreCompileInputs.cache b/源代码/StgSharp/obj/x64/Debug/netstandard2.1/StgSharp.csproj.CoreCompileInputs.cache
index 2f633a09..3957caa4 100644
--- a/源代码/StgSharp/obj/x64/Debug/netstandard2.1/StgSharp.csproj.CoreCompileInputs.cache
+++ b/源代码/StgSharp/obj/x64/Debug/netstandard2.1/StgSharp.csproj.CoreCompileInputs.cache
@@ -1 +1 @@
-dd6796f149809295555f79b84f32a9815cb39557dd7a5256658cce0f77660c44
+7facd19ab2824e9daa978ab4f59ebc7715a7a95082411bf4260d938ff9ce36fd
diff --git a/源代码/StgSharp/obj/x64/Debug/netstandard2.1/StgSharp.sourcelink.json b/源代码/StgSharp/obj/x64/Debug/netstandard2.1/StgSharp.sourcelink.json
index 8e4af823..553668b6 100644
--- a/源代码/StgSharp/obj/x64/Debug/netstandard2.1/StgSharp.sourcelink.json
+++ b/源代码/StgSharp/obj/x64/Debug/netstandard2.1/StgSharp.sourcelink.json
@@ -1 +1 @@
-{"documents":{"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\*":"https://raw.githubusercontent.com/Nitload-NSI/CCD_Github/f97fb137bab6d3951628058d311cdd6563088253/*"}}
\ No newline at end of file
+{"documents":{"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\*":"https://raw.githubusercontent.com/Nitload-NSI/CCD_Github/8b14599233aebdea7b06c2073fd92aa31800164d/*"}}
\ No newline at end of file
diff --git a/源代码/StgSharpDebug/obj/x64/Debug/net6.0/StgSharpDebug.AssemblyInfo.cs b/源代码/StgSharpDebug/obj/x64/Debug/net6.0/StgSharpDebug.AssemblyInfo.cs
index 099f5edd..21632de4 100644
--- a/源代码/StgSharpDebug/obj/x64/Debug/net6.0/StgSharpDebug.AssemblyInfo.cs
+++ b/源代码/StgSharpDebug/obj/x64/Debug/net6.0/StgSharpDebug.AssemblyInfo.cs
@@ -14,7 +14,7 @@ using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("StgSharpDebug")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
-[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
+[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+8b14599233aebdea7b06c2073fd92aa31800164d")]
[assembly: System.Reflection.AssemblyProductAttribute("StgSharpDebug")]
[assembly: System.Reflection.AssemblyTitleAttribute("StgSharpDebug")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
diff --git a/源代码/StgSharpDebug/obj/x64/Debug/net6.0/StgSharpDebug.AssemblyInfoInputs.cache b/源代码/StgSharpDebug/obj/x64/Debug/net6.0/StgSharpDebug.AssemblyInfoInputs.cache
index 53232a0d..3ce4ed15 100644
--- a/源代码/StgSharpDebug/obj/x64/Debug/net6.0/StgSharpDebug.AssemblyInfoInputs.cache
+++ b/源代码/StgSharpDebug/obj/x64/Debug/net6.0/StgSharpDebug.AssemblyInfoInputs.cache
@@ -1 +1 @@
-9f92006774b8dcbe7ff116213c08f7040b5d19f4b0a547971f9e00de3873288c
+51df9ffdab5f2efe774f0851f1e38e609d26429e2fe900edf259834ca9f1c168
diff --git a/源代码/StgSharpDebug/obj/x64/Debug/net6.0/StgSharpDebug.csproj.CoreCompileInputs.cache b/源代码/StgSharpDebug/obj/x64/Debug/net6.0/StgSharpDebug.csproj.CoreCompileInputs.cache
index 5a1283af..c9b36539 100644
--- a/源代码/StgSharpDebug/obj/x64/Debug/net6.0/StgSharpDebug.csproj.CoreCompileInputs.cache
+++ b/源代码/StgSharpDebug/obj/x64/Debug/net6.0/StgSharpDebug.csproj.CoreCompileInputs.cache
@@ -1 +1 @@
-3da89a6cade975c55a6d2974db885b9f95a74c2ed1e2c84ffa63b8d406a42cf4
+00bbfd1293fc084f2832b4c2a7391aef92f545fcaa28ae1447945a3e52b96666
diff --git a/源代码/StgSharpDebug/obj/x64/Debug/net6.0/StgSharpDebug.sourcelink.json b/源代码/StgSharpDebug/obj/x64/Debug/net6.0/StgSharpDebug.sourcelink.json
index 8e4af823..553668b6 100644
--- a/源代码/StgSharpDebug/obj/x64/Debug/net6.0/StgSharpDebug.sourcelink.json
+++ b/源代码/StgSharpDebug/obj/x64/Debug/net6.0/StgSharpDebug.sourcelink.json
@@ -1 +1 @@
-{"documents":{"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\*":"https://raw.githubusercontent.com/Nitload-NSI/CCD_Github/f97fb137bab6d3951628058d311cdd6563088253/*"}}
\ No newline at end of file
+{"documents":{"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\*":"https://raw.githubusercontent.com/Nitload-NSI/CCD_Github/8b14599233aebdea7b06c2073fd92aa31800164d/*"}}
\ No newline at end of file