daily update on 20240213 by nitload youmu. 逐步弃用GLFW,正在使用wgl重写glfw底层,相关实现转移到C#实现,SSC彻底变成线性代数计算器。

This commit is contained in:
Nitload
2024-02-13 23:42:22 +08:00
parent 8391569482
commit a2241a5a58
307 changed files with 16701 additions and 10296 deletions
+7 -9
View File
@@ -17,25 +17,24 @@ namespace StgSharp
[DllImport(SSC_libname, EntryPoint = "linkShaderProgram",
CallingConvention = CallingConvention.Cdecl)]
internal static extern uint InternalLinkShaderProgram(uint shaderProgram);
internal static extern unsafe uint InternalLinkShaderProgram(GLcontext* context, uint shaderProgram);
[DllImport(SSC_libname, EntryPoint = "loadShaderCode",
CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
internal static extern unsafe uint InternalLoadShaderCode(byte* shaderCode, int shaderType);
[DllImport(SSC_libname, EntryPoint = "setCurrentGLContext",
CallingConvention = CallingConvention.Cdecl)]
internal static extern unsafe void InternalSetCurrentGLContext(IntPtr windowID, GLcontext* context);
internal static extern unsafe uint InternalLoadShaderCode(GLcontext* context, byte* shaderCode, int shaderType);
[DllImport(SSC_libname, EntryPoint = "readLog",
CallingConvention = CallingConvention.Cdecl)]
internal static extern unsafe IntPtr InternalReadLog();
internal static extern unsafe IntPtr InternalReadSSCLog();
[DllImport(SSC_libname, EntryPoint = "loadImageData",
CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
internal static extern unsafe void InternalLoadImage(string fileName, Image.ImageInfo* output, ImageLoader loader);
[DllImport(SSC_libname, EntryPoint = "unloadImageData",
CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
internal static extern unsafe void InternalUnloadImage(Image.ImageInfo* output);
#endregion
}
@@ -53,7 +52,6 @@ namespace StgSharp.Graphics
#region glapi
internal unsafe delegate*<uint, GLfixed, void> glAccumxOES;
internal unsafe delegate*<uint, ulong, uint, bool> glAcquireKeyedMutexWin32EXT;
internal unsafe delegate*<uint, void> glActiveProgramEXT;
+23 -13
View File
@@ -1,9 +1,12 @@
using StgSharp.Geometries;
using StgSharp.Graphics;
using System;
using System.Collections.Generic;
using System.IO;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using Windows.Win32;
using Windows.Win32.Foundation;
namespace StgSharp
{
@@ -16,7 +19,20 @@ namespace StgSharp
InfoWarning,
}
internal class LibHandle : SafeHandle
{
public LibHandle(IntPtr invalidHandleValue, bool ownsHandle) : base(invalidHandleValue, ownsHandle)
{
}
public override bool IsInvalid => throw new NotImplementedException();
protected override bool ReleaseHandle()
{
return PInvoke.FreeLibrary(new HMODULE(handle));
}
}
internal static unsafe partial class InternalIO
{
@@ -42,11 +58,16 @@ namespace StgSharp
GLtype.Add(TypeCode.Byte, GLconst.UNSIGNED_BYTE);
}
internal static T InternalLoadProc<T>(IntPtr libPtr, string name) where T : Delegate
internal static T InternalLoadProc<T>(LibHandle lib, string name) where T : Delegate
{
try
{
IntPtr procPtr = InternalGetWINproc(libPtr, name);
IntPtr procPtr =
#if Windows
PInvoke.GetProcAddress(lib, name);
#elif Linux
#endif
T ret = Marshal.GetDelegateForFunctionPointer<T>(procPtr);
return ret;
}
@@ -70,17 +91,6 @@ namespace StgSharp
}
}
[DllImport("kernal32.dll", EntryPoint = "FreeLibrary",
CharSet = CharSet.Ansi)]
internal extern static IntPtr InternalFreeWINlib(IntPtr libPtr);
[DllImport("kernel32.dll", EntryPoint = "GetPeocAddress",
CharSet = CharSet.Ansi)]
internal extern static IntPtr InternalGetWINproc(IntPtr libPtr, string procName);
[DllImport("kernel32.dll", EntryPoint = "LoadLibrary",
CharSet = CharSet.Ansi)]
internal extern static IntPtr InternalLoadWINlib(string name);
internal static void InternalWriteLog(string beforeTime, string logLine, LogType logType)
{
+53 -3
View File
@@ -1,13 +1,26 @@
using StgSharp.Graphics;
using StgSharp.Envitronment;
using StgSharp.Envitronment.Win32;
using StgSharp.Graphics;
using StgSharp.Math;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
using Windows.Win32.UI.WindowsAndMessaging;
#if Windows
using Windows.Win32;
using Windows.Win32.Foundation;
using Windows.Win32.Graphics.OpenGL;
using Windows.Win32.Graphics.Gdi;
using Windows.Win32.UI;
#endif
namespace StgSharp
{
internal enum GraphicAPI : byte
@@ -17,10 +30,21 @@ namespace StgSharp
VK
}
public static class Platform
public static partial class Platform
{
internal static GraphicAPI API;
internal static GraphicAPI API = default;
private static uint markCount = 0;
public static void Mark(bool needConsole)
{
markCount++;
if (needConsole)
{
Console.WriteLine(markCount);
}
}
/// <summary>
/// Version of current StgSharp platform.
@@ -37,6 +61,11 @@ namespace StgSharp
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void InitGL(int majorVersion, int minorVersion)
{
if (API != default)
{
return;
}
InternalIO.InternalInitGL(majorVersion, minorVersion);
}
@@ -86,5 +115,26 @@ namespace StgSharp
}
}
public static void Track(
object target,
string message,
[CallerFilePath] string filePath = "",
[CallerMemberName] string callerName = "",
[CallerLineNumber] int lineNumber = 0
)
{
string log = $"Tracked object: {nameof(target)}\n";
Type t = target.GetType();
FieldInfo[] fieldInfo = t.GetFields(BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Instance);
log += "|\tFieldName\t|\tFieldType\t|\tFieldValue\t|\n";
foreach (FieldInfo field in fieldInfo)
{
log += $"|{field.Name}\t\t|{field.FieldType}\t\t|{field.GetValue(target)}\t\t|\n";
}
log += $"Tracking at:\n{filePath}\t{callerName}\tline {lineNumber}\n";
log += $"Additional information:\n{message}\n";
InternalIO.InternalWriteLog(log, LogType.Info);
}
}
}
+199
View File
@@ -0,0 +1,199 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Runtime.CompilerServices;
using Windows.Win32.Foundation;
using System.Runtime.InteropServices;
using System.Reflection;
using StgSharpDebug.Environment;
using StgSharp.Math;
#if Windows
#pragma warning disable CA1416 // 验证平台兼容性
using Microsoft.Win32.SafeHandles;
using StgSharp.Envitronment.Win32;
using Windows.Win32;
using Windows.Win32.Graphics.OpenGL;
using Windows.Win32.Graphics.Gdi;
using Windows.Win32.UI.WindowsAndMessaging;
namespace StgSharp
{
public unsafe static partial class Platform
{
internal static unsafe void CreatDummyContext()
{
string winclass_name = "Dummy_WGL_context";
WNDCLASSW window_class = new WNDCLASSW()
{
style = WNDCLASS_STYLES.CS_HREDRAW | WNDCLASS_STYLES.CS_VREDRAW | WNDCLASS_STYLES.CS_OWNDC,
lpfnWndProc = PInvoke.DefWindowProc,
hInstance = new HINSTANCE(PInvoke.GetModuleHandle("").DangerousGetHandle()),
lpszClassName = new PCWSTR((char*)Marshal.StringToHGlobalUni(winclass_name))
};
if (PInvoke.RegisterClass(window_class) != 0)
{
throw new Exception("Failed in registing OpenGL window.");
}
HWND h = PInvoke.CreateWindowEx(
Windows.Win32.UI.WindowsAndMessaging.WINDOW_EX_STYLE.WS_EX_LTRREADING,
winclass_name,
"Dummy OpenGL window",
Windows.Win32.UI.WindowsAndMessaging.WINDOW_STYLE.WS_OVERLAPPED,
0,
0,
0,
0,
default,
default,
new LibHandle(window_class.hInstance.Value, false),
default
);
if (h == default)
{
throw new Exception("Failed in registing OpenGL window.");
}
HDC hdc = PInvoke.GetDC(h);
PIXELFORMATDESCRIPTOR pfd = new PIXELFORMATDESCRIPTOR();
pfd.nSize = (ushort)Marshal.SizeOf(pfd);
pfd.nVersion = 1;
pfd.dwFlags = PFD_FLAGS.PFD_DRAW_TO_WINDOW | PFD_FLAGS.PFD_SUPPORT_OPENGL
| PFD_FLAGS.PFD_DOUBLEBUFFER;
pfd.iPixelType = PFD_PIXEL_TYPE.PFD_TYPE_RGBA;
pfd.cColorBits = 32;
pfd.cDepthBits = 24;
pfd.cStencilBits = 8;
pfd.iLayerType = PFD_LAYER_TYPE.PFD_MAIN_PLANE;
int pixelFormat = PInvoke.ChoosePixelFormat(hdc, &pfd);
if (pixelFormat == 0)
{
throw new Exception("Failed in registing OpenGL window.");
}
if (PInvoke.SetPixelFormat(hdc, pixelFormat, &pfd))
{
throw new Exception("Failed in registing OpenGL window.");
}
HGLRC hglrc = PInvoke.wglCreateContext(hdc);
PInvoke.wglMakeCurrent(hdc, hglrc);
wglEx.LoadWGLex();
PInvoke.wglMakeCurrent(hdc, HGLRC.Null);
PInvoke.wglDeleteContext(hglrc);
PInvoke.ReleaseDC(h, hdc);
PInvoke.DestroyWindow(h);
}
internal static unsafe HGLRC InitGL(HDC realHDC)
{
CreatDummyContext();
int[] pixelFormatAttribute = new int[] {
WGLconst.DRAW_TO_WINDOW_ARB, 1,
WGLconst.SUPPORT_OPENGL_ARB, 1,
WGLconst.DOUBLE_BUFFER_ARB, 1,
WGLconst.ACCELERATION_ARB, WGLconst.FULL_ACCELERATION_ARB,
WGLconst.PIXEL_TYPE_ARB, WGLconst.TYPE_RGBA_ARB,
WGLconst.COLOR_BITS_ARB, 32,
WGLconst.DEPTH_BITS_ARB, 24,
WGLconst.STENCIL_BITS_ARB,8
};
int piFormat;
uint length;
wglEx.glChoosePixelFormatARB(new DeviceContextHandle(realHDC), pixelFormatAttribute, out piFormat, out length);
if (length == 0)
{
throw new Exception("Failed in creating OpenGL core profile.");
}
PIXELFORMATDESCRIPTOR pfd = default;
PInvoke.DescribePixelFormat(realHDC, piFormat, (uint)Marshal.SizeOf(pfd), &pfd);
if (PInvoke.SetPixelFormat(realHDC, piFormat, in pfd))
{
throw new Exception("Failed in creating OpenGL core profile.");
}
int[] glVersionAttribute = new int[] {
WGLconst.CONTEXT_MAJOR_VERSION_ARB,4,
WGLconst.CONTEXT_MINOR_VERSION_ARB,6,
WGLconst.CONTEXT_PROFILE_MASK_ARB, WGLconst.CONTEXT_CORE_PROFILE_BIT_ARB
};
HGLRC coreGL = new(wglEx.wglCreateContextAttribsARB(
new DeviceContextHandle(realHDC), GlRenderContextHandle.Null, glVersionAttribute).Value);
if (coreGL.Value == IntPtr.Zero)
{
throw new Exception("Failed in creating OpenGL core profile.");
}
return coreGL;
}
internal static unsafe LRESULT window_callback(
HWND window, uint msg, WPARAM wparam, LPARAM lparam)
{
LRESULT ret = new LRESULT(0);
switch (msg)
{
case 0x0010: break;
case 0x0002:
PInvoke.PostQuitMessage(0);
break;
default:
ret = PInvoke.DefWindowProc(window, msg, wparam, lparam);
break;
}
return ret;
}
internal static unsafe IntPtr CreateForm(HINSTANCE inst)
{
string formName = "Hello Stg#!";
WNDCLASSW window_class = new WNDCLASSW()
{
style = WNDCLASS_STYLES.CS_VREDRAW | WNDCLASS_STYLES.CS_HREDRAW | WNDCLASS_STYLES.CS_OWNDC,
lpfnWndProc = window_callback,
hInstance = inst,
hCursor = new HCURSOR(PInvoke.LoadCursor(default, "IDC_ARROW").DangerousGetHandle()),
hbrBackground = HBRUSH.Null,
lpszClassName = new PCWSTR((char*)Marshal.StringToHGlobalUni(formName))
};
if (PInvoke.RegisterClass(in window_class) == 0)
{
throw new Exception("Failed to create window instace.");
}
RECT rect = default;
rect.right = 1024;
rect.bottom = 576;
uint window_style = WGLconst.WS_OVERLAPPEDWINDOW;
PInvoke.AdjustWindowRect(ref rect, (WINDOW_STYLE)window_style, false);
}
}
}
#pragma warning restore CA1416 // 验证平台兼容性
#endif
@@ -0,0 +1,279 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Runtime.InteropServices;
#if Windows
using Microsoft.Win32.SafeHandles;
using Windows.Win32;
using Windows.Win32.Graphics.OpenGL;
using Windows.Win32.Graphics.Gdi;
namespace StgSharp.Envitronment.Win32
{
public readonly partial struct DeviceContextHandle
: IEquatable<DeviceContextHandle>
{
internal readonly IntPtr Value;
internal DeviceContextHandle(nint value) => this.Value = value;
public static explicit operator DeviceContextHandle(IntPtr value) => new DeviceContextHandle(value);
public static implicit operator IntPtr(DeviceContextHandle value) => value.Value;
public static bool operator !=(DeviceContextHandle left, DeviceContextHandle right) => !(left == right);
public static bool operator ==(DeviceContextHandle left, DeviceContextHandle right) => left.Value == right.Value;
public bool Equals(DeviceContextHandle other) => this.Value == other.Value;
public override bool Equals(object obj) => obj is DeviceContextHandle other && this.Equals(other);
public override int GetHashCode() => this.Value.GetHashCode();
public override string ToString() => $"0x{this.Value:x}";
}
public readonly partial struct GlRenderContextHandle
: IEquatable<GlRenderContextHandle>
{
internal readonly IntPtr Value;
internal GlRenderContextHandle(IntPtr value) => this.Value = value;
internal static GlRenderContextHandle Null => default;
internal bool IsNull => Value == default;
public static explicit operator GlRenderContextHandle(IntPtr value) => new GlRenderContextHandle(value);
public static implicit operator IntPtr(GlRenderContextHandle value) => value.Value;
public static bool operator !=(GlRenderContextHandle left, GlRenderContextHandle right) => !(left == right);
public static bool operator ==(GlRenderContextHandle left, GlRenderContextHandle right) => left.Value == right.Value;
public bool Equals(GlRenderContextHandle other) => this.Value == other.Value;
public override bool Equals(object obj) => obj is GlRenderContextHandle other && this.Equals(other);
public override int GetHashCode() => this.Value.GetHashCode();
public override string ToString() => $"0x{this.Value:x}";
}
public struct WGLconst
{
#region Attribute
public const int ACCELERATION_ARB = 0x2003;
public const int ACCUM_ALPHA_BITS_ARB = 0x2021;
public const int ACCUM_BITS_ARB = 0x201D;
public const int ACCUM_BLUE_BITS_ARB = 0x2020;
public const int ACCUM_GREEN_BITS_ARB = 0x201F;
public const int ACCUM_RED_BITS_ARB = 0x201E;
public const int ALPHA_BITS_ARB = 0x201B;
public const int ALPHA_SHIFT_ARB = 0x201C;
public const int AUX_BUFFERS_ARB = 0x2024;
public const int BLUE_BITS_ARB = 0x2019;
public const int BLUE_SHIFT_ARB = 0x201A;
public const int COLOR_BITS_ARB = 0x2014;
public const int DEPTH_BITS_ARB = 0x2022;
public const int DOUBLE_BUFFER_ARB = 0x2011;
public const int DRAW_TO_BITMAP_ARB = 0x2002;
public const int DRAW_TO_WINDOW_ARB = 0x2001;
public const int FULL_ACCELERATION_ARB = 0x2027;
public const int GENERIC_ACCELERATION_ARB = 0x2026;
public const int GREEN_BITS_ARB = 0x2017;
public const int GREEN_SHIFT_ARB = 0x2018;
public const int NEED_PALETTE_ARB = 0x2004;
public const int NEED_SYSTEM_PALETTE_ARB = 0x2005;
public const int NO_ACCELERATION_ARB = 0x2025;
public const int NUMBER_OVERLAYS_ARB = 0x2008;
public const int NUMBER_PIXEL_FORMATS_ARB = 0x2000;
public const int NUMBER_UNDERLAYS_ARB = 0x2009;
public const int PIXEL_TYPE_ARB = 0x2013;
public const int RED_BITS_ARB = 0x2015;
public const int RED_SHIFT_ARB = 0x2016;
public const int SHARE_ACCUM_ARB = 0x200E;
public const int SHARE_DEPTH_ARB = 0x200C;
public const int SHARE_STENCIL_ARB = 0x200D;
public const int STENCIL_BITS_ARB = 0x2023;
public const int STEREO_ARB = 0x2012;
public const int SUPPORT_GDI_ARB = 0x200F;
public const int SUPPORT_OPENGL_ARB = 0x2010;
public const int SWAP_COPY_ARB = 0x2029;
public const int SWAP_EXCHANGE_ARB = 0x2028;
public const int SWAP_LAYER_BUFFERS_ARB = 0x2006;
public const int SWAP_METHOD_ARB = 0x2007;
public const int SWAP_UNDEFINED_ARB = 0x202A;
public const int TRANSPARENT_ALPHA_VALUE_ARB = 0x203A;
public const int TRANSPARENT_ARB = 0x200A;
public const int TRANSPARENT_BLUE_VALUE_ARB = 0x2039;
public const int TRANSPARENT_GREEN_VALUE_ARB = 0x2038;
public const int TRANSPARENT_INDEX_VALUE_ARB = 0x203B;
public const int TRANSPARENT_RED_VALUE_ARB = 0x2037;
public const int TYPE_COLORINDEX_ARB = 0x202C;
public const int TYPE_RGBA_ARB = 0x202B;
#endregion
#region context
public const int CONTEXT_MAJOR_VERSION_ARB = 0x2091;
public const int CONTEXT_MINOR_VERSION_ARB = 0x2092;
public const int CONTEXT_LAYER_PLANE_ARB = 0x2093;
public const int CONTEXT_FLAGS_ARB = 0x2094;
public const int CONTEXT_PROFILE_MASK_ARB = 0x9126;
public const int CONTEXT_DEBUG_BIT_ARB = 0x0001;
public const int CONTEXT_FORWARD_COMPATIBLE_BIT_ARB = 0x0002;
public const int CONTEXT_CORE_PROFILE_BIT_ARB = 0x00000001;
public const int CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB = 0x00000002;
public const int ERROR_INVALID_VERSION_ARB = 0x2095;
public const int ERROR_INVALID_PROFILE_ARB = 0x2096;
#endregion
#region
public const uint WS_OVERLAPPED = 0x00000000;
public const uint WS_POPUP = 0x80000000;
public const uint WS_CHILD = 0x40000000;
public const uint WS_MINIMIZE = 0x20000000;
public const uint WS_VISIBLE = 0x10000000;
public const uint WS_DISABLED = 0x08000000;
public const uint WS_CLIPSIBLINGS = 0x04000000;
public const uint WS_CLIPCHILDREN = 0x02000000;
public const uint WS_MAXIMIZE = 0x01000000;
public const uint WS_CAPTION = 0x00C00000; /* WS_BORDER | WS_DLGFRAME */
public const uint WS_BORDER = 0x00800000;
public const uint WS_DLGFRAME = 0x00400000;
public const uint WS_VSCROLL = 0x00200000;
public const uint WS_HSCROLL = 0x00100000;
public const uint WS_SYSMENU = 0x00080000;
public const uint WS_THICKFRAME = 0x00040000;
public const uint WS_GROUP = 0x00020000;
public const uint WS_TABSTOP = 0x00010000;
public const uint WS_MINIMIZEBOX = 0x00020000;
public const uint WS_MAXIMIZEBOX = 0x00010000;
public const uint WS_OVERLAPPEDWINDOW = WS_OVERLAPPED |
WS_CAPTION |
WS_SYSMENU |
WS_THICKFRAME |
WS_MINIMIZEBOX |
WS_MAXIMIZEBOX;
#endregion
}
public readonly partial struct WindowHandle
: IEquatable<WindowHandle>
{
internal readonly IntPtr Value;
internal WindowHandle(IntPtr value) => this.Value = value;
internal static WindowHandle Null => default;
internal bool IsNull => Value == default;
public static explicit operator WindowHandle(IntPtr value) => new WindowHandle(value);
public static implicit operator IntPtr(WindowHandle value) => value.Value;
public static bool operator !=(WindowHandle left, WindowHandle right) => !(left == right);
public static bool operator ==(WindowHandle left, WindowHandle right) => left.Value == right.Value;
public bool Equals(WindowHandle other) => this.Value == other.Value;
public override bool Equals(object obj) => obj is WindowHandle other && this.Equals(other);
public override int GetHashCode() => this.Value.GetHashCode();
public override string ToString() => $"0x{this.Value:x}";
//public static implicit operator HANDLE(WindowHandle value) => new HANDLE(value.Value);
}
[StructLayout(LayoutKind.Sequential)]
public class PixelFormatDescriptor
{
// 定义类的成员变量,使用与 C/C++ 中相同的数据类型
public ushort nSize;
public ushort nVersion;
public uint dwFlags;
[MarshalAs(UnmanagedType.U1)]
public byte iPixelType;
[MarshalAs(UnmanagedType.U1)]
public byte cColorBits;
[MarshalAs(UnmanagedType.U1)]
public byte cRedBits;
[MarshalAs(UnmanagedType.U1)]
public byte cRedShift;
[MarshalAs(UnmanagedType.U1)]
public byte cGreenBits;
[MarshalAs(UnmanagedType.U1)]
public byte cGreenShift;
[MarshalAs(UnmanagedType.U1)]
public byte cBlueBits;
[MarshalAs(UnmanagedType.U1)]
public byte cBlueShift;
[MarshalAs(UnmanagedType.U1)]
public byte cAlphaBits;
[MarshalAs(UnmanagedType.U1)]
public byte cAlphaShift;
[MarshalAs(UnmanagedType.U1)]
public byte cAccumBits;
[MarshalAs(UnmanagedType.U1)]
public byte cAccumRedBits;
[MarshalAs(UnmanagedType.U1)]
public byte cAccumGreenBits;
[MarshalAs(UnmanagedType.U1)]
public byte cAccumBlueBits;
[MarshalAs(UnmanagedType.U1)]
public byte cAccumAlphaBits;
[MarshalAs(UnmanagedType.U1)]
public byte cDepthBits;
[MarshalAs(UnmanagedType.U1)]
public byte cStencilBits;
[MarshalAs(UnmanagedType.U1)]
public byte cAuxBuffers;
[MarshalAs(UnmanagedType.U1)]
public byte iLayerType;
[MarshalAs(UnmanagedType.U1)]
public byte bReserved;
public uint dwLayerMask;
public uint dwVisibleMask;
public uint dwDamageMask;
// 定义一个构造函数,用于设置类的成员变量的默认值
public PixelFormatDescriptor()
{
nSize = (ushort)Marshal.SizeOf(this); // 设置 nSize 为类的大小
nVersion = 1; // 设置 nVersion 为 1
dwFlags = 0; // 设置 dwFlags 为 0
iPixelType = 0; // 设置 iPixelType 为 0
cColorBits = 0; // 设置 cColorBits 为 0
cRedBits = 0; // 设置 cRedBits 为 0
cRedShift = 0; // 设置 cRedShift 为 0
cGreenBits = 0; // 设置 cGreenBits 为 0
cGreenShift = 0; // 设置 cGreenShift 为 0
cBlueBits = 0; // 设置 cBlueBits 为 0
cBlueShift = 0; // 设置 cBlueShift 为 0
cAlphaBits = 0; // 设置 cAlphaBits 为 0
cAlphaShift = 0; // 设置 cAlphaShift 为 0
cAccumBits = 0; // 设置 cAccumBits 为 0
cAccumRedBits = 0; // 设置 cAccumRedBits 为 0
cAccumGreenBits = 0; // 设置 cAccumGreenBits 为 0
cAccumBlueBits = 0; // 设置 cAccumBlueBits 为 0
cAccumAlphaBits = 0; // 设置 cAccumAlphaBits 为 0
cDepthBits = 0; // 设置 cDepthBits 为 0
cStencilBits = 0; // 设置 cStencilBits 为 0
cAuxBuffers = 0; // 设置 cAuxBuffers 为 0
iLayerType = 0; // 设置 iLayerType 为 0
bReserved = 0; // 设置 bReserved 为 0
dwLayerMask = 0; // 设置 dwLayerMask 为 0
dwVisibleMask = 0; // 设置 dwVisibleMask 为 0
dwDamageMask = 0; // 设置 dwDamageMask 为 0
}
}
}
#endif
@@ -0,0 +1,31 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Runtime.CompilerServices;
using Windows.Win32.Foundation;
#if Windows
using Microsoft.Win32.SafeHandles;
using Windows.Win32;
using Windows.Win32.Graphics.OpenGL;
using Windows.Win32.Graphics.Gdi;
namespace StgSharp.Envitronment.Win32
{
public class WGL
{
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static GlRenderContextHandle CreateContext(DeviceContextHandle param0)
{
return new(PInvoke.wglCreateContext(new HDC(param0.Value)).Value);
}
}
}
#endif
@@ -0,0 +1,78 @@
using StgSharp.Envitronment.Win32;
using StgSharp.Graphics;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Http.Headers;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
#if Windows
#pragma warning disable CA1416
using Windows.Win32.Graphics.Gdi;
using Windows.Win32.Graphics.OpenGL;
namespace StgSharpDebug.Environment
{
public static unsafe class wglEx
{
private static delegate* unmanaged[Stdcall]<HDC, int*, float*, uint, int*, uint*, bool> wglChoosePixelFormatARBpointer;
private static delegate* unmanaged[Stdcall]<HDC, HGLRC, int*, HGLRC> wglCreateContextAttribsARBpointer;
public static unsafe bool glChoosePixelFormatARB(
DeviceContextHandle hdc,
int[] pixelIntAttributeList,
out int piFormats,
out uint piFormatCount)
{
if ((ulong)wglChoosePixelFormatARBpointer < 10)
{
piFormats = 0;
piFormatCount = 0;
return false;
}
pixelIntAttributeList = pixelIntAttributeList.Concat([0]).ToArray();
int pf;
uint nf;
fixed (int* pial = pixelIntAttributeList)
{
bool ret = wglChoosePixelFormatARBpointer(new HDC(hdc.Value), pial, (float*)0, 1, &pf, &nf);
piFormats = pf;
piFormatCount = nf;
return ret;
}
}
public static unsafe GlRenderContextHandle wglCreateContextAttribsARB(
DeviceContextHandle hdc,
GlRenderContextHandle hglrc,
int[] pixelFormat)
{
if ((ulong)wglCreateContextAttribsARBpointer < 10)
{
return default;
}
HGLRC h, h_share = new HGLRC(hglrc.Value);
HDC h_dc = new HDC(hdc.Value);
fixed (int* format = pixelFormat)
{
h = wglCreateContextAttribsARBpointer(h_dc, h_share, format);
return new GlRenderContextHandle(h);
}
}
internal static void LoadWGLex()
{
wglChoosePixelFormatARBpointer = (delegate* unmanaged[Stdcall]<HDC, int*, float*, uint, int*, uint*, bool>)glManager.LoadGLfunc("wglChoosePixelFormatARB");
wglCreateContextAttribsARBpointer = (delegate* unmanaged[Stdcall]<HDC, HGLRC, int*, HGLRC>)glManager.LoadGLfunc("wglCreateContextAttribsARB");
}
}
}
#pragma warning restore CA1416 // 验证平台兼容性
#endif
@@ -5,8 +5,6 @@ namespace StgSharp.Geometries
{
public class Rectangle : Parallelogram
{
internal Point center;
public Rectangle(
float v0x, float v0y, float v0z,
float v1x, float v1y, float v1z,
+3 -4
View File
@@ -11,7 +11,6 @@ using System.Linq;
using System.Numerics;
using System.Reflection;
using System.Reflection.Emit;
using System.Reflection.Metadata;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Security.Principal;
@@ -38,7 +37,7 @@ namespace StgSharp.Graphics
internal int width;
internal IntPtr windowID;
private bool closed;
private IglFunc gl;
internal IglFunc gl;
#endregion
#region form thread setting
@@ -180,7 +179,7 @@ namespace StgSharp.Graphics
windowID = windowPtr;
}
}
InternalIO.InternalSetCurrentGLContext(windowID, contextID);
gl.SwitchContext();
}
/// <summary>
@@ -267,7 +266,7 @@ namespace StgSharp.Graphics
else
{
M128 m = default;
m.IntPtr0 = windowID;
m.UInt64[0] = (ulong)windowID;
GLonUpdate glu = gl as GLonUpdate;
glu.frameworkHandleEnqueue(
(IntPtr)(delegate*<void>)&InternalSwapBuffer, m);
@@ -9,7 +9,7 @@ namespace StgSharp.Graphics
/// <summary>
/// Interface of all kinds OpenGL buffer onjects
/// </summary>
public abstract class IBufferObject : IDisposable
public abstract class BufferObjectBase : IDisposable
{
protected glHandleSet _bufferHandle;
protected IglFunc GL;
@@ -30,9 +30,15 @@ namespace StgSharp.Graphics
/// <param name="index">Index of handle of the object in this instance to be bind</param>
public abstract void Bind(int index);
/// <inheritdoc/>
public override string ToString()
{
return $"This is a {GetType().FullName}, containing {_bufferHandle.length} buffer handles: {_bufferHandle.ToString()}.";
}
protected abstract void Dispose(bool disposing);
~IBufferObject()
~BufferObjectBase()
{
Dispose(disposing: false);
}
+1 -5
View File
@@ -14,7 +14,7 @@ namespace StgSharp.Graphics
/// Each <see langword="int"/> value indexed from instance of this class this
/// is the only handle to one Element Buffer Object.
/// </summary>
public unsafe class ElementBuffer : IBufferObject
public unsafe class ElementBuffer : BufferObjectBase
{
internal ElementBuffer(int n, IglFunc gl)
{
@@ -22,10 +22,6 @@ namespace StgSharp.Graphics
_bufferHandle = GL.GenBuffers(n);
}
public glHandle this[int n]
{
get { return _bufferHandle[n]; }
}
public override void Bind(int index)
{
+1 -1
View File
@@ -6,7 +6,7 @@ using System.Text;
namespace StgSharp.Graphics
{
public unsafe class VertexArray : IBufferObject
public unsafe class VertexArray : BufferObjectBase
{
internal VertexArray(int n, IglFunc gl)
{
+3 -1
View File
@@ -10,7 +10,7 @@ using System.Text;
namespace StgSharp.Graphics
{
public unsafe class VertexBuffer : IBufferObject
public unsafe class VertexBuffer : BufferObjectBase
{
internal VertexBuffer(int n, IglFunc glFunc)
{
@@ -58,6 +58,8 @@ namespace StgSharp.Graphics
{
GL.BindBuffer(BufferType.ARRAY_BUFFER, glHandle.Zero);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
internal void ChangeEnvironment(IglFunc gl)
{
GL = gl;
@@ -41,12 +41,12 @@ namespace StgSharp.Graphics
/// <param name="loader"> </param>
public unsafe void LoadTexture(int index, string name, ImageLoader loader)
{
sourceList[index] = new Image();
fixed (Image.ImageInfo* textureInfo = &sourceList[index].info)
{
InternalIO.InternalLoadImage(name, textureInfo, loader);
}
Image.ImageInfo info = default;
InternalIO.InternalLoadImage(name, &info, loader);
Console.WriteLine(info);
sourceList[index] = new Image(info);
InternalIO.InternalUnloadImage(&info);
Console.WriteLine(sourceList[index]);
if (sourceList[index].info.pixelPtr != IntPtr.Zero)
{
uint channel;
+8 -2
View File
@@ -21,6 +21,11 @@ namespace StgSharp.Graphics
api = context;
}
GLcontext* IglFunc.Context
{
get => api;
}
void IglFunc.SwitchContext()
{
@@ -104,11 +109,11 @@ namespace StgSharp.Graphics
byte[] data = Encoding.UTF8.GetBytes(shaderCodeArray[i] + '\0');
fixed (byte* codePtr = data)
{
shaderID = InternalIO.InternalLoadShaderCode(codePtr, (int)shaderType);
shaderID = InternalIO.InternalLoadShaderCode(api, codePtr, (int)shaderType);
}
if (shaderID == 0) //compile error handler
{
IntPtr logPtr = InternalIO.InternalReadLog();
IntPtr logPtr = InternalIO.InternalReadSSCLog();
string log;
try
{
@@ -326,6 +331,7 @@ namespace StgSharp.Graphics
[MethodImpl(MethodImplOptions.AggressiveInlining)]
void IglFunc.TextureImage2d<T>(int target, int level, uint internalformat, uint width, uint height, uint format, uint type, T[] pixels)
{
Console.WriteLine(pixels);
IntPtr source = GCHandle.Alloc(pixels, GCHandleType.Pinned).AddrOfPinnedObject();
api->glTexImage2D(
(uint)target, level, internalformat, width, height, 0, format, type, (void*)source
@@ -17,6 +17,8 @@ namespace StgSharp.Graphics
FrameTimeoutException refreshSIgnal = new FrameTimeoutException();
FrameTimeoutException signal = new FrameTimeoutException("This frame is timeout");
unsafe GLcontext* IglFunc.Context => throw signal;
private GLonTimeout() { }
void IglFunc.ActiveTexture(uint type) => throw signal;
+21 -11
View File
@@ -20,8 +20,15 @@ namespace StgSharp.Graphics
private static GLparamQueue paramQueue;
private FrameTimeoutException refreshSignal = new();
private GLcontext* api;
private IntPtr SwapBufferPtr = (IntPtr)(delegate*<IntPtr, void>)&InternalIO.glfwSwapBuffers;
GLcontext* IglFunc.Context
{
get => api;
}
internal GLonUpdate(GLcontext* context)
{
if (paramQueue == null)
@@ -29,6 +36,7 @@ namespace StgSharp.Graphics
paramQueue = new GLparamQueue();
}
glActionQueue = new ConcurrentQueue<IntPtr>();
api = context;
}
internal static GLparamQueue ParamQueue
@@ -78,7 +86,7 @@ namespace StgSharp.Graphics
{
M128 m = default;
m.UInt32[0] = (uint)bufferType;
m.IntPtr1 = handle.Handle;
m.UInt64[1] = (ulong)handle.Handle;
paramQueue.Enqueue(m);
glActionQueue.Enqueue(BindBufferPtr);
}
@@ -86,7 +94,8 @@ namespace StgSharp.Graphics
[MethodImpl(MethodImplOptions.AggressiveInlining)]
void IglFunc.BindTexture(uint type, glHandle texture)
{
M128 m = new M128 { IntPtr1 = (IntPtr)texture.valuePtr };
M128 m = default;
m.UInt64[1] = (ulong)texture.valuePtr;
m.UInt32[0] = (uint)type;
paramQueue.Enqueue(m);
glActionQueue.Enqueue(BindTexturePtr);
@@ -150,7 +159,7 @@ namespace StgSharp.Graphics
{
M128 m = default;
glHandleSet h = new glHandleSet(count);
m.IntPtr0 = (IntPtr)h.handle;
m.UInt64[0] = (ulong)h.handle;
m.Int32[2] = count;
paramQueue.Enqueue(m);
glActionQueue.Enqueue(CreateProgramSetPtr);
@@ -194,7 +203,8 @@ namespace StgSharp.Graphics
[MethodImpl(MethodImplOptions.AggressiveInlining)]
unsafe void IglFunc.DeleteBuffer(glHandle handle)
{
M128 m = new M128() { IntPtr0 = handle.Handle };
M128 m = default;
m.UInt64[0] = (ulong)handle.Handle;
m.UInt32[2] = 1;
paramQueue.Enqueue(m);
glActionQueue.Enqueue(DeleBufferPtr);
@@ -204,14 +214,14 @@ namespace StgSharp.Graphics
{
M128 m = default;
m.UInt32[2] = (uint)handle.length;
m.IntPtr0 = (IntPtr)handle.handle;
m.UInt64[0] = (ulong)handle.handle;
paramQueue.Enqueue(m);
glActionQueue.Enqueue(DeleBufferPtr);
}
unsafe void IglFunc.DeleteVertexArrays(glHandleSet arrays)
{
M128 m = new() { IntPtr1 = (IntPtr)arrays.handle };
M128 m = default; m.UInt64[1] = (ulong)arrays.handle;
m.Int32[0] = arrays.length;
paramQueue.Enqueue(m);
glActionQueue.Enqueue(DeleteVertexArrayPtr);
@@ -246,7 +256,7 @@ namespace StgSharp.Graphics
unsafe glHandleSet IglFunc.GenBuffers(int count)
{
glHandleSet h = new glHandleSet(count);
M128 m = default; m.UInt32[2] = (uint)count; m.IntPtr0 = (IntPtr)h.handle;
M128 m = default; m.UInt32[2] = (uint)count; m.UInt64[0] = (ulong)h.handle;
paramQueue.Enqueue(m);
glActionQueue.Enqueue(GenBufferPtr);
return h;
@@ -255,7 +265,7 @@ namespace StgSharp.Graphics
unsafe glHandleSet IglFunc.GenTextures(int count)
{
glHandleSet h = new glHandleSet(count);
M128 m = default; m.UInt32[2] = (uint)count; m.IntPtr0 = (IntPtr)h.handle;
M128 m = default; m.UInt32[2] = (uint)count; m.UInt64[0] = (ulong)h.handle;
paramQueue.Enqueue(m);
glActionQueue.Enqueue(GenTexturesPtr);
return h;
@@ -264,7 +274,7 @@ namespace StgSharp.Graphics
unsafe glHandleSet IglFunc.GenVertexArrays(int count)
{
glHandleSet h = new glHandleSet(count);
M128 m = default; m.UInt32[2] = (uint)count; m.IntPtr0 = (IntPtr)h.handle;
M128 m = default; m.UInt32[2] = (uint)count; m.UInt64[0] = (ulong)h.handle;
paramQueue.Enqueue(m);
glActionQueue.Enqueue(GenTexturesPtr);
return h;
@@ -275,8 +285,8 @@ namespace StgSharp.Graphics
{
glSHandle h = glSHandle.Alloc(0);
M128 m;
m.IntPtr0 = program.Handle;
m.IntPtr1 = GCHandle.Alloc(Encoding.UTF8.GetBytes(ptr)).AddrOfPinnedObject();
m.UInt64[0] = (ulong)program.Handle;
m.UInt64[1] = (ulong)GCHandle.Alloc(Encoding.UTF8.GetBytes(ptr)).AddrOfPinnedObject();
paramQueue.Enqueue(m);
paramQueue.Enqueue((IntPtr)h.valuePtr);
glActionQueue.Enqueue(GetUniformLocationPtr);
@@ -57,14 +57,14 @@ namespace StgSharp.Graphics
{
M128 m = default;
paramQueue.TryDequeue(out m);
paramQueue.context->glBindBuffer(m.UInt32[0], *(uint*)m.IntPtr1);
paramQueue.context->glBindBuffer(m.UInt32[0], *(uint*)m.UInt64[1]);
}
private static void InternalBindTexture()
{
M128 m = default;
paramQueue.TryDequeue(out m);
paramQueue.context->glBindTexture(m.UInt32[0], *(uint*)m.IntPtr1);
paramQueue.context->glBindTexture(m.UInt32[0], *(uint*)m.UInt64[1]);
}
private static void InternalBindVertexArray()
@@ -101,10 +101,10 @@ namespace StgSharp.Graphics
for (int i = 0; i < count; i++)
{
paramQueue.TryDequeue(out shaderHandle, out codeHandle);
*(uint*)shaderHandle = InternalIO.InternalLoadShaderCode((byte*)codeHandle, type);
*(uint*)shaderHandle = InternalIO.InternalLoadShaderCode(paramQueue.context, (byte*)codeHandle, type);
if (*(uint*)shaderHandle == 0)
{
IntPtr logPtr = InternalIO.InternalReadLog();
IntPtr logPtr = InternalIO.InternalReadSSCLog();
string log;
try
{
@@ -146,13 +146,13 @@ namespace StgSharp.Graphics
private static void InternalCreateProgramSet()
{
IntPtr programHandle;
uint* programHandle;
M128 m = default;
paramQueue.TryDequeue(out m);
programHandle = m.IntPtr0;
programHandle = (uint*)m.UInt64[0];
for (int i = 0; i < m.Int32[2]; i++)
{
*((uint*)programHandle + i) = paramQueue.context->glCreateProgram();
*(programHandle + i) = paramQueue.context->glCreateProgram();
}
}
@@ -160,14 +160,14 @@ namespace StgSharp.Graphics
{
M128 m = default;
paramQueue.TryDequeue(out m);
paramQueue.context->glDeleteBuffers(m.UInt32[2], (uint*)m.IntPtr0);
paramQueue.context->glDeleteBuffers(m.UInt32[2], (uint*)m.UInt64[0]);
}
private static void InternalDeleteVertexArrays()
{
M128 m = default;
paramQueue.TryDequeue(out m);
paramQueue.context->glDeleteVertexArrays((uint)m.Int32[0], (uint*)m.IntPtr1);
paramQueue.context->glDeleteVertexArrays((uint)m.Int32[0], (uint*)m.UInt64[0]);
}
private static void InternalDrawElements()
@@ -183,21 +183,21 @@ namespace StgSharp.Graphics
{
M128 m = default;
paramQueue.TryDequeue(out m);
paramQueue.context->glGenBuffers(m.UInt32[2], (uint*)m.IntPtr0);
paramQueue.context->glGenBuffers(m.UInt32[2], (uint*)m.UInt64[0]);
}
private static void InternalGenTextures()
{
M128 m = default;
paramQueue.TryDequeue(out m);
paramQueue.context->glGenTextures(m.UInt32[2], (uint*)m.IntPtr0);
paramQueue.context->glGenTextures(m.UInt32[2], (uint*)m.UInt64[0]);
}
private static void InternalGenVertexArrays()
{
M128 m = default;
paramQueue.TryDequeue(out m);
paramQueue.context->glGenVertexArrays(m.UInt32[2], (uint*)m.IntPtr0);
paramQueue.context->glGenVertexArrays(m.UInt32[2], (uint*)m.UInt64[0]);
}
private static void InternalGetUniformLocation()
@@ -41,10 +41,10 @@ namespace StgSharp.Graphics
/// <summary>
/// Compile the vertex shader to be attached to this shader.
/// </summary>
/// <param name="shaderCode">GLSL code of vertex shader.</param>
public unsafe void Compile(ShaderType usage, params string[] code)
/// <param name="code">GLSL code of vertex shader.</param>
public unsafe void Compile(params string[] code)
{
glHandleSet.Copy(GL.CompileShader(usage, code), handle);
glHandleSet.Copy(GL.CompileShader(type, code), handle);
}
//TODO:写链接着色器的文档注释
@@ -59,6 +59,10 @@ namespace StgSharp.Graphics
GL.AttachShader(target.handle, handle[index]);
}
public override string ToString()
{
return $"This is a {type} shader, its shader handles are {handle.ToString()}.";
}
}
public class ShaderProgram
@@ -78,11 +82,11 @@ namespace StgSharp.Graphics
/// <summary>
/// Link the shader to current context.
/// </summary>
public void Link()
public unsafe void Link()
{
if (InternalIO.InternalLinkShaderProgram(handle.Value) == 0)
if (InternalIO.InternalLinkShaderProgram(GL.Context, handle.Value) == 0)
{
IntPtr logPtr = InternalIO.InternalReadLog();
IntPtr logPtr = InternalIO.InternalReadSSCLog();
try
{
byte[] logByte = new byte[512];
@@ -143,6 +147,5 @@ namespace StgSharp.Graphics
{
GL.UseProgram(handle);
}
}
}
@@ -139,69 +139,111 @@ namespace StgSharp.Graphics
internal unsafe partial class GLonUpdate
{
private IntPtr UniformVal1fPtr = (IntPtr)(delegate*<void>)&UniformVal1f;
private IntPtr UniformVal1fvPtr = (IntPtr)(delegate*<void>)&UniformVal1fv;
private IntPtr UniformVal1iPtr = (IntPtr)(delegate*<void>)&UniformVal1i;
private IntPtr UniformVal2fPtr = (IntPtr)(delegate*<void>)&UniformVal2f;
private IntPtr UniformVal3fPtr = (IntPtr)(delegate*<void>)&UniformVal3f;
//TODO xontinue here
private static void UniformVal3f()
{
private IntPtr UniformVal4fPtr = (IntPtr)(delegate*<void>)&UniformVal4f;
paramQueue.
unsafe void IglFunc.SetValue(Uniform<float, float, float> uniform, float f0, float f1, float f2)
{
paramQueue.Enqueue((IntPtr)uniform.id.valuePtr);
paramQueue.Enqueue(f0, f1, f2);
glActionQueue.Enqueue(UniformVal3fPtr);
}
unsafe void IglFunc.SetValue(Uniform<float, float, float> uniform, float v0, float v1, float v2)
unsafe void IglFunc.SetValue(Uniform<float, float> uniform, float f0, float f1)
{
glActionQueue.Enqueue(
() => { api->glUniform3f(uniform.id, v0, v1, v2); }
);
M128 m = default;
m.UInt64[0] = (ulong)uniform.id.valuePtr;
m.Single[2] = f0; m.Single[3] = f1;
paramQueue.Enqueue(m);
glActionQueue.Enqueue(UniformVal2fPtr);
}
unsafe void IglFunc.SetValue(Uniform<float, float> uniform, float v0, float v1)
unsafe void IglFunc.SetValue(Uniform<float, float, float, float> uniform, float f0, float f1, float f2, float f3)
{
glActionQueue.Enqueue(
() => { api->glUniform2f(uniform.id, v0, v1); }
);
}
unsafe void IglFunc.SetValue(Uniform<float, float, float, float> uniform, float v0, float v1, float v2, float v3)
{
glActionQueue.Enqueue(
() => { api->glUniform4f(uniform.id, v0, v1, v2, v3); }
);
paramQueue.Enqueue((IntPtr)uniform.id.valuePtr);
paramQueue.Enqueue(f0, f1, f2, f3);
glActionQueue.Enqueue(UniformVal4fPtr);
}
unsafe void IglFunc.SetValue(Uniform<float, float, float, float> uniform, Vec4d vec)
{
glActionQueue.Enqueue(
() =>
{
Vec4d cache = vec;
api->glUniform1fv(uniform.id, 4, &cache);
}
);
Vec4d m = vec;
paramQueue.Enqueue((IntPtr)uniform.id.valuePtr, (IntPtr)(Vec4d*)&m);
glActionQueue.Enqueue(UniformVal1fvPtr);
}
unsafe void IglFunc.SetValue(Uniform<float> uniform, float v0)
unsafe void IglFunc.SetValue(Uniform<float> uniform, float f0)
{
glActionQueue.Enqueue(
() => { api->glUniform1f(uniform.id, v0); }
);
M128 m = default;
m.UInt64[0] = (ulong)uniform.id.valuePtr;
m.Single[2] = f0;
paramQueue.Enqueue(m);
glActionQueue.Enqueue(UniformVal1fPtr);
}
unsafe void IglFunc.SetValue(Uniform<int> uniform, int i0)
{
glActionQueue.Enqueue(
() => { api->glUniform1d(uniform.id, i0); }
);
M128 m = default;
m.UInt64[0] = (ulong)uniform.id.valuePtr;
m.Int32[2] = i0;
paramQueue.Enqueue(m);
glActionQueue.Enqueue(UniformVal1fPtr);
}
unsafe void IglFunc.SetValue(Uniform<Vec4d> uniform, Vec4d vec)
{
glActionQueue.Enqueue(
() =>
{
Vec4d cache = vec;
api->glUniform1fv(uniform.id, 4, &cache);
}
);
Vec4d m = vec;
paramQueue.Enqueue((IntPtr)uniform.id.valuePtr, (IntPtr)(Vec4d*)&m);
glActionQueue.Enqueue(UniformVal1fvPtr);
}
private static void UniformVal1f()
{
M128 m = default;
paramQueue.TryDequeue(out m);
paramQueue.context->glUniform1f(*(int*)m.UInt64[0], m.Single[2]);
}
private static unsafe void UniformVal1fv()
{
M128 m = default;
paramQueue.TryDequeue(out m);
paramQueue.context->glUniform1fv(*(int*)m.UInt64[0], 4, (Vec4d*)m.UInt64[0]);
}
private static void UniformVal1i()
{
M128 m = default;
paramQueue.TryDequeue(out m);
paramQueue.context->glUniform1i(*(int*)m.UInt64[0], m.Int32[2]);
}
private static void UniformVal2f()
{
M128 m = default;
paramQueue.TryDequeue(out m);
paramQueue.context->glUniform2f(*(int*)m.UInt64[0], m.Single[2], m.Single[3]);
}
private static void UniformVal3f()
{
IntPtr handle = IntPtr.Zero;
M128 m = default;
paramQueue.TryDequeue(out handle);
paramQueue.TryDequeue(out m);
paramQueue.context->glUniform3f(*(int*)handle, m.Single[0], m.Single[1], m.Single[2]);
}
private static void UniformVal4f()
{
IntPtr handle = IntPtr.Zero;
M128 m = default;
paramQueue.TryDequeue(out handle);
paramQueue.TryDequeue(out m);
paramQueue.context->glUniform4f(*(int*)handle, m.Single[0], m.Single[1], m.Single[2], m.Single[2]);
}
}
}
+6 -1
View File
@@ -4,7 +4,10 @@ using System.Collections.Generic;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Text;
#if Windows
using Windows.Win32;
#endif
namespace StgSharp
{
internal partial class InternalIO
@@ -131,6 +134,8 @@ namespace StgSharp
//[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwCreateWindowSurface")] internal extern unsafe static VkResult glfwCreateWindowSurface(VkInstance instance, IntPtr window, VkAllocationCallbacks* allocator, VkSurfaceKHR* surface);
#endregion
}
}
@@ -45,6 +45,14 @@ namespace StgSharp.Graphics
IntPtr proc = loader("glGetString");
context->glGetString = (delegate*<uint, IntPtr>)proc;
if ((IntPtr)context->glGetString == IntPtr.Zero)
{
#if DEBUG
Console.WriteLine("Cannot load GL.");
throw new Exception("Cannot load gl");
#endif
}
string coreVersion;
if (context->glGetString(glVersion) == IntPtr.Zero)
{
+5
View File
@@ -298,5 +298,10 @@ namespace StgSharp.Graphics
void Viewport(int x, int y, uint width, uint height);
internal void SwitchContext();
internal unsafe GLcontext* Context
{
get;
}
}
}
+18 -2
View File
@@ -30,13 +30,29 @@ namespace StgSharp.Graphics
internal Image(ImageInfo information)
{
info = information;
int length = info.width * info.height * info.channel;
pixelArray = new byte[length];
Marshal.Copy(
source: info.pixelPtr,
destination: pixelArray,
startIndex: 0,
length: info.width * info.height * info.channel
length: length
);
Marshal.FreeHGlobal(info.pixelPtr);
}
internal byte[] PixelArray
{
get
{
if (pixelArray == null)
{
pixelArray = new byte[info.width * info.height * info.channel];
Marshal.Copy(source: info.pixelPtr, destination: pixelArray,
startIndex: 0, length: info.width * info.height * info.channel);
Marshal.FreeHGlobal(info.pixelPtr);
}
return pixelArray;
}
}
public unsafe Image()
+37 -10
View File
@@ -58,9 +58,19 @@ namespace StgSharp.Logic
m.UInt32[1] = u1;
m.UInt32[2] = u2;
paramQueue.Enqueue(m);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public void Enqueue(float f0, float f1, float f2)
{
M128 m = default;
m.Single[0] = f0;
m.Single[1] = f1;
m.Single[2] = f2;
paramQueue.Enqueue(m);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public void Enqueue(float f0, float f1, float f2, float f3)
{
@@ -76,8 +86,8 @@ namespace StgSharp.Logic
public void Enqueue(IntPtr p0, IntPtr p1)
{
M128 m = default;
m.IntPtr0 = p0;
m.IntPtr1 = p1;
m.UInt64[0] = (ulong)p0;
m.UInt64[1] = (ulong)p1;
paramQueue.Enqueue(m);
}
@@ -85,7 +95,7 @@ namespace StgSharp.Logic
public void Enqueue(IntPtr p)
{
M128 m = default;
m.IntPtr0 = p;
m.UInt64[0] = (ulong)p;
paramQueue.Enqueue(m);
}
@@ -93,7 +103,7 @@ namespace StgSharp.Logic
public void Enqueue(glHandle handle)
{
M128 m = default;
m.IntPtr0 = (IntPtr)handle.valuePtr;
m.UInt64[0] = (ulong)handle.valuePtr;
paramQueue.Enqueue(m);
}
@@ -101,8 +111,8 @@ namespace StgSharp.Logic
public void Enqueue(glHandle handle, glHandle handle1)
{
M128 m = default;
m.IntPtr0 = (IntPtr)handle.valuePtr;
m.IntPtr1 = (IntPtr)handle1.valuePtr;
m.UInt64[0] = (ulong)handle.valuePtr;
m.UInt64[1] = (ulong)handle1.valuePtr;
paramQueue.Enqueue(m);
}
@@ -235,7 +245,7 @@ namespace StgSharp.Logic
M128 ret;
if (paramQueue.TryDequeue(out ret))
{
p = ret.IntPtr0;
p = (IntPtr)ret.UInt64[0];
}
else
{
@@ -251,8 +261,8 @@ namespace StgSharp.Logic
M128 ret;
if (paramQueue.TryDequeue(out ret))
{
p0 = ret.IntPtr0;
p1 = ret.IntPtr1;
p0 = (IntPtr)ret.UInt64[0];
p1 = (IntPtr)ret.UInt64[1];
}
else
{
@@ -279,6 +289,23 @@ namespace StgSharp.Logic
}
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public void TryDequeue(out float f0, out float f1, out float f2)
{
M128 ret;
if (paramQueue.TryDequeue(out ret))
{
f0 = ret.UInt32[0];
f1 = ret.UInt32[1];
f2 = ret.UInt32[2];
}
else
{
InternalIO.InternalWriteLog("No param in buffer when calling gl function.", LogType.Error);
throw new Exception();
}
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public void TryDequeue(out uint u0)
{
-5
View File
@@ -22,11 +22,6 @@ namespace StgSharp.Math
[FieldOffset(0)] internal fixed ushort UInt16[8];
[FieldOffset(0)] internal fixed uint UInt32[4];
[FieldOffset(0)] internal fixed ulong UInt64[2];
[FieldOffset(0)] internal IntPtr IntPtr0;
[FieldOffset(1)] internal IntPtr IntPtr1;
}
[StructLayout(LayoutKind.Explicit, Size = 16, Pack = 16)]
+1 -1
View File
@@ -13,7 +13,7 @@ namespace StgSharp.Math
#if DEBUG
= 0.5f;
#else
= Calc.Abs(System.DateTime.UtcNow.GetHashCode());
= Abs(System.DateTime.UtcNow.GetHashCode());
#endif
/// <summary>
+37
View File
@@ -0,0 +1,37 @@
WNDCLASSA
ChoosePixelFormat
CreateWindowEx
DefWindowProc
DescribePixelFormat
DestroyWindow
FreeLibrary
GetDC
GetEnhMetaFilePixelFormat
GetModuleHandle
GetPixelFormat
GetProcAddress
LoadCursor
LoadLibrary
PostQuitMessage
RegisterClass
RegisterClassA
ReleaseDC
SetPixelFormat
SwapBuffers
wglGetProcAddress
wglCreateContext
wglCreateLayerContext
wglCopyContext
wglDeleteContext
wglDescribeLayerPlane
wglGetCurrentContext
wglGetCurrentDC
wglGetLayerPaletteEntries
wglGetProcAddress
wglMakeCurrent
wglRealizeLayerPalette
wglSetLayerPaletteEntries
wglShareLists
wglSwapLayerBuffers
wglUseFontBitmaps
wglUseFontOutlines
+42 -9
View File
@@ -14,7 +14,7 @@
<AnalysisLevel>preview-all</AnalysisLevel>
<OutputType>Library</OutputType>
<Nullable>enable</Nullable>
<Configurations>Debug;Release;NoOps;RealDebug;Benchmark</Configurations>
<Configurations>Debug;Release;NoOps;RealDebug;Benchmark;Toollist</Configurations>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
@@ -22,7 +22,11 @@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Benchmark|x64'">
<Optimize>True</Optimize>
<Optimize>True</Optimize>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Toollist|x64'">
<Optimize>True</Optimize>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='RealDebug|x64'">
@@ -36,9 +40,15 @@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Benchmark|x64'">
<Optimize>True</Optimize>
<DebugType>embedded</DebugType>
<NoWarn>1701;1702;0649;1591;0169</NoWarn>
<Optimize>True</Optimize>
<DebugType>embedded</DebugType>
<NoWarn>1701;1702;0649;1591;0169</NoWarn>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Toollist|x64'">
<Optimize>True</Optimize>
<DebugType>embedded</DebugType>
<NoWarn>1701;1702;0649;1591;0169</NoWarn>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='RealDebug|x64'">
@@ -54,9 +64,15 @@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Benchmark|AnyCPU'">
<DebugType>embedded</DebugType>
<Optimize>True</Optimize>
<NoWarn>1701;1702;0649;1591;0169</NoWarn>
<DebugType>embedded</DebugType>
<Optimize>True</Optimize>
<NoWarn>1701;1702;0649;1591;0169</NoWarn>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Toollist|AnyCPU'">
<DebugType>embedded</DebugType>
<Optimize>True</Optimize>
<NoWarn>1701;1702;0649;1591;0169</NoWarn>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='RealDebug|AnyCPU'">
@@ -75,11 +91,28 @@
<NoWarn>1701;1702;0649;1591;0169</NoWarn>
</PropertyGroup>
<PropertyGroup>
<IsWindows Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Windows)))' == 'true'">true</IsWindows>
<IsOSX Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::OSX)))' == 'true'">true</IsOSX>
<IsLinux Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Linux)))' == 'true'">true</IsLinux>
</PropertyGroup>
<PropertyGroup Condition="'$(IsWindows)'=='true'">
<DefineConstants>Windows</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(IsOSX)'=='true'">
<DefineConstants>OSX</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(IsLinux)'=='true'">
<DefineConstants>Linux</DefineConstants>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Bcl.HashCode" Version="1.1.1" />
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
<PackageReference Include="Microsoft.Windows.CsWin32" Version="0.3.49-beta">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>
@@ -0,0 +1,152 @@
{
"runtimeTarget": {
"name": ".NETStandard,Version=v2.1/",
"signature": ""
},
"compilationOptions": {},
"targets": {
".NETStandard,Version=v2.1": {},
".NETStandard,Version=v2.1/": {
"StgSharp/1.0.0": {
"dependencies": {
"Microsoft.CSharp": "4.7.0",
"Microsoft.Windows.CsWin32": "0.3.49-beta"
},
"runtime": {
"StgSharp.dll": {}
}
},
"Microsoft.CSharp/4.7.0": {
"runtime": {
"lib/netstandard2.0/Microsoft.CSharp.dll": {
"assemblyVersion": "4.0.5.0",
"fileVersion": "4.700.19.56404"
}
}
},
"Microsoft.Windows.CsWin32/0.3.49-beta": {
"dependencies": {
"Microsoft.Windows.SDK.Win32Docs": "0.1.42-alpha",
"Microsoft.Windows.SDK.Win32Metadata": "55.0.45-preview",
"Microsoft.Windows.WDK.Win32Metadata": "0.9.9-experimental",
"System.Memory": "4.5.5",
"System.Runtime.CompilerServices.Unsafe": "6.0.0"
}
},
"Microsoft.Windows.SDK.Win32Docs/0.1.42-alpha": {},
"Microsoft.Windows.SDK.Win32Metadata/55.0.45-preview": {},
"Microsoft.Windows.WDK.Win32Metadata/0.9.9-experimental": {
"dependencies": {
"Microsoft.Windows.SDK.Win32Metadata": "55.0.45-preview"
}
},
"System.Buffers/4.5.1": {
"runtime": {
"lib/netstandard2.0/System.Buffers.dll": {
"assemblyVersion": "4.0.3.0",
"fileVersion": "4.6.28619.1"
}
}
},
"System.Memory/4.5.5": {
"dependencies": {
"System.Buffers": "4.5.1",
"System.Numerics.Vectors": "4.4.0",
"System.Runtime.CompilerServices.Unsafe": "6.0.0"
},
"runtime": {
"lib/netstandard2.0/System.Memory.dll": {
"assemblyVersion": "4.0.1.2",
"fileVersion": "4.6.31308.1"
}
}
},
"System.Numerics.Vectors/4.4.0": {
"runtime": {
"lib/netstandard2.0/System.Numerics.Vectors.dll": {
"assemblyVersion": "4.1.3.0",
"fileVersion": "4.6.25519.3"
}
}
},
"System.Runtime.CompilerServices.Unsafe/6.0.0": {
"runtime": {
"lib/netstandard2.0/System.Runtime.CompilerServices.Unsafe.dll": {
"assemblyVersion": "6.0.0.0",
"fileVersion": "6.0.21.52210"
}
}
}
}
},
"libraries": {
"StgSharp/1.0.0": {
"type": "project",
"serviceable": false,
"sha512": ""
},
"Microsoft.CSharp/4.7.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-pTj+D3uJWyN3My70i2Hqo+OXixq3Os2D1nJ2x92FFo6sk8fYS1m1WLNTs0Dc1uPaViH0YvEEwvzddQ7y4rhXmA==",
"path": "microsoft.csharp/4.7.0",
"hashPath": "microsoft.csharp.4.7.0.nupkg.sha512"
},
"Microsoft.Windows.CsWin32/0.3.49-beta": {
"type": "package",
"serviceable": true,
"sha512": "sha512-/iAXplVDKESFyLz/MShuVYVx62YFvFePpq3qrzREl8KScQqG6Z2kV7r9UJTjQS1g+hfy3V+e4m1x9lsu24YNSg==",
"path": "microsoft.windows.cswin32/0.3.49-beta",
"hashPath": "microsoft.windows.cswin32.0.3.49-beta.nupkg.sha512"
},
"Microsoft.Windows.SDK.Win32Docs/0.1.42-alpha": {
"type": "package",
"serviceable": true,
"sha512": "sha512-Z/9po23gUA9aoukirh2ItMU2ZS9++Js9Gdds9fu5yuMojDrmArvY2y+tq9985tR3cxFxpZO1O35Wjfo0khj5HA==",
"path": "microsoft.windows.sdk.win32docs/0.1.42-alpha",
"hashPath": "microsoft.windows.sdk.win32docs.0.1.42-alpha.nupkg.sha512"
},
"Microsoft.Windows.SDK.Win32Metadata/55.0.45-preview": {
"type": "package",
"serviceable": true,
"sha512": "sha512-2i1kVIk8rMuMCYtoeYeWbmCRLqNgb63Berac3Gv+J/pjp0oucopasKgLQNslryhsgBl4xex9ENhJX2MXEW5vdA==",
"path": "microsoft.windows.sdk.win32metadata/55.0.45-preview",
"hashPath": "microsoft.windows.sdk.win32metadata.55.0.45-preview.nupkg.sha512"
},
"Microsoft.Windows.WDK.Win32Metadata/0.9.9-experimental": {
"type": "package",
"serviceable": true,
"sha512": "sha512-cncPlxLqR25mFOuvpxZPgXgJqRmXyV5eTULj/9w8AQvO/c1xJDEapohRsWkYaia7hCR/EwEzBHr7RU9u93T03w==",
"path": "microsoft.windows.wdk.win32metadata/0.9.9-experimental",
"hashPath": "microsoft.windows.wdk.win32metadata.0.9.9-experimental.nupkg.sha512"
},
"System.Buffers/4.5.1": {
"type": "package",
"serviceable": true,
"sha512": "sha512-Rw7ijyl1qqRS0YQD/WycNst8hUUMgrMH4FCn1nNm27M4VxchZ1js3fVjQaANHO5f3sN4isvP4a+Met9Y4YomAg==",
"path": "system.buffers/4.5.1",
"hashPath": "system.buffers.4.5.1.nupkg.sha512"
},
"System.Memory/4.5.5": {
"type": "package",
"serviceable": true,
"sha512": "sha512-XIWiDvKPXaTveaB7HVganDlOCRoj03l+jrwNvcge/t8vhGYKvqV+dMv6G4SAX2NoNmN0wZfVPTAlFwZcZvVOUw==",
"path": "system.memory/4.5.5",
"hashPath": "system.memory.4.5.5.nupkg.sha512"
},
"System.Numerics.Vectors/4.4.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-UiLzLW+Lw6HLed1Hcg+8jSRttrbuXv7DANVj0DkL9g6EnnzbL75EB7EWsw5uRbhxd/4YdG8li5XizGWepmG3PQ==",
"path": "system.numerics.vectors/4.4.0",
"hashPath": "system.numerics.vectors.4.4.0.nupkg.sha512"
},
"System.Runtime.CompilerServices.Unsafe/6.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-/iUeP3tq1S0XdNNoMz5C9twLSrM/TH+qElHkXWaPvuNOt+99G75NrV0OS2EqHx5wMN7popYjpc8oTjC1y16DLg==",
"path": "system.runtime.compilerservices.unsafe/6.0.0",
"hashPath": "system.runtime.compilerservices.unsafe.6.0.0.nupkg.sha512"
}
}
}
File diff suppressed because it is too large Load Diff
@@ -45,13 +45,14 @@
"netstandard2.1": {
"targetAlias": "netstandard2.1",
"dependencies": {
"Microsoft.Bcl.HashCode": {
"target": "Package",
"version": "[1.1.1, )"
},
"Microsoft.CSharp": {
"target": "Package",
"version": "[4.7.0, )"
},
"Microsoft.Windows.CsWin32": {
"suppressParent": "All",
"target": "Package",
"version": "[0.3.49-beta, )"
}
},
"imports": [
@@ -13,4 +13,13 @@
<SourceRoot Include="C:\Users\Nitlo\.nuget\packages\" />
<SourceRoot Include="C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages\" />
</ItemGroup>
<ImportGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<Import Project="$(NuGetPackageRoot)microsoft.windows.sdk.win32metadata\55.0.45-preview\buildTransitive\netstandard1.0\Microsoft.Windows.SDK.Win32Metadata.props" Condition="Exists('$(NuGetPackageRoot)microsoft.windows.sdk.win32metadata\55.0.45-preview\buildTransitive\netstandard1.0\Microsoft.Windows.SDK.Win32Metadata.props')" />
<Import Project="$(NuGetPackageRoot)microsoft.windows.wdk.win32metadata\0.9.9-experimental\buildTransitive\netstandard1.0\Microsoft.Windows.WDK.Win32Metadata.props" Condition="Exists('$(NuGetPackageRoot)microsoft.windows.wdk.win32metadata\0.9.9-experimental\buildTransitive\netstandard1.0\Microsoft.Windows.WDK.Win32Metadata.props')" />
<Import Project="$(NuGetPackageRoot)microsoft.windows.sdk.win32docs\0.1.42-alpha\buildTransitive\netstandard1.0\Microsoft.Windows.SDK.Win32Docs.props" Condition="Exists('$(NuGetPackageRoot)microsoft.windows.sdk.win32docs\0.1.42-alpha\buildTransitive\netstandard1.0\Microsoft.Windows.SDK.Win32Docs.props')" />
<Import Project="$(NuGetPackageRoot)microsoft.windows.cswin32\0.3.49-beta\build\netstandard1.0\Microsoft.Windows.CsWin32.props" Condition="Exists('$(NuGetPackageRoot)microsoft.windows.cswin32\0.3.49-beta\build\netstandard1.0\Microsoft.Windows.CsWin32.props')" />
</ImportGroup>
<PropertyGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<PkgMicrosoft_Windows_CsWin32 Condition=" '$(PkgMicrosoft_Windows_CsWin32)' == '' ">C:\Users\Nitlo\.nuget\packages\microsoft.windows.cswin32\0.3.49-beta</PkgMicrosoft_Windows_CsWin32>
</PropertyGroup>
</Project>
+315 -45
View File
@@ -2,17 +2,6 @@
"version": 3,
"targets": {
".NETStandard,Version=v2.1": {
"Microsoft.Bcl.HashCode/1.1.1": {
"type": "package",
"compile": {
"ref/netstandard2.1/Microsoft.Bcl.HashCode.dll": {}
},
"runtime": {
"lib/netstandard2.1/Microsoft.Bcl.HashCode.dll": {
"related": ".xml"
}
}
},
"Microsoft.CSharp/4.7.0": {
"type": "package",
"compile": {
@@ -25,38 +14,111 @@
"related": ".xml"
}
}
},
"Microsoft.Windows.CsWin32/0.3.49-beta": {
"type": "package",
"dependencies": {
"Microsoft.Windows.SDK.Win32Docs": "0.1.42-alpha",
"Microsoft.Windows.SDK.Win32Metadata": "55.0.45-preview",
"Microsoft.Windows.WDK.Win32Metadata": "0.9.9-experimental",
"System.Memory": "4.5.5",
"System.Runtime.CompilerServices.Unsafe": "6.0.0"
},
"build": {
"build/netstandard1.0/Microsoft.Windows.CsWin32.props": {}
}
},
"Microsoft.Windows.SDK.Win32Docs/0.1.42-alpha": {
"type": "package",
"compile": {
"lib/netstandard2.0/_._": {
"related": ".xml"
}
},
"runtime": {
"lib/netstandard2.0/_._": {
"related": ".xml"
}
},
"build": {
"buildTransitive/netstandard1.0/Microsoft.Windows.SDK.Win32Docs.props": {}
}
},
"Microsoft.Windows.SDK.Win32Metadata/55.0.45-preview": {
"type": "package",
"build": {
"buildTransitive/netstandard1.0/Microsoft.Windows.SDK.Win32Metadata.props": {}
}
},
"Microsoft.Windows.WDK.Win32Metadata/0.9.9-experimental": {
"type": "package",
"dependencies": {
"Microsoft.Windows.SDK.Win32Metadata": "55.0.45-preview"
},
"build": {
"buildTransitive/netstandard1.0/Microsoft.Windows.WDK.Win32Metadata.props": {}
}
},
"System.Buffers/4.5.1": {
"type": "package",
"compile": {
"ref/netstandard2.0/System.Buffers.dll": {
"related": ".xml"
}
},
"runtime": {
"lib/netstandard2.0/System.Buffers.dll": {
"related": ".xml"
}
}
},
"System.Memory/4.5.5": {
"type": "package",
"dependencies": {
"System.Buffers": "4.5.1",
"System.Numerics.Vectors": "4.4.0",
"System.Runtime.CompilerServices.Unsafe": "4.5.3"
},
"compile": {
"lib/netstandard2.0/System.Memory.dll": {
"related": ".xml"
}
},
"runtime": {
"lib/netstandard2.0/System.Memory.dll": {
"related": ".xml"
}
}
},
"System.Numerics.Vectors/4.4.0": {
"type": "package",
"compile": {
"ref/netstandard2.0/System.Numerics.Vectors.dll": {
"related": ".xml"
}
},
"runtime": {
"lib/netstandard2.0/System.Numerics.Vectors.dll": {
"related": ".xml"
}
}
},
"System.Runtime.CompilerServices.Unsafe/6.0.0": {
"type": "package",
"compile": {
"lib/netstandard2.0/System.Runtime.CompilerServices.Unsafe.dll": {
"related": ".xml"
}
},
"runtime": {
"lib/netstandard2.0/System.Runtime.CompilerServices.Unsafe.dll": {
"related": ".xml"
}
}
}
}
},
"libraries": {
"Microsoft.Bcl.HashCode/1.1.1": {
"sha512": "MalY0Y/uM/LjXtHfX/26l2VtN4LDNZ2OE3aumNOHDLsT4fNYy2hiHXI4CXCqKpNUNm7iJ2brrc4J89UdaL56FA==",
"type": "package",
"path": "microsoft.bcl.hashcode/1.1.1",
"files": [
".nupkg.metadata",
".signature.p7s",
"Icon.png",
"LICENSE.TXT",
"THIRD-PARTY-NOTICES.TXT",
"lib/net461/Microsoft.Bcl.HashCode.dll",
"lib/net461/Microsoft.Bcl.HashCode.xml",
"lib/netcoreapp2.1/Microsoft.Bcl.HashCode.dll",
"lib/netcoreapp2.1/Microsoft.Bcl.HashCode.xml",
"lib/netstandard2.0/Microsoft.Bcl.HashCode.dll",
"lib/netstandard2.0/Microsoft.Bcl.HashCode.xml",
"lib/netstandard2.1/Microsoft.Bcl.HashCode.dll",
"lib/netstandard2.1/Microsoft.Bcl.HashCode.xml",
"microsoft.bcl.hashcode.1.1.1.nupkg.sha512",
"microsoft.bcl.hashcode.nuspec",
"ref/net461/Microsoft.Bcl.HashCode.dll",
"ref/netcoreapp2.1/Microsoft.Bcl.HashCode.dll",
"ref/netstandard2.0/Microsoft.Bcl.HashCode.dll",
"ref/netstandard2.1/Microsoft.Bcl.HashCode.dll",
"useSharedDesignerContext.txt",
"version.txt"
]
},
"Microsoft.CSharp/4.7.0": {
"sha512": "pTj+D3uJWyN3My70i2Hqo+OXixq3Os2D1nJ2x92FFo6sk8fYS1m1WLNTs0Dc1uPaViH0YvEEwvzddQ7y4rhXmA==",
"type": "package",
@@ -125,12 +187,219 @@
"useSharedDesignerContext.txt",
"version.txt"
]
},
"Microsoft.Windows.CsWin32/0.3.49-beta": {
"sha512": "/iAXplVDKESFyLz/MShuVYVx62YFvFePpq3qrzREl8KScQqG6Z2kV7r9UJTjQS1g+hfy3V+e4m1x9lsu24YNSg==",
"type": "package",
"path": "microsoft.windows.cswin32/0.3.49-beta",
"hasTools": true,
"files": [
".nupkg.metadata",
".signature.p7s",
"NOTICE.txt",
"README.md",
"analyzers/cs/MessagePack.Annotations.dll",
"analyzers/cs/MessagePack.dll",
"analyzers/cs/Microsoft.Bcl.AsyncInterfaces.dll",
"analyzers/cs/Microsoft.Windows.CsWin32.dll",
"analyzers/cs/Microsoft.Windows.SDK.Win32Docs.dll",
"analyzers/cs/System.Text.Encodings.Web.dll",
"analyzers/cs/System.Text.Json.dll",
"build/Microsoft.Windows.CsWin32.props",
"build/net20/Microsoft.Windows.CsWin32.props",
"build/netstandard1.0/Microsoft.Windows.CsWin32.props",
"microsoft.windows.cswin32.0.3.49-beta.nupkg.sha512",
"microsoft.windows.cswin32.nuspec",
"readme.txt",
"tools/install.ps1",
"tools/uninstall.ps1"
]
},
"Microsoft.Windows.SDK.Win32Docs/0.1.42-alpha": {
"sha512": "Z/9po23gUA9aoukirh2ItMU2ZS9++Js9Gdds9fu5yuMojDrmArvY2y+tq9985tR3cxFxpZO1O35Wjfo0khj5HA==",
"type": "package",
"path": "microsoft.windows.sdk.win32docs/0.1.42-alpha",
"files": [
".nupkg.metadata",
".signature.p7s",
"apidocs.msgpack",
"buildTransitive/Microsoft.Windows.SDK.Win32Docs.props",
"buildTransitive/net20/Microsoft.Windows.SDK.Win32Docs.props",
"buildTransitive/netstandard1.0/Microsoft.Windows.SDK.Win32Docs.props",
"images/windows.png",
"lib/netstandard2.0/Microsoft.Windows.SDK.Win32Docs.dll",
"lib/netstandard2.0/Microsoft.Windows.SDK.Win32Docs.xml",
"microsoft.windows.sdk.win32docs.0.1.42-alpha.nupkg.sha512",
"microsoft.windows.sdk.win32docs.nuspec"
]
},
"Microsoft.Windows.SDK.Win32Metadata/55.0.45-preview": {
"sha512": "2i1kVIk8rMuMCYtoeYeWbmCRLqNgb63Berac3Gv+J/pjp0oucopasKgLQNslryhsgBl4xex9ENhJX2MXEW5vdA==",
"type": "package",
"path": "microsoft.windows.sdk.win32metadata/55.0.45-preview",
"files": [
".nupkg.metadata",
".signature.p7s",
"Windows.Win32.winmd",
"build/Microsoft.Windows.SDK.Win32Metadata.props",
"build/net20/Microsoft.Windows.SDK.Win32Metadata.props",
"build/netstandard1.0/Microsoft.Windows.SDK.Win32Metadata.props",
"buildTransitive/Microsoft.Windows.SDK.Win32Metadata.props",
"buildTransitive/net20/Microsoft.Windows.SDK.Win32Metadata.props",
"buildTransitive/netstandard1.0/Microsoft.Windows.SDK.Win32Metadata.props",
"images/windows.png",
"microsoft.windows.sdk.win32metadata.55.0.45-preview.nupkg.sha512",
"microsoft.windows.sdk.win32metadata.nuspec",
"sdk_license.txt"
]
},
"Microsoft.Windows.WDK.Win32Metadata/0.9.9-experimental": {
"sha512": "cncPlxLqR25mFOuvpxZPgXgJqRmXyV5eTULj/9w8AQvO/c1xJDEapohRsWkYaia7hCR/EwEzBHr7RU9u93T03w==",
"type": "package",
"path": "microsoft.windows.wdk.win32metadata/0.9.9-experimental",
"files": [
".nupkg.metadata",
".signature.p7s",
"Windows.Wdk.winmd",
"build/Microsoft.Windows.WDK.Win32Metadata.props",
"build/net20/Microsoft.Windows.WDK.Win32Metadata.props",
"build/netstandard1.0/Microsoft.Windows.WDK.Win32Metadata.props",
"buildTransitive/Microsoft.Windows.WDK.Win32Metadata.props",
"buildTransitive/net20/Microsoft.Windows.WDK.Win32Metadata.props",
"buildTransitive/netstandard1.0/Microsoft.Windows.WDK.Win32Metadata.props",
"images/windows.png",
"microsoft.windows.wdk.win32metadata.0.9.9-experimental.nupkg.sha512",
"microsoft.windows.wdk.win32metadata.nuspec",
"sdk_license.txt"
]
},
"System.Buffers/4.5.1": {
"sha512": "Rw7ijyl1qqRS0YQD/WycNst8hUUMgrMH4FCn1nNm27M4VxchZ1js3fVjQaANHO5f3sN4isvP4a+Met9Y4YomAg==",
"type": "package",
"path": "system.buffers/4.5.1",
"files": [
".nupkg.metadata",
".signature.p7s",
"LICENSE.TXT",
"THIRD-PARTY-NOTICES.TXT",
"lib/net461/System.Buffers.dll",
"lib/net461/System.Buffers.xml",
"lib/netcoreapp2.0/_._",
"lib/netstandard1.1/System.Buffers.dll",
"lib/netstandard1.1/System.Buffers.xml",
"lib/netstandard2.0/System.Buffers.dll",
"lib/netstandard2.0/System.Buffers.xml",
"lib/uap10.0.16299/_._",
"ref/net45/System.Buffers.dll",
"ref/net45/System.Buffers.xml",
"ref/netcoreapp2.0/_._",
"ref/netstandard1.1/System.Buffers.dll",
"ref/netstandard1.1/System.Buffers.xml",
"ref/netstandard2.0/System.Buffers.dll",
"ref/netstandard2.0/System.Buffers.xml",
"ref/uap10.0.16299/_._",
"system.buffers.4.5.1.nupkg.sha512",
"system.buffers.nuspec",
"useSharedDesignerContext.txt",
"version.txt"
]
},
"System.Memory/4.5.5": {
"sha512": "XIWiDvKPXaTveaB7HVganDlOCRoj03l+jrwNvcge/t8vhGYKvqV+dMv6G4SAX2NoNmN0wZfVPTAlFwZcZvVOUw==",
"type": "package",
"path": "system.memory/4.5.5",
"files": [
".nupkg.metadata",
".signature.p7s",
"LICENSE.TXT",
"THIRD-PARTY-NOTICES.TXT",
"lib/net461/System.Memory.dll",
"lib/net461/System.Memory.xml",
"lib/netcoreapp2.1/_._",
"lib/netstandard1.1/System.Memory.dll",
"lib/netstandard1.1/System.Memory.xml",
"lib/netstandard2.0/System.Memory.dll",
"lib/netstandard2.0/System.Memory.xml",
"ref/netcoreapp2.1/_._",
"system.memory.4.5.5.nupkg.sha512",
"system.memory.nuspec",
"useSharedDesignerContext.txt",
"version.txt"
]
},
"System.Numerics.Vectors/4.4.0": {
"sha512": "UiLzLW+Lw6HLed1Hcg+8jSRttrbuXv7DANVj0DkL9g6EnnzbL75EB7EWsw5uRbhxd/4YdG8li5XizGWepmG3PQ==",
"type": "package",
"path": "system.numerics.vectors/4.4.0",
"files": [
".nupkg.metadata",
".signature.p7s",
"LICENSE.TXT",
"THIRD-PARTY-NOTICES.TXT",
"lib/MonoAndroid10/_._",
"lib/MonoTouch10/_._",
"lib/net46/System.Numerics.Vectors.dll",
"lib/net46/System.Numerics.Vectors.xml",
"lib/netcoreapp2.0/_._",
"lib/netstandard1.0/System.Numerics.Vectors.dll",
"lib/netstandard1.0/System.Numerics.Vectors.xml",
"lib/netstandard2.0/System.Numerics.Vectors.dll",
"lib/netstandard2.0/System.Numerics.Vectors.xml",
"lib/portable-net45+win8+wp8+wpa81/System.Numerics.Vectors.dll",
"lib/portable-net45+win8+wp8+wpa81/System.Numerics.Vectors.xml",
"lib/xamarinios10/_._",
"lib/xamarinmac20/_._",
"lib/xamarintvos10/_._",
"lib/xamarinwatchos10/_._",
"ref/MonoAndroid10/_._",
"ref/MonoTouch10/_._",
"ref/net46/System.Numerics.Vectors.dll",
"ref/net46/System.Numerics.Vectors.xml",
"ref/netcoreapp2.0/_._",
"ref/netstandard1.0/System.Numerics.Vectors.dll",
"ref/netstandard1.0/System.Numerics.Vectors.xml",
"ref/netstandard2.0/System.Numerics.Vectors.dll",
"ref/netstandard2.0/System.Numerics.Vectors.xml",
"ref/xamarinios10/_._",
"ref/xamarinmac20/_._",
"ref/xamarintvos10/_._",
"ref/xamarinwatchos10/_._",
"system.numerics.vectors.4.4.0.nupkg.sha512",
"system.numerics.vectors.nuspec",
"useSharedDesignerContext.txt",
"version.txt"
]
},
"System.Runtime.CompilerServices.Unsafe/6.0.0": {
"sha512": "/iUeP3tq1S0XdNNoMz5C9twLSrM/TH+qElHkXWaPvuNOt+99G75NrV0OS2EqHx5wMN7popYjpc8oTjC1y16DLg==",
"type": "package",
"path": "system.runtime.compilerservices.unsafe/6.0.0",
"files": [
".nupkg.metadata",
".signature.p7s",
"Icon.png",
"LICENSE.TXT",
"THIRD-PARTY-NOTICES.TXT",
"buildTransitive/netcoreapp2.0/System.Runtime.CompilerServices.Unsafe.targets",
"buildTransitive/netcoreapp3.1/_._",
"lib/net461/System.Runtime.CompilerServices.Unsafe.dll",
"lib/net461/System.Runtime.CompilerServices.Unsafe.xml",
"lib/net6.0/System.Runtime.CompilerServices.Unsafe.dll",
"lib/net6.0/System.Runtime.CompilerServices.Unsafe.xml",
"lib/netcoreapp3.1/System.Runtime.CompilerServices.Unsafe.dll",
"lib/netcoreapp3.1/System.Runtime.CompilerServices.Unsafe.xml",
"lib/netstandard2.0/System.Runtime.CompilerServices.Unsafe.dll",
"lib/netstandard2.0/System.Runtime.CompilerServices.Unsafe.xml",
"system.runtime.compilerservices.unsafe.6.0.0.nupkg.sha512",
"system.runtime.compilerservices.unsafe.nuspec",
"useSharedDesignerContext.txt"
]
}
},
"projectFileDependencyGroups": {
".NETStandard,Version=v2.1": [
"Microsoft.Bcl.HashCode >= 1.1.1",
"Microsoft.CSharp >= 4.7.0"
"Microsoft.CSharp >= 4.7.0",
"Microsoft.Windows.CsWin32 >= 0.3.49-beta"
]
},
"packageFolders": {
@@ -178,13 +447,14 @@
"netstandard2.1": {
"targetAlias": "netstandard2.1",
"dependencies": {
"Microsoft.Bcl.HashCode": {
"target": "Package",
"version": "[1.1.1, )"
},
"Microsoft.CSharp": {
"target": "Package",
"version": "[4.7.0, )"
},
"Microsoft.Windows.CsWin32": {
"suppressParent": "All",
"target": "Package",
"version": "[0.3.49-beta, )"
}
},
"imports": [
+10 -3
View File
@@ -1,11 +1,18 @@
{
"version": 2,
"dgSpecHash": "ZEy1DcAzD4VzqbKZ5b1WNXVTJ7ASngWdyWRK3Jo9EkNF5hdjST+BQi5eUbwUu+yqpwt9s24aXl+nV1XHMtDxuQ==",
"dgSpecHash": "SScQmL5WQ0AzrZMLauY1KTdFWwXiNxuI2NAO+HKzMT6yvbrrHCjXhkO2hF1YkSE8A1s0fckrWrToL0C9zq4zOw==",
"success": true,
"projectFilePath": "D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\源代码\\StgSharp\\StgSharp.csproj",
"expectedPackageFiles": [
"C:\\Users\\Nitlo\\.nuget\\packages\\microsoft.bcl.hashcode\\1.1.1\\microsoft.bcl.hashcode.1.1.1.nupkg.sha512",
"C:\\Users\\Nitlo\\.nuget\\packages\\microsoft.csharp\\4.7.0\\microsoft.csharp.4.7.0.nupkg.sha512"
"C:\\Users\\Nitlo\\.nuget\\packages\\microsoft.csharp\\4.7.0\\microsoft.csharp.4.7.0.nupkg.sha512",
"C:\\Users\\Nitlo\\.nuget\\packages\\microsoft.windows.cswin32\\0.3.49-beta\\microsoft.windows.cswin32.0.3.49-beta.nupkg.sha512",
"C:\\Users\\Nitlo\\.nuget\\packages\\microsoft.windows.sdk.win32docs\\0.1.42-alpha\\microsoft.windows.sdk.win32docs.0.1.42-alpha.nupkg.sha512",
"C:\\Users\\Nitlo\\.nuget\\packages\\microsoft.windows.sdk.win32metadata\\55.0.45-preview\\microsoft.windows.sdk.win32metadata.55.0.45-preview.nupkg.sha512",
"C:\\Users\\Nitlo\\.nuget\\packages\\microsoft.windows.wdk.win32metadata\\0.9.9-experimental\\microsoft.windows.wdk.win32metadata.0.9.9-experimental.nupkg.sha512",
"C:\\Users\\Nitlo\\.nuget\\packages\\system.buffers\\4.5.1\\system.buffers.4.5.1.nupkg.sha512",
"C:\\Users\\Nitlo\\.nuget\\packages\\system.memory\\4.5.5\\system.memory.4.5.5.nupkg.sha512",
"C:\\Users\\Nitlo\\.nuget\\packages\\system.numerics.vectors\\4.4.0\\system.numerics.vectors.4.4.0.nupkg.sha512",
"C:\\Users\\Nitlo\\.nuget\\packages\\system.runtime.compilerservices.unsafe\\6.0.0\\system.runtime.compilerservices.unsafe.6.0.0.nupkg.sha512"
],
"logs": []
}
@@ -1,4 +1,6 @@
is_global = true
build_property.CsWin32InputMetadataPaths = C:\Users\Nitlo\.nuget\packages\microsoft.windows.sdk.win32metadata\55.0.45-preview\Windows.Win32.winmd|C:\Users\Nitlo\.nuget\packages\microsoft.windows.wdk.win32metadata\0.9.9-experimental\Windows.Wdk.winmd
build_property.CsWin32InputDocPaths = C:\Users\Nitlo\.nuget\packages\microsoft.windows.sdk.win32docs\0.1.42-alpha\apidocs.msgpack
build_property.TargetFramework = netstandard2.1
build_property.TargetPlatformMinVersion = 7.0
build_property.UsingMicrosoftNETSdkWeb =
@@ -1 +1 @@
782e3dab3e04efa45b725f294fb2f3a1dfe839a8105c1f07be6261ca6a4264ec
58a5acf3308fca3681fb52b5a33573286589d74ed6bfbc0feef0b87bad84cd81
@@ -1,6 +1,13 @@
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharp\bin\x64\Debug\netstandard2.1\StgSharp.deps.json
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharp\bin\x64\Debug\netstandard2.1\StgSharp.dll
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharp\bin\x64\Debug\netstandard2.1\StgSharp.xml
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharp\obj\x64\Debug\netstandard2.1\StgSharp.csproj.AssemblyReference.cache
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharp\obj\x64\Debug\netstandard2.1\StgSharp.GeneratedMSBuildEditorConfig.editorconfig
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharp\obj\x64\Debug\netstandard2.1\StgSharp.AssemblyInfoInputs.cache
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharp\obj\x64\Debug\netstandard2.1\StgSharp.AssemblyInfo.cs
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharp\obj\x64\Debug\netstandard2.1\StgSharp.csproj.CoreCompileInputs.cache
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharp\obj\x64\Debug\netstandard2.1\StgSharp.sourcelink.json
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharp\obj\x64\Debug\netstandard2.1\StgSharp.dll
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharp\obj\x64\Debug\netstandard2.1\refint\StgSharp.dll
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharp\obj\x64\Debug\netstandard2.1\StgSharp.xml
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharp\obj\x64\Debug\netstandard2.1\ref\StgSharp.dll
@@ -1 +1 @@
{"documents":{"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\*":"https://raw.githubusercontent.com/Nitload-NSI/CCD_Github/5d778e0f2f6e677453cebc990919697968c771f9/*"}}
{"documents":{"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\*":"https://raw.githubusercontent.com/Nitload-NSI/CCD_Github/839156948261837c173ee878d930fc868fce223e/*"}}
File diff suppressed because it is too large Load Diff
@@ -14,7 +14,7 @@ using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("StgSharp")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("RealDebug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+8148c10acd65bd764d3e12418a1ebd37938d8501")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
[assembly: System.Reflection.AssemblyProductAttribute("StgSharp")]
[assembly: System.Reflection.AssemblyTitleAttribute("StgSharp")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
@@ -1 +1 @@
ca93447f31769911dc8294620befd7f0decfe42c9da322cc9f2b829b17d173fb
be8c87457a5494f89505f86881a5a0a81b016a0af5e05652a33e90ae26d1de26
@@ -1 +1 @@
d47c253e0b58efcf07d2b8af9d7bf025c4cd7551
c1862356ddd7e2959b23a52710009da43652ba23933b4b87c911fea2ba456025
@@ -9,3 +9,5 @@ build_property.EnforceExtendedAnalyzerRules =
build_property._SupportedPlatformList = Linux,macOS,Windows
build_property.RootNamespace = StgSharp
build_property.ProjectDir = D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharp\
build_property.EnableComHosting =
build_property.EnableGeneratedComInterfaceComImportInterop =
@@ -0,0 +1,4 @@
// <autogenerated />
using System;
using System.Reflection;
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
@@ -0,0 +1,23 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("StgSharp")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Toollist")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
[assembly: System.Reflection.AssemblyProductAttribute("StgSharp")]
[assembly: System.Reflection.AssemblyTitleAttribute("StgSharp")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
// 由 MSBuild WriteCodeFragment 类生成。
@@ -0,0 +1 @@
004645ff71b6cc11f94f0960e2cc1e083099895685eb8875acaea7993c5ea8da
@@ -0,0 +1,15 @@
is_global = true
build_property.CsWin32InputMetadataPaths = C:\Users\Nitlo\.nuget\packages\microsoft.windows.sdk.win32metadata\55.0.45-preview\Windows.Win32.winmd|C:\Users\Nitlo\.nuget\packages\microsoft.windows.wdk.win32metadata\0.9.9-experimental\Windows.Wdk.winmd
build_property.CsWin32InputDocPaths = C:\Users\Nitlo\.nuget\packages\microsoft.windows.sdk.win32docs\0.1.42-alpha\apidocs.msgpack
build_property.TargetFramework = netstandard2.1
build_property.TargetPlatformMinVersion = 7.0
build_property.UsingMicrosoftNETSdkWeb =
build_property.ProjectTypeGuids =
build_property.InvariantGlobalization =
build_property.PlatformNeutralAssembly =
build_property.EnforceExtendedAnalyzerRules =
build_property._SupportedPlatformList = Linux,macOS,Windows
build_property.RootNamespace = StgSharp
build_property.ProjectDir = D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharp\
build_property.EnableComHosting =
build_property.EnableGeneratedComInterfaceComImportInterop =
-2
View File
@@ -1,2 +0,0 @@
cd /d "D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharp" &msbuild "StgSharp.csproj" /t:sdvViewer /p:configuration="Debug" /p:platform="x64" /p:SolutionDir="D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码"
exit %errorlevel%