daily update on 20240828 by nitload youmu, autotexture added

This commit is contained in:
Nitload
2024-08-28 10:58:31 +08:00
parent d082071f2d
commit 1ee4e4a42f
586 changed files with 60910 additions and 123106 deletions
+26 -23
View File
@@ -52,7 +52,7 @@ namespace StgSharp
[DllImport(SSC_libName, EntryPoint = "linkShaderProgram",
CallingConvention = CallingConvention.Cdecl)]
internal static extern unsafe uint InternalLinkShaderProgram(GLcontext* context, uint shaderProgram);
internal static extern unsafe uint InternalLinkShaderProgram(OpenglContext* context, uint shaderProgram);
[DllImport(SSC_libName, EntryPoint = "readLog",
CallingConvention = CallingConvention.Cdecl)]
@@ -76,8 +76,32 @@ namespace StgSharp.Graphics
public delegate IntPtr ImageLoader(string name, ref int width, ref int height, ref int definedChannel, int desiredChannel);
[StructLayout(LayoutKind.Sequential)]
public struct GLcontext
public struct OpenglContext
{
public override bool Equals(object obj)
{
return false;
}
public override unsafe int GetHashCode()
{
fixed (OpenglContext* sptr = &this)
{
return sptr->GetHashCode();
}
}
public static bool operator !=(OpenglContext left, OpenglContext right)
{
return !(left == right);
}
public static bool operator ==(OpenglContext left, OpenglContext right)
{
return left.Equals(right);
}
#region glapi
internal unsafe delegate*<uint, GLfixed, void> glAccumxOES;
@@ -2615,27 +2639,6 @@ namespace StgSharp.Graphics
#endregion glapi
public override bool Equals(object obj)
{
return false;
}
public unsafe override int GetHashCode()
{
fixed (GLcontext* sptr = &this)
{
return sptr->GetHashCode();
}
}
public static bool operator ==(GLcontext left, GLcontext right)
{
return left.Equals(right);
}
public static bool operator !=(GLcontext left, GLcontext right)
{
return !(left == right);
}
}
}
@@ -30,7 +30,7 @@
//-----------------------------------------------------------------------
using StgSharp.Geometries;
using StgSharp.Graphics;
using StgSharp.Graphics.GL;
using StgSharp.Graphics.OpenGL;
using System;
using System.Collections.Generic;
@@ -53,9 +53,10 @@ namespace StgSharp
InfoError,
InfoWarning,
}
internal static unsafe partial class InternalIO
{
internal const string SS_errorLog =
"SS_errorlog.log";
@@ -65,13 +66,13 @@ namespace StgSharp
internal static Dictionary<TypeCode, uint> GLtype =
new Dictionary<TypeCode, uint>();
internal static SemaphoreSlim logSyncSemaphore = new SemaphoreSlim(1, 1);
internal static readonly GCHandle ssc_logHandle =
GCHandle.Alloc(new byte[512], GCHandleType.Pinned);
internal static IntPtr SSClibPtr = IntPtr.Zero;
internal static SemaphoreSlim logSyncSemaphore = new SemaphoreSlim(1, 1);
static InternalIO()
{
GLtype.Add(TypeCode.Single, GLconst.FLOAT);
@@ -103,10 +104,12 @@ namespace StgSharp
try
{
IntPtr procPtr =
#if Windows
#if WINDOWS
IntPtr.Zero;
#elif Linux
#elif LINUX
#else
IntPtr.Zero;
#endif
return procPtr;
}