daily update on 20230609 by nitload youmu, graphic arragement for better form init

This commit is contained in:
Nitload
2023-06-09 08:12:06 +08:00
parent 1874b32fb0
commit 50b4965e54
147 changed files with 8886 additions and 478 deletions
+2 -6
View File
@@ -6,7 +6,7 @@ using System.Text;
namespace StgSharp
{
public static unsafe partial class internalIO
internal static unsafe partial class internalIO
{
[DllImport("StgSharpGraphics.dll", EntryPoint = "initTriangle")]
internal static unsafe extern triangleVertexArray initTriangleVertex();
@@ -17,13 +17,9 @@ namespace StgSharp
[DllImport("StgSharpGraphics.dll", EntryPoint = "initPolygon5")]
internal static unsafe extern Polygon5VertexArray initPolygon5Vertex();
[DllImport("StgSharpGraphics.dll", EntryPoint = "inputTriangle")]
internal static unsafe extern void internalLoadTriangle(triangleVertexArray triangle);
public static unsafe void LoadTriangle(Triangle t)
{
internalLoadTriangle(t.vertexArray);
}
}
}
+17 -5
View File
@@ -1,4 +1,5 @@
using StgSharp.Graphics;
using StgSharp.Graphics.GL;
using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
@@ -6,18 +7,29 @@ using System.Text;
namespace StgSharp
{
public static partial class internalIO
internal static partial class internalIO
{
[DllImport("StgSharpGraphics.dll", EntryPoint = "InitGL")]
internal static extern unsafe void InternalInitGL();
[DllImport("StgSharpGraphics.dll", EntryPoint = "InitWindow")]
public static extern unsafe IntPtr InitWindow(Window win);
internal static extern unsafe IntPtr InternalInitWindow(formInfo win);
[DllImport("StgSharpGraphics.dll", EntryPoint = "CompileShader")]
public static unsafe extern void CompileShader();
internal static unsafe extern void InternalCompileShader
(
shaderObject* shaderObj
);
[DllImport("StgSharpGraphics.dll", EntryPoint = "RenderWindow")]
public static unsafe extern void RenderWindow(IntPtr window, Window info);
internal static unsafe extern void InternalRenderWindow
(
IntPtr window,
formInfo info,
shaderObject* shaderObj
);
[DllImport("StgSharpGraphics.dll", EntryPoint = "TerminateWindow")]
public static unsafe extern void TerminateWindow();
internal static unsafe extern void TerminateWindow(shaderObject* shaderObj);
}
}
@@ -1,6 +1,6 @@
using StgSharp.Entities;
using StgSharp.Graphics;
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Text;
@@ -11,6 +11,7 @@ namespace StgSharp.Control
[AllowNull]
internal static Pool _currentPool = default;
internal static LinkedList<Pool> allPool;
internal static LinkedList<Form> allForm;
/// <summary>
/// Tick counter count the frames passed since the program start.
@@ -23,10 +24,12 @@ namespace StgSharp.Control
static ProgramTimeLine()
{
allForm = new LinkedList<Form>();
allPool = new LinkedList<Pool>();
#if DEBUG
Console.WriteLine("Timeline init OK!") ;
#endif
internalIO.InternalInitGL();
}
internal static void OnRender()
@@ -47,6 +50,10 @@ namespace StgSharp.Control
}
public static void InitProgram()
{
}
}