daily uodate on 20231215 by nitload youmu

This commit is contained in:
Nitload
2023-12-15 17:07:03 +08:00
parent 8b14599233
commit 659420aa6c
28 changed files with 32 additions and 29 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
+16 -18
View File
@@ -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();
/// <summary>
/// Height of this form, represent in <see cref="int"/>
/// </summary>
@@ -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
}
/// <summary>
/// Width of this form, represent in <see cref="int"/>
/// </summary>
@@ -85,6 +88,10 @@ namespace StgSharp.Graphics
public abstract void Deinit(object[] args);
/// <summary>
/// Necessary operation to init this form.
/// </summary>
/// <param name="args"></param>
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();
+3 -3
View File
@@ -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;
}
}
@@ -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)]
@@ -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")]
@@ -1 +1 @@
e8b19b35bca753348ef94df4faf984102d2e81946d465d23132400b7d6c8fb6d
d5b3ffe3df8161f7f0a9fcb263e3044aa5365c6f966b40447a4af1ba4b298326
@@ -1 +1 @@
dd6796f149809295555f79b84f32a9815cb39557dd7a5256658cce0f77660c44
7facd19ab2824e9daa978ab4f59ebc7715a7a95082411bf4260d938ff9ce36fd
@@ -1 +1 @@
{"documents":{"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\*":"https://raw.githubusercontent.com/Nitload-NSI/CCD_Github/f97fb137bab6d3951628058d311cdd6563088253/*"}}
{"documents":{"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\*":"https://raw.githubusercontent.com/Nitload-NSI/CCD_Github/8b14599233aebdea7b06c2073fd92aa31800164d/*"}}
@@ -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")]
@@ -1 +1 @@
9f92006774b8dcbe7ff116213c08f7040b5d19f4b0a547971f9e00de3873288c
51df9ffdab5f2efe774f0851f1e38e609d26429e2fe900edf259834ca9f1c168
@@ -1 +1 @@
3da89a6cade975c55a6d2974db885b9f95a74c2ed1e2c84ffa63b8d406a42cf4
00bbfd1293fc084f2832b4c2a7391aef92f545fcaa28ae1447945a3e52b96666
@@ -1 +1 @@
{"documents":{"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\*":"https://raw.githubusercontent.com/Nitload-NSI/CCD_Github/f97fb137bab6d3951628058d311cdd6563088253/*"}}
{"documents":{"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\*":"https://raw.githubusercontent.com/Nitload-NSI/CCD_Github/8b14599233aebdea7b06c2073fd92aa31800164d/*"}}