daily update on 20230911 by nitload youmu, uncertain bug of gl api loading
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
using StgSharp.Math;
|
||||
using StgSharp.Graphics;
|
||||
using StgSharp.Math;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Numerics;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Runtime.Intrinsics.X86;
|
||||
|
||||
namespace StgSharp
|
||||
{
|
||||
@@ -13,19 +13,63 @@ namespace StgSharp
|
||||
|
||||
internal unsafe static void Main(string[] args)
|
||||
{
|
||||
Matrix3x3 matrix = new Matrix3x3(
|
||||
1,2,3,
|
||||
4,5,6,
|
||||
7,8,9
|
||||
|
||||
Graphic.InitGL(3, 3);
|
||||
|
||||
Form f = Graphic.GLcreateWindow(
|
||||
800, 600, "Test STG#!", IntPtr.Zero, null
|
||||
);
|
||||
Graphic.GLmakeContexCurrent(f);
|
||||
internalIO.glfwSetFramebufferSizeCallback(f.windowID, FormSizeCallback);
|
||||
|
||||
Console.WriteLine(matrix.Det());
|
||||
GetApiRep();
|
||||
Graphic.InitGLAD(Graphic.GetProcAddress);
|
||||
|
||||
while (internalIO.glfwWindowShouldClose(f.windowID) == 0)
|
||||
{
|
||||
ProcessInput(f.windowID);
|
||||
|
||||
Graphic.glClearColor(0.2f, 0.3f, 0.3f, 1.0f);
|
||||
Graphic.glClear(GLFW.GL_COLOR_BUFFER_BIT);
|
||||
|
||||
internalIO.glfwSwapBuffers(f.windowID);
|
||||
internalIO.glfwPollEvents();
|
||||
}
|
||||
|
||||
internalIO.glfwTerminate();
|
||||
|
||||
}
|
||||
|
||||
public static void FormSizeCallback(IntPtr window, int width, int height)
|
||||
{
|
||||
Graphic.glViewport(0, 0, width, height);
|
||||
}
|
||||
|
||||
public static void ProcessInput(IntPtr windowPtr)
|
||||
{
|
||||
if (internalIO.glfwGetKey(windowPtr, (int)Control.Key.ESCAPE)
|
||||
== KeyStatus.PRESS)
|
||||
{
|
||||
internalIO.glfwSetWindowShouldClose(windowPtr, 1);
|
||||
}
|
||||
}
|
||||
|
||||
[DllImport(internalIO.SSGC_libname, EntryPoint = "getApiReporter",
|
||||
CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
|
||||
internal extern static void internal_getApiReporter(IntPtr reporter);
|
||||
|
||||
internal static void GetApiRep()
|
||||
{
|
||||
showApiHandler handle = new showApiHandler(ShowApiAddress);
|
||||
internal_getApiReporter(Marshal.GetFunctionPointerForDelegate(handle));
|
||||
}
|
||||
internal delegate void showApiHandler(ulong add);
|
||||
internal static void ShowApiAddress(ulong address)
|
||||
{
|
||||
Console.WriteLine(address);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"runtimeTarget": {
|
||||
"name": ".NETCoreApp,Version=v6.0",
|
||||
"signature": ""
|
||||
},
|
||||
"compilationOptions": {},
|
||||
"targets": {
|
||||
".NETCoreApp,Version=v6.0": {
|
||||
"StgSharpDebug/1.0.0": {
|
||||
"runtime": {
|
||||
"StgSharpDebug.dll": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"libraries": {
|
||||
"StgSharpDebug/1.0.0": {
|
||||
"type": "project",
|
||||
"serviceable": false,
|
||||
"sha512": ""
|
||||
}
|
||||
}
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"runtimeOptions": {
|
||||
"tfm": "net6.0",
|
||||
"framework": {
|
||||
"name": "Microsoft.NETCore.App",
|
||||
"version": "6.0.0"
|
||||
},
|
||||
"configProperties": {
|
||||
"System.Reflection.Metadata.MetadataUpdater.IsSupported": false
|
||||
}
|
||||
}
|
||||
}
|
||||
Binary file not shown.
@@ -60,7 +60,7 @@
|
||||
"privateAssets": "all"
|
||||
}
|
||||
},
|
||||
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\7.0.306\\RuntimeIdentifierGraph.json"
|
||||
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\7.0.400\\RuntimeIdentifierGraph.json"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">$(UserProfile)\.nuget\packages\</NuGetPackageRoot>
|
||||
<NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">C:\Users\Nitlo\.nuget\packages\;C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages</NuGetPackageFolders>
|
||||
<NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle>
|
||||
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">6.6.0</NuGetToolVersion>
|
||||
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">6.7.0</NuGetToolVersion>
|
||||
</PropertyGroup>
|
||||
<ItemGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
|
||||
<SourceRoot Include="C:\Users\Nitlo\.nuget\packages\" />
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
"privateAssets": "all"
|
||||
}
|
||||
},
|
||||
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\7.0.306\\RuntimeIdentifierGraph.json"
|
||||
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\7.0.400\\RuntimeIdentifierGraph.json"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"version": 2,
|
||||
"dgSpecHash": "EIWMDFy9zzJrykYjrfUBwHbP9SwB8ZoyVm5HhjnpN+8CBIi2Zd+p6o35FnDHiYyxjYWf47TWyG6ymafb5pKNVw==",
|
||||
"dgSpecHash": "mBiaYlmdKY7pcEUrgIYHWdVJNFdlkIpvBftTAU0ZhHli28Y+yj1le28eTUH+fFgrKOlwKEBtHixyqvrNNYgqaw==",
|
||||
"success": true,
|
||||
"projectFilePath": "D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\源代码\\StgSharpDebug\\StgSharpDebug.csproj",
|
||||
"expectedPackageFiles": [],
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -1 +1 @@
|
||||
1be9af1044b775e9c8191a9195ea3b3e03344c42
|
||||
f63f47dc6ac0f86b87f2fbb526ea68ed23d9fec7
|
||||
|
||||
@@ -3,7 +3,6 @@ D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharp
|
||||
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpDebug\bin\x64\Debug\net6.0\StgSharpDebug.deps.json
|
||||
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpDebug\bin\x64\Debug\net6.0\StgSharpDebug.runtimeconfig.json
|
||||
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpDebug\bin\x64\Debug\net6.0\StgSharpDebug.dll
|
||||
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpDebug\obj\x64\Debug\net6.0\StgSharpDebug.csproj.AssemblyReference.cache
|
||||
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpDebug\obj\x64\Debug\net6.0\StgSharpDebug.GeneratedMSBuildEditorConfig.editorconfig
|
||||
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpDebug\obj\x64\Debug\net6.0\StgSharpDebug.AssemblyInfoInputs.cache
|
||||
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpDebug\obj\x64\Debug\net6.0\StgSharpDebug.AssemblyInfo.cs
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1 @@
|
||||
999d9ef8ee91b460e93e22f24f66316913caf649
|
||||
@@ -0,0 +1,13 @@
|
||||
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpDebug\bin\x64\Release\net6.0\StgSharpDebug.exe
|
||||
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpDebug\bin\x64\Release\net6.0\StgsharpGraphic.dll
|
||||
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpDebug\bin\x64\Release\net6.0\StgSharpDebug.deps.json
|
||||
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpDebug\bin\x64\Release\net6.0\StgSharpDebug.runtimeconfig.json
|
||||
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpDebug\bin\x64\Release\net6.0\StgSharpDebug.dll
|
||||
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpDebug\obj\x64\Release\net6.0\StgSharpDebug.GeneratedMSBuildEditorConfig.editorconfig
|
||||
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpDebug\obj\x64\Release\net6.0\StgSharpDebug.AssemblyInfoInputs.cache
|
||||
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpDebug\obj\x64\Release\net6.0\StgSharpDebug.AssemblyInfo.cs
|
||||
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpDebug\obj\x64\Release\net6.0\StgSharpDebug.csproj.CoreCompileInputs.cache
|
||||
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpDebug\obj\x64\Release\net6.0\StgSharpDebug.dll
|
||||
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpDebug\obj\x64\Release\net6.0\refint\StgSharpDebug.dll
|
||||
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpDebug\obj\x64\Release\net6.0\StgSharpDebug.genruntimeconfig.cache
|
||||
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpDebug\obj\x64\Release\net6.0\ref\StgSharpDebug.dll
|
||||
Binary file not shown.
@@ -0,0 +1 @@
|
||||
b39025d301f8cfc395af63e7883c876e4d6a1ad7
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user