daily uodate on 20231215 by nitload youmu
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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/*"}}
|
||||
Reference in New Issue
Block a user