daily update on 20231016 by nitload youmu, vao,vbo,ebo struct added
This commit is contained in:
@@ -328,6 +328,11 @@ namespace StgSharp
|
||||
CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe GLFWframebuffersizefun glfwSetFramebufferSizeCallback(IntPtr window, GLFWframebuffersizefun callback);
|
||||
|
||||
//window is the pointer to a glfwwindow instance
|
||||
[DllImport(SSGC_libname, EntryPoint = "glfwSetFramebufferSizeCallback",
|
||||
CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe GLFWframebuffersizefun glfwSetFramebufferSizeCallback(IntPtr window, FrameBufferSizeHadler callback);
|
||||
|
||||
[DllImport(SSGC_libname, EntryPoint = "glfwSetErrorCallback",
|
||||
CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe GLFWerrorfun glfwSetErrorCallback(GLFWerrorfun callback);
|
||||
|
||||
@@ -1,20 +1,74 @@
|
||||
|
||||
|
||||
using StgSharp.Geometries;
|
||||
using StgSharp.Geometries;
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
|
||||
|
||||
|
||||
namespace StgSharp
|
||||
{
|
||||
internal enum LogType
|
||||
{
|
||||
Error,
|
||||
Warning,
|
||||
Info,
|
||||
InfoError,
|
||||
InfoWarning,
|
||||
}
|
||||
|
||||
internal static unsafe partial class internalIO
|
||||
{
|
||||
|
||||
internal const string SSGC_libname =
|
||||
"StgSharpGraphic";
|
||||
|
||||
internal const string SSG_errorlog =
|
||||
"SSG_errorlog.log";
|
||||
|
||||
internal static void InternalWriteLog(string beforeTime, string logLine, LogType logType)
|
||||
{
|
||||
if (!File.Exists(internalIO.SSG_errorlog))
|
||||
{
|
||||
FileStream stream = File.Create(internalIO.SSG_errorlog);
|
||||
stream.Close();
|
||||
}
|
||||
|
||||
using (StreamWriter logStream = File.AppendText(SSG_errorlog))
|
||||
{
|
||||
logStream.WriteLine(beforeTime);
|
||||
logStream.WriteLine($"{logType}\t@\t{DateTime.Now.ToString("o")}");
|
||||
logStream.WriteLine(logLine);
|
||||
}
|
||||
}
|
||||
|
||||
internal static void InternalWriteLog(string logLine, LogType logType)
|
||||
{
|
||||
if (!File.Exists(internalIO.SSG_errorlog))
|
||||
{
|
||||
FileStream stream = File.Create(internalIO.SSG_errorlog);
|
||||
stream.Close();
|
||||
}
|
||||
|
||||
using (StreamWriter logStream = File.AppendText(SSG_errorlog))
|
||||
{
|
||||
logStream.WriteLine($"{logType}\t@\t{DateTime.Now.ToString("o")}");
|
||||
|
||||
logStream.WriteLine(logLine);
|
||||
}
|
||||
}
|
||||
|
||||
internal static void InternalAppendLog(string log)
|
||||
{
|
||||
if (!File.Exists(internalIO.SSG_errorlog))
|
||||
{
|
||||
FileStream stream = File.Create(internalIO.SSG_errorlog);
|
||||
stream.Close();
|
||||
}
|
||||
|
||||
using (StreamWriter logStream = File.AppendText(SSG_errorlog))
|
||||
{
|
||||
logStream.WriteLine(log);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user