daily update on 20241002 by nitload youmu, intrinsic function rebuild, syntax style arrange

This commit is contained in:
Nitload
2024-10-03 04:03:06 +08:00
parent 0979123ac0
commit 6e2f93b053
265 changed files with 26732 additions and 19058 deletions
@@ -45,7 +45,7 @@ namespace StgSharp.Graphics
#region GLFW3 struct
[StructLayout(LayoutKind.Sequential)]
[StructLayout( LayoutKind.Sequential )]
public unsafe struct GLFWcontext
{
@@ -116,12 +116,12 @@ namespace StgSharp.Graphics
//GLFW_PLATFORM_CONTEXT_STATE
}
[StructLayout(LayoutKind.Sequential)]
[StructLayout( LayoutKind.Sequential )]
public unsafe struct glfwVideomode
{
/*! The refresh rate, in Hz, of the video mode.
*/
private int refreshRate;
/*! The bit depth of the blue channel of the video mode.
*/
@@ -142,12 +142,12 @@ namespace StgSharp.Graphics
}
[StructLayout(LayoutKind.Sequential)]
[StructLayout( LayoutKind.Sequential )]
public unsafe struct glfwGammaramp
{
/*! An array of value describing the response of the blue channel.
*/
private ushort* blue;
/*! An array of value describing the response of the green channel.
*/
@@ -162,12 +162,12 @@ namespace StgSharp.Graphics
}
[StructLayout(LayoutKind.Sequential)]
[StructLayout( LayoutKind.Sequential )]
public unsafe struct GLFWimage
{
/*! The pixel _data of this image, arranged left-to-right, top-to-bottom.
*/
private byte* pixels;
/*! The height, in pixels, of this image.
@@ -177,26 +177,25 @@ namespace StgSharp.Graphics
*/
private int width;
}
[StructLayout(LayoutKind.Sequential)]
[StructLayout( LayoutKind.Sequential )]
public unsafe struct GLFWgamepadstate
{
/*! The states of each [gamepad button](@ref gamepad_buttons), `GLFW_PRESS`
* or `GLFW_RELEASE`.
*/
public fixed byte buttons[15];
public fixed byte buttons[ 15 ];
/*! The states of each [gamepad axis](@ref gamepad_axes), in the range -1.0
* to 1.0 inclusive.
*/
public fixed float axes[6];
public fixed float axes[ 6 ];
}
[StructLayout(LayoutKind.Sequential)]
[StructLayout( LayoutKind.Sequential )]
public unsafe struct GLFWallocator
{
@@ -213,7 +212,7 @@ namespace StgSharp.Graphics
}
[StructLayout(LayoutKind.Sequential)]
[StructLayout( LayoutKind.Sequential )]
public unsafe struct glfwMonitor
{
@@ -221,7 +220,7 @@ namespace StgSharp.Graphics
private glfwWindow* window;
private fixed byte name[128];
private fixed byte name[ 128 ];
private glfwGammaramp currentRamp;
private glfwGammaramp originalRamp;
@@ -231,57 +230,55 @@ namespace StgSharp.Graphics
private int width, height;
private IntPtr userPointer;
public glfwMonitor()
{ }
public glfwMonitor() { }
public unsafe string Name
{
get
{
fixed (byte* cptr = name)
{
return Marshal.PtrToStringAnsi((IntPtr)cptr);
fixed( byte* cptr = name ) {
return Marshal.PtrToStringAnsi( ( IntPtr )cptr );
}
}
}
}
[StructLayout(LayoutKind.Sequential)]
unsafe struct glfwWindow
[StructLayout( LayoutKind.Sequential )]
internal unsafe struct glfwWindow
{
glfwWindow* next;
void* userPointer;
bool rawMouseMotion;
Callbacks callbacks;
private glfwWindow* next;
private void* userPointer;
private bool rawMouseMotion;
private Callbacks callbacks;
// Virtual cursor position when cursor is disabled
double virtualCursorPosX, virtualCursorPosY;
int autoIconify;
int cursorMode;
int decorated;
int doublebuffer;
int floating;
int focusOnShow;
int lockKeyMods;
int maxwidth, maxheight;
private double virtualCursorPosX, virtualCursorPosY;
private int autoIconify;
private int cursorMode;
private int decorated;
private int doublebuffer;
private int floating;
private int focusOnShow;
private int lockKeyMods;
private int maxwidth, maxheight;
int minwidth, minheight;
int mousePassthrough;
int numer, denom;
private int minwidth, minheight;
private int mousePassthrough;
private int numer, denom;
// Window settings and state
int resizable;
int shouldClose;
private int resizable;
private int shouldClose;
int stickyKeys;
int stickyMouseButtons;
IntPtr cursor; // _GLFWcursor* cursor;
private int stickyKeys;
private int stickyMouseButtons;
private IntPtr cursor; // _GLFWcursor* cursor;
// glfwVideomode videoMode; // 根据GLFWvidmode的定义转换
IntPtr monitor; // _GLFWmonitor* monitor;
public fixed byte keys[GLconst.GLFW_KEY_LAST + 1];
public fixed byte mouseButtons[GLconst.GLFW_MOUSE_BUTTON_LAST + 1];
private IntPtr monitor; // _GLFWmonitor* monitor;
public fixed byte keys[ GLconst.GLFW_KEY_LAST + 1 ];
public fixed byte mouseButtons[ GLconst.GLFW_MOUSE_BUTTON_LAST + 1 ];
// _GLFWcontext viewPortDisplay; // 根据_GLFWcontext的定义转换
@@ -312,14 +309,10 @@ namespace StgSharp.Graphics
// GLFW_PLATFORM_WINDOW_STATE platformWindowState;
}
[StructLayout( LayoutKind.Sequential )]
public struct GLFWwindowCallback { }
[StructLayout(LayoutKind.Sequential)]
public struct GLFWwindowCallback
{
}
[StructLayout(LayoutKind.Sequential)]
[StructLayout( LayoutKind.Sequential )]
public struct GLFWcursor
{
@@ -347,7 +340,7 @@ namespace StgSharp.Graphics
}
*/
[StructLayout(LayoutKind.Sequential)]
[StructLayout( LayoutKind.Sequential )]
public unsafe struct GLFWinitconfig
{
@@ -361,7 +354,7 @@ namespace StgSharp.Graphics
}
[StructLayout(LayoutKind.Sequential)]
[StructLayout( LayoutKind.Sequential )]
public unsafe struct GLFWwndconfig
{
@@ -392,31 +385,25 @@ namespace StgSharp.Graphics
internal X11 x11 = new X11();
public GLFWwndconfig()
{
}
public GLFWwndconfig() { }
internal struct Ns
{
private GLFWbool retina = false;
public fixed byte frameName[256];
public fixed byte frameName[ 256 ];
public Ns()
{
}
public Ns() { }
}
internal struct X11
{
public fixed byte className[256];
public fixed byte instanceName[256];
public fixed byte className[ 256 ];
public fixed byte instanceName[ 256 ];
public X11()
{
}
public X11() { }
}
@@ -430,17 +417,15 @@ namespace StgSharp.Graphics
internal struct Wl
{
public fixed byte appId[256];
public fixed byte appId[ 256 ];
public Wl()
{
}
public Wl() { }
}
}
[StructLayout(LayoutKind.Sequential)]
[StructLayout( LayoutKind.Sequential )]
public unsafe struct GLFWctxconfig
{
@@ -461,9 +446,7 @@ namespace StgSharp.Graphics
internal Nsgl nsgl = new Nsgl();
public GLFWctxconfig()
{
}
public GLFWctxconfig() { }
internal struct Nsgl
{
@@ -474,7 +457,7 @@ namespace StgSharp.Graphics
}
[StructLayout(LayoutKind.Sequential)]
[StructLayout( LayoutKind.Sequential )]
public unsafe struct GLFWfbconfig
{
@@ -500,11 +483,13 @@ namespace StgSharp.Graphics
}
[StructLayout(LayoutKind.Sequential)]
[StructLayout( LayoutKind.Sequential )]
internal unsafe struct GLFWlibrary
{
[MarshalAs(UnmanagedType.ByValArray, SizeConst = GLconst.GLFW_JOYSTICK_LAST + 1)]
[MarshalAs(
UnmanagedType.ByValArray,
SizeConst = GLconst.GLFW_JOYSTICK_LAST + 1 )]
private GLFWjoystick[] joysticks = new GLFWjoystick[GLconst.GLFW_JOYSTICK_LAST + 1];
private GLFWallocator allocator;
@@ -546,9 +531,7 @@ namespace StgSharp.Graphics
internal Osmesa osmesa = new Osmesa();
public GLFWlibrary()
{
}
public GLFWlibrary() { }
internal unsafe struct Hints
{
@@ -566,6 +549,7 @@ namespace StgSharp.Graphics
{
private ulong offset;
// This is defined in platform.h
//not transformed function defination
@@ -652,11 +636,9 @@ namespace StgSharp.Graphics
private GLFWbool KHR_xlib_surface;
private GLFWbool MVK_macos_surface;
private IntPtr GetInstanceProcAddr;
private fixed ulong extensions[2];
private fixed ulong extensions[ 2 ];
public vk()
{
}
public vk() { }
}
@@ -671,7 +653,7 @@ namespace StgSharp.Graphics
}
[StructLayout(LayoutKind.Sequential)]
[StructLayout( LayoutKind.Sequential )]
public unsafe struct GLFWmapelement
{
@@ -684,25 +666,24 @@ namespace StgSharp.Graphics
}
[StructLayout(LayoutKind.Sequential)]
[StructLayout( LayoutKind.Sequential )]
public unsafe struct GLFWmapping
{
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 6)]
[MarshalAs( UnmanagedType.ByValArray, SizeConst = 6 )]
private GLFWmapelement[] axes = new GLFWmapelement[6];
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 15)]
[MarshalAs( UnmanagedType.ByValArray, SizeConst = 15 )]
private GLFWmapelement[] buttons = new GLFWmapelement[15];
private fixed byte guid[33];
private fixed byte guid[ 33 ];
private fixed byte name[128];
private fixed byte name[ 128 ];
public GLFWmapping()
{ }
public GLFWmapping() { }
}
[StructLayout(LayoutKind.Sequential)]
[StructLayout( LayoutKind.Sequential )]
public unsafe struct GLFWjoystick
{
@@ -710,8 +691,8 @@ namespace StgSharp.Graphics
private byte* buttons;
private byte* hats;
private void* userPointer;
private fixed byte guid[33];
private fixed byte name[128];
private fixed byte guid[ 33 ];
private fixed byte name[ 128 ];
private GLFWbool allocated;
private GLFWbool connected;
@@ -726,20 +707,20 @@ namespace StgSharp.Graphics
// not completed in transforming
// GLFW_PLATFORM_JOYSTICK_STATE;
public GLFWjoystick()
{ }
public GLFWjoystick() { }
}
[StructLayout(LayoutKind.Sequential)]
[StructLayout( LayoutKind.Sequential )]
public unsafe struct GLFWls
{
// This is defined in platform.h
//GLFW_PLATFORM_TLS_STATE
}
[StructLayout(LayoutKind.Sequential)]
[StructLayout( LayoutKind.Sequential )]
public unsafe struct GLFWplatform
{
@@ -812,6 +793,7 @@ namespace StgSharp.Graphics
internal IntPtr setCursorMode;
#region input
/* void (* getCursorPos) (glfwWindow*, double*, double*);
void (* setCursorPos) (glfwWindow*, double, double);
void (* setCursorMode) (glfwWindow*, int);
@@ -878,6 +860,7 @@ namespace StgSharp.Graphics
void (* waitEventsTimeout) (double);
void (* postEmptyEvent) (void);
*/
#endregion
internal IntPtr setCursorPos;
@@ -910,25 +893,24 @@ namespace StgSharp.Graphics
}
[StructLayout(LayoutKind.Sequential)]
[StructLayout( LayoutKind.Sequential )]
public unsafe struct GLFWmutex
{
// This is defined in platform.h
//GLFW_PLATFORM_MUTEX_STATE
}
//public unsafe struct VkAllocationCallbacks { }
[StructLayout(LayoutKind.Sequential)]
[StructLayout( LayoutKind.Sequential )]
internal unsafe struct VkExtensionProperties
{
private fixed byte extensionName[256];
private fixed byte extensionName[ 256 ];
private uint specVersion;
public VkExtensionProperties()
{
}
public VkExtensionProperties() { }
}
@@ -947,14 +929,14 @@ namespace StgSharp.Graphics
}
*/
[StructLayout(LayoutKind.Explicit, Size = 16)]
[StructLayout( LayoutKind.Explicit, Size = 16 )]
public struct uintptr_t
{
[FieldOffset(0)]
[FieldOffset( 0 )]
private long part1;
[FieldOffset(8)]
[FieldOffset( 8 )]
private long part2;
}
@@ -963,7 +945,7 @@ namespace StgSharp.Graphics
#region glad struct
[StructLayout(LayoutKind.Sequential)]
[StructLayout( LayoutKind.Sequential )]
internal struct GLsync
{