daily update on 20240424 by nitloady youmu
This commit is contained in:
@@ -114,7 +114,7 @@ namespace StgSharp.Graphics
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public unsafe struct GLFWvidmode
|
||||
public unsafe struct glfwVideomode
|
||||
{
|
||||
|
||||
/*! The refresh rate, in Hz, of the video mode.
|
||||
@@ -140,7 +140,7 @@ namespace StgSharp.Graphics
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public unsafe struct GLFWgammaramp
|
||||
public unsafe struct glfwGammaramp
|
||||
{
|
||||
|
||||
/*! An array of value describing the response of the blue channel.
|
||||
@@ -166,13 +166,13 @@ namespace StgSharp.Graphics
|
||||
/*! The height, in pixels, of this image.
|
||||
*/
|
||||
private int height;
|
||||
/*! The width, in pixels, of this image.
|
||||
*/
|
||||
private int width;
|
||||
/*! The pixel data of this image, arranged left-to-right, top-to-bottom.
|
||||
*/
|
||||
private byte* pixels;
|
||||
|
||||
/*! The width, in pixels, of this image.
|
||||
*/
|
||||
private int width;
|
||||
|
||||
}
|
||||
|
||||
@@ -210,35 +210,36 @@ namespace StgSharp.Graphics
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public unsafe struct GLFWmonitor
|
||||
public unsafe struct glfwMonitor
|
||||
{
|
||||
|
||||
private GLFWvidmode currentMode;
|
||||
private GLFWgammaramp currentRamp;
|
||||
private fixed byte name[128];
|
||||
private IntPtr userPointer;
|
||||
|
||||
private int width, height;
|
||||
|
||||
private glfwWindow* window;
|
||||
|
||||
private glfwVideomode* modes;
|
||||
private int modeCount;
|
||||
private glfwVideomode currentMode;
|
||||
|
||||
//GLFWvidmode* modes;
|
||||
private IntPtr modes;
|
||||
private glfwGammaramp originalRamp;
|
||||
private glfwGammaramp currentRamp;
|
||||
|
||||
private byte[] name = new byte[128];
|
||||
|
||||
private GLFWgammaramp originalRamp;
|
||||
private void* userPointer;
|
||||
|
||||
// Physical dimensions in millimeters.
|
||||
private int widthMM, heightMM;
|
||||
|
||||
// The window whose video mode is current on this monitor
|
||||
//glfwWindow* window;
|
||||
private IntPtr window;
|
||||
|
||||
// not transformed
|
||||
//GLFW_PLATFORM_MONITOR_STATE;
|
||||
|
||||
public GLFWmonitor()
|
||||
public glfwMonitor()
|
||||
{ }
|
||||
|
||||
public unsafe string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
fixed (byte* cptr = name)
|
||||
{
|
||||
return Marshal.PtrToStringAnsi((IntPtr)cptr);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
@@ -256,7 +257,7 @@ namespace StgSharp.Graphics
|
||||
int shouldClose;
|
||||
void* userPointer;
|
||||
int doublebuffer;
|
||||
// GLFWvidmode videoMode; // 根据GLFWvidmode的定义转换
|
||||
// glfwVideomode videoMode; // 根据GLFWvidmode的定义转换
|
||||
IntPtr monitor; // _GLFWmonitor* monitor;
|
||||
IntPtr cursor; // _GLFWcursor* cursor;
|
||||
|
||||
@@ -819,10 +820,10 @@ namespace StgSharp.Graphics
|
||||
void (* getMonitorPos) (GLFWmonitor*, int*, int*);
|
||||
void (* getMonitorContentScale) (GLFWmonitor*, float*, float*);
|
||||
void (* getMonitorWorkarea) (GLFWmonitor*, int*, int*, int*, int*);
|
||||
GLFWvidmode* (* getVideoModes) (GLFWmonitor*, int*);
|
||||
void (* getVideoMode) (GLFWmonitor*, GLFWvidmode*);
|
||||
GLFWbool(*getGammaRamp)(GLFWmonitor*, GLFWgammaramp*);
|
||||
void (* setGammaRamp) (GLFWmonitor*,const GLFWgammaramp*);
|
||||
glfwVideomode* (* getVideoModes) (GLFWmonitor*, int*);
|
||||
void (* getVideoMode) (GLFWmonitor*, glfwVideomode*);
|
||||
GLFWbool(*getGammaRamp)(GLFWmonitor*, glfwGammaramp*);
|
||||
void (* setGammaRamp) (GLFWmonitor*,const glfwGammaramp*);
|
||||
// window
|
||||
GLFWbool(*createWindow)(glfwWindow*,const GLFWwndconfig*,const GLFWctxconfig*,const GLFWfbconfig*);
|
||||
void (* destroyWindow) (glfwWindow*);
|
||||
|
||||
@@ -74,7 +74,7 @@ namespace StgSharp.Graphics
|
||||
[UnmanagedFunctionPointer(callingConvention: CallingConvention.StdCall, CharSet = CharSet.Ansi)] internal unsafe delegate void glfwGetFramebufferSize(IntPtr window, int* width, int* height);
|
||||
[UnmanagedFunctionPointer(callingConvention: CallingConvention.StdCall, CharSet = CharSet.Ansi)] internal unsafe delegate byte* glfwGetGamepadName(int jid);
|
||||
[UnmanagedFunctionPointer(callingConvention: CallingConvention.StdCall, CharSet = CharSet.Ansi)] internal unsafe delegate int glfwGetGamepadState(int jid, GLFWgamepadstate* state);
|
||||
[UnmanagedFunctionPointer(callingConvention: CallingConvention.StdCall, CharSet = CharSet.Ansi)] internal unsafe delegate GLFWgammaramp* glfwGetGammaRamp(IntPtr monitor);
|
||||
[UnmanagedFunctionPointer(callingConvention: CallingConvention.StdCall, CharSet = CharSet.Ansi)] internal unsafe delegate glfwGammaramp* glfwGetGammaRamp(IntPtr monitor);
|
||||
[UnmanagedFunctionPointer(callingConvention: CallingConvention.StdCall, CharSet = CharSet.Ansi)] internal unsafe delegate int glfwGetInputMode(IntPtr window, int mode);
|
||||
[UnmanagedFunctionPointer(callingConvention: CallingConvention.StdCall, CharSet = CharSet.Ansi)] internal unsafe delegate float* glfwGetJoystickAxes(int jid, int* count);
|
||||
[UnmanagedFunctionPointer(callingConvention: CallingConvention.StdCall, CharSet = CharSet.Ansi)] internal unsafe delegate byte* glfwGetJoystickButtons(int jid, int* count);
|
||||
@@ -101,8 +101,8 @@ namespace StgSharp.Graphics
|
||||
[UnmanagedFunctionPointer(callingConvention: CallingConvention.StdCall, CharSet = CharSet.Ansi)] internal unsafe delegate ulong* glfwGetTimerValue();
|
||||
[UnmanagedFunctionPointer(callingConvention: CallingConvention.StdCall, CharSet = CharSet.Ansi)] internal unsafe delegate void glfwGetVersion(int* major, int* minor, int* rev);
|
||||
[UnmanagedFunctionPointer(callingConvention: CallingConvention.StdCall, CharSet = CharSet.Ansi)] internal unsafe delegate byte* glfwGetVersionString();
|
||||
[UnmanagedFunctionPointer(callingConvention: CallingConvention.StdCall, CharSet = CharSet.Ansi)] internal unsafe delegate GLFWvidmode* glfwGetVideoMode(IntPtr monitor);
|
||||
[UnmanagedFunctionPointer(callingConvention: CallingConvention.StdCall, CharSet = CharSet.Ansi)] internal unsafe delegate GLFWvidmode* glfwGetVideoModes(IntPtr monitor, int* count);
|
||||
[UnmanagedFunctionPointer(callingConvention: CallingConvention.StdCall, CharSet = CharSet.Ansi)] internal unsafe delegate glfwVideomode* glfwGetVideoMode(IntPtr monitor);
|
||||
[UnmanagedFunctionPointer(callingConvention: CallingConvention.StdCall, CharSet = CharSet.Ansi)] internal unsafe delegate glfwVideomode* glfwGetVideoModes(IntPtr monitor, int* count);
|
||||
[UnmanagedFunctionPointer(callingConvention: CallingConvention.StdCall, CharSet = CharSet.Ansi)] internal unsafe delegate int glfwGetWindowAttrib(IntPtr window, int attrib);
|
||||
[UnmanagedFunctionPointer(callingConvention: CallingConvention.StdCall, CharSet = CharSet.Ansi)] internal unsafe delegate void glfwGetWindowContentScale(IntPtr window, float* xscale, float* yscale);
|
||||
[UnmanagedFunctionPointer(callingConvention: CallingConvention.StdCall, CharSet = CharSet.Ansi)] internal unsafe delegate void glfwGetWindowFrameSize(IntPtr window, int* left, int* top, int* right, int* bottom);
|
||||
@@ -135,7 +135,7 @@ namespace StgSharp.Graphics
|
||||
[UnmanagedFunctionPointer(callingConvention: CallingConvention.StdCall, CharSet = CharSet.Ansi)] internal unsafe delegate GLFWerrorfun glfwSetErrorCallback(GLFWerrorfun callback);
|
||||
[UnmanagedFunctionPointer(callingConvention: CallingConvention.StdCall, CharSet = CharSet.Ansi)] internal unsafe delegate FramebuffersizeHandler glfwSetFramebufferSizeCallback(IntPtr window, IntPtr callback);
|
||||
[UnmanagedFunctionPointer(callingConvention: CallingConvention.StdCall, CharSet = CharSet.Ansi)] internal unsafe delegate void glfwSetGamma(IntPtr monitor, float gamma);
|
||||
[UnmanagedFunctionPointer(callingConvention: CallingConvention.StdCall, CharSet = CharSet.Ansi)] internal unsafe delegate void glfwSetGammaRamp(IntPtr monitor, GLFWgammaramp* ramp);
|
||||
[UnmanagedFunctionPointer(callingConvention: CallingConvention.StdCall, CharSet = CharSet.Ansi)] internal unsafe delegate void glfwSetGammaRamp(IntPtr monitor, glfwGammaramp* ramp);
|
||||
[UnmanagedFunctionPointer(callingConvention: CallingConvention.StdCall, CharSet = CharSet.Ansi)] internal unsafe delegate void glfwSetInputMode(IntPtr window, int mode, int value);
|
||||
[UnmanagedFunctionPointer(callingConvention: CallingConvention.StdCall, CharSet = CharSet.Ansi)] internal unsafe delegate GLFWjoystickfun glfwSetJoystickCallback(GLFWjoystickfun callback);
|
||||
[UnmanagedFunctionPointer(callingConvention: CallingConvention.StdCall, CharSet = CharSet.Ansi)] internal unsafe delegate void glfwSetJoystickUserPointer(int jid, void* pointer);
|
||||
|
||||
Reference in New Issue
Block a user