daily uodate on 20231208 by nitload youmu, preparation for multi thread rendering
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using StgSharp.Controlling;
|
||||
using StgSharp.Graphics;
|
||||
using StgSharp.Math;
|
||||
using System;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Runtime.InteropServices;
|
||||
@@ -31,6 +32,9 @@ namespace StgSharp
|
||||
CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe IntPtr InternalReadLog();
|
||||
|
||||
[DllImport(SSC_libname, EntryPoint = "loadImageData",
|
||||
CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
|
||||
internal static extern unsafe void InternalLoadImage(string fileName, Image.ImageInfo* output, ImageLoader loader);
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -41,6 +45,9 @@ namespace StgSharp
|
||||
|
||||
namespace StgSharp.Graphics
|
||||
{
|
||||
[UnmanagedFunctionPointer(CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
|
||||
public delegate IntPtr ImageLoader(string name, ref int width, ref int height, ref int definedChannel, int desiredChannel);
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public unsafe struct GLcontextIO
|
||||
{
|
||||
@@ -2590,7 +2597,6 @@ namespace StgSharp.Graphics
|
||||
|
||||
public GLcontextIO()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ using System.Runtime.InteropServices;
|
||||
|
||||
namespace StgSharp
|
||||
{
|
||||
internal enum LogType
|
||||
public enum LogType
|
||||
{
|
||||
Error,
|
||||
Warning,
|
||||
@@ -37,6 +37,7 @@ namespace StgSharp
|
||||
GLtype.Add(typeof(ushort), GLconst.UNSIGNED_SHORT);
|
||||
GLtype.Add(typeof(sbyte), GLconst.BYTE);
|
||||
GLtype.Add(typeof(byte), GLconst.UNSIGNED_BYTE);
|
||||
|
||||
}
|
||||
|
||||
internal static T InternalLoadProc<T>(IntPtr libPtr, string name) where T : Delegate
|
||||
@@ -49,7 +50,6 @@ namespace StgSharp
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@@ -98,16 +98,15 @@ namespace StgSharp
|
||||
|
||||
internal static void InternalWriteLog(string logLine, LogType logType)
|
||||
{
|
||||
if (!File.Exists(InternalIO.SS_errorlog))
|
||||
if (!File.Exists(SS_errorlog))
|
||||
{
|
||||
FileStream stream = File.Create(InternalIO.SS_errorlog);
|
||||
FileStream stream = File.Create(SS_errorlog);
|
||||
stream.Close();
|
||||
}
|
||||
|
||||
using (StreamWriter logStream = File.AppendText(SS_errorlog))
|
||||
{
|
||||
logStream.WriteLine($"{logType}\t@\t{DateTime.Now.ToString("o")}");
|
||||
|
||||
logStream.WriteLine(logLine);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user