daily update on 20230911 by nitload youmu, uncertain bug of gl api loading
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -13,7 +13,7 @@
|
||||
<FileName>Control\IO\GeometryIO.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="StgSharp.Instruction" Collapsed="true">
|
||||
<Class Name="StgSharp.Controlling" Collapsed="true">
|
||||
<Position X="46.5" Y="1.5" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
@@ -106,21 +106,21 @@
|
||||
<FileName>Logic\Sensor.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="StgSharp.Control.ProgramTimeLine" Collapsed="true">
|
||||
<Class Name="StgSharp.Controlling.ProgramTimeLine" Collapsed="true">
|
||||
<Position X="41.25" Y="2.5" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAACAAAAAAAQAAAAAAAAAAAAEAAAAABAIAAAIAA=</HashCode>
|
||||
<FileName>Control\ProgramTimeLine.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="StgSharp.Control.Remove" Collapsed="true">
|
||||
<Class Name="StgSharp.Controlling.Remove" Collapsed="true">
|
||||
<Position X="43" Y="2.5" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>Control\Remove.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="StgSharp.Control.TimelineBlock" Collapsed="true">
|
||||
<Class Name="StgSharp.Controlling.TimelineBlock" Collapsed="true">
|
||||
<Position X="0.5" Y="1.75" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAA=</HashCode>
|
||||
@@ -318,7 +318,7 @@
|
||||
<FileName>Geometries\PlainGeometry\Square.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Struct Name="StgSharp.Control.GraphicIOPack" Collapsed="true">
|
||||
<Struct Name="StgSharp.Controlling.GraphicIOPack" Collapsed="true">
|
||||
<Position X="48.25" Y="7.75" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAA=</HashCode>
|
||||
@@ -676,7 +676,7 @@
|
||||
<FileName>Logic\Sensor.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Delegate>
|
||||
<Delegate Name="StgSharp.Control.InitWindow" Collapsed="true">
|
||||
<Delegate Name="StgSharp.Controlling.InitWindow" Collapsed="true">
|
||||
<Position X="44.75" Y="13" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAACAAAAAAAAAA=</HashCode>
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
using StgSharp.Control;
|
||||
using StgSharp.Controlling;
|
||||
using StgSharp.Math;
|
||||
using System;
|
||||
|
||||
namespace StgSharp
|
||||
{
|
||||
public static partial class Instruction
|
||||
public static partial class Control
|
||||
{
|
||||
/// <summary>
|
||||
/// Add a pool to timeline controller, and return the instance of the pool.
|
||||
@@ -19,8 +19,8 @@ namespace StgSharp
|
||||
|
||||
public static void AddPool(Pool pool)
|
||||
{
|
||||
TimeLine.allPool.Add(pool);
|
||||
TimeLine._currentPool = pool;
|
||||
StgSharp.Controlling.TimeLine.allPool.Add(pool);
|
||||
StgSharp.Controlling.TimeLine._currentPool = pool;
|
||||
}
|
||||
|
||||
public static void LoadTimeline()
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
namespace StgSharp
|
||||
{
|
||||
|
||||
public static partial class Instruction
|
||||
public static partial class Control
|
||||
{
|
||||
//method used for chaging the value of paameters will be listed here
|
||||
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
using StgSharp.Control;
|
||||
using StgSharp.Controlling;
|
||||
using StgSharp.Graphics;
|
||||
using StgSharp.Logic;
|
||||
using StgSharp.Math;
|
||||
|
||||
namespace StgSharp
|
||||
{
|
||||
public static unsafe partial class Instruction
|
||||
public static unsafe partial class Control
|
||||
{
|
||||
public static LinkedList<T> GetAllActivatedPool<T>() where T:Pool
|
||||
public static LinkedList<T> GetAllActivatedPool<T>() where T : Pool
|
||||
{
|
||||
/**/
|
||||
LinkedList<T> pool = new LinkedList<T>();
|
||||
@@ -47,5 +48,16 @@ namespace StgSharp
|
||||
return ptr;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the status of a certain key on the keyboard.
|
||||
/// </summary>
|
||||
/// <param name="form"></param>
|
||||
/// <param name="key"></param>
|
||||
/// <returns></returns>
|
||||
public static KeyStatus GetKeyStatus(Form form, Key key)
|
||||
{
|
||||
return internalIO.glfwGetKey(form.windowID, (int)key);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,400 @@
|
||||
using StgSharp.Controlling;
|
||||
using StgSharp.Graphics;
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace StgSharp
|
||||
{
|
||||
internal static partial class internalIO
|
||||
{
|
||||
|
||||
[DllImport(SSGC_libname, EntryPoint = "initGL",
|
||||
CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
|
||||
internal static extern unsafe void InternalInitGL(int majorVersion, int minorVersion);
|
||||
|
||||
[DllImport(SSGC_libname, EntryPoint = "initGLAD",
|
||||
CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
|
||||
internal static extern unsafe int InternalInitGLAD();
|
||||
|
||||
|
||||
[DllImport(SSGC_libname, EntryPoint = "glfwGetWindowUserPointer",
|
||||
CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe void* glfwGetWindowUserPointer(GLFWwindow* window);
|
||||
|
||||
[DllImport(SSGC_libname, EntryPoint = "glfwGetMonitorUserPointer", CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe void* glfwGetMonitorUserPointer(GLFWmonitor* monitor);
|
||||
|
||||
[DllImport(SSGC_libname, EntryPoint = "glfwGetJoystickUserPointer", CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe void* glfwGetJoystickUserPointer(int jid);
|
||||
|
||||
[DllImport(SSGC_libname, EntryPoint = "glfwWindowHintString", CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe void glfwWindowHintString(int hint, byte* value);
|
||||
|
||||
[DllImport(SSGC_libname, EntryPoint = "glfwWindowHint", CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe void glfwWindowHint(int hint, int value);
|
||||
|
||||
[DllImport(SSGC_libname, EntryPoint = "glfwWaitEventsTimeout", CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe void glfwWaitEventsTimeout(double timeout);
|
||||
|
||||
[DllImport(SSGC_libname, EntryPoint = "glfwWaitEvents", CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe void glfwWaitEvents();
|
||||
|
||||
[DllImport(SSGC_libname, EntryPoint = "glfwTerminate", CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe void glfwTerminate();
|
||||
|
||||
[DllImport(SSGC_libname, EntryPoint = "glfwSwapInterval", CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe void glfwSwapInterval(int interval);
|
||||
|
||||
//window is the pointer to a glfwwindow instance
|
||||
[DllImport(SSGC_libname, EntryPoint = "glfwSwapBuffers", CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe void glfwSwapBuffers(IntPtr window);
|
||||
|
||||
[DllImport(SSGC_libname, EntryPoint = "glfwShowWindow", CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe void glfwShowWindow(GLFWwindow* window);
|
||||
|
||||
[DllImport(SSGC_libname, EntryPoint = "glfwSetWindowUserPointer", CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe void glfwSetWindowUserPointer(GLFWwindow* window, void* pointer);
|
||||
|
||||
[DllImport(SSGC_libname, EntryPoint = "glfwSetWindowTitle", CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe void glfwSetWindowTitle(GLFWwindow* window, byte* title);
|
||||
|
||||
//window is the pointer of glfwwindow instance
|
||||
[DllImport(SSGC_libname, EntryPoint = "glfwSetWindowSizeLimits", CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe void glfwSetWindowSizeLimits(IntPtr window, int minwidth, int minheight, int maxwidth, int maxheight);
|
||||
|
||||
//window is the pointer of glfwwindow instance
|
||||
[DllImport(SSGC_libname, EntryPoint = "glfwSetWindowSize", CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe void glfwSetWindowSize(IntPtr window, int width, int height);
|
||||
|
||||
//window is the pointer of glfwwindow instance
|
||||
[DllImport(SSGC_libname, EntryPoint = "glfwSetWindowShouldClose", CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe void glfwSetWindowShouldClose(IntPtr window, int value);
|
||||
|
||||
[DllImport(SSGC_libname, EntryPoint = "glfwSetWindowPos", CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe void glfwSetWindowPos(GLFWwindow* window, int xpos, int ypos);
|
||||
|
||||
[DllImport(SSGC_libname, EntryPoint = "glfwSetWindowOpacity", CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe void glfwSetWindowOpacity(GLFWwindow* window, float opacity);
|
||||
|
||||
[DllImport(SSGC_libname, EntryPoint = "glfwSetWindowMonitor", CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe void glfwSetWindowMonitor(GLFWwindow* window, GLFWmonitor* monitor, int xpos, int ypos, int width, int height, int refreshRate);
|
||||
|
||||
[DllImport(SSGC_libname, EntryPoint = "glfwSetWindowIcon", CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe void glfwSetWindowIcon(GLFWwindow* window, int count, GLFWimage* images);
|
||||
|
||||
[DllImport(SSGC_libname, EntryPoint = "glfwSetWindowAttrib", CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe void glfwSetWindowAttrib(GLFWwindow* window, int attrib, int value);
|
||||
|
||||
[DllImport(SSGC_libname, EntryPoint = "glfwSetWindowAspectRatio", CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe void glfwSetWindowAspectRatio(GLFWwindow* window, int numer, int denom);
|
||||
|
||||
[DllImport(SSGC_libname, EntryPoint = "glfwSetTime", CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe void glfwSetTime(double time);
|
||||
|
||||
[DllImport(SSGC_libname, EntryPoint = "glfwSetMonitorUserPointer", CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe void glfwSetMonitorUserPointer(GLFWmonitor* monitor, void* pointer);
|
||||
|
||||
[DllImport(SSGC_libname, EntryPoint = "glfwSetJoystickUserPointer", CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe void glfwSetJoystickUserPointer(int jid, void* pointer);
|
||||
|
||||
[DllImport(SSGC_libname, EntryPoint = "glfwSetInputMode", CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe void glfwSetInputMode(GLFWwindow* window, int mode, int value);
|
||||
|
||||
[DllImport(SSGC_libname, EntryPoint = "glfwSetGammaRamp", CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe void glfwSetGammaRamp(GLFWmonitor* monitor, GLFWgammaramp* ramp);
|
||||
|
||||
[DllImport(SSGC_libname, EntryPoint = "glfwSetGamma", CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe void glfwSetGamma(GLFWmonitor* monitor, float gamma);
|
||||
|
||||
[DllImport(SSGC_libname, EntryPoint = "glfwSetCursorPos", CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe void glfwSetCursorPos(GLFWwindow* window, double xpos, double ypos);
|
||||
|
||||
[DllImport(SSGC_libname, EntryPoint = "glfwSetCursor", CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe void glfwSetCursor(GLFWwindow* window, GLFWcursor* cursor);
|
||||
|
||||
[DllImport(SSGC_libname, EntryPoint = "glfwSetClipboardString", CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe void glfwSetClipboardString(GLFWwindow* window, byte* str);
|
||||
|
||||
[DllImport(SSGC_libname, EntryPoint = "glfwRestoreWindow", CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe void glfwRestoreWindow(GLFWwindow* window);
|
||||
|
||||
[DllImport(SSGC_libname, EntryPoint = "glfwRequestWindowAttention", CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe void glfwRequestWindowAttention(GLFWwindow* window);
|
||||
|
||||
[DllImport(SSGC_libname, EntryPoint = "glfwPostEmptyEvent", CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe void glfwPostEmptyEvent();
|
||||
|
||||
[DllImport(SSGC_libname, EntryPoint = "glfwPollEvents", CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe void glfwPollEvents();
|
||||
|
||||
[DllImport(SSGC_libname, EntryPoint = "glfwMaximizeWindow", CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe void glfwMaximizeWindow(GLFWwindow* window);
|
||||
|
||||
//window is the pointer to a glfwwindow instance
|
||||
[DllImport(SSGC_libname, EntryPoint = "glfwMakeContextCurrent", CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe void glfwMakeContextCurrent(IntPtr window);
|
||||
|
||||
[DllImport(SSGC_libname, EntryPoint = "glfwInitHint", CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe void glfwInitHint(int hint, int value);
|
||||
|
||||
[DllImport(SSGC_libname, EntryPoint = "glfwIconifyWindow", CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe void glfwIconifyWindow(GLFWwindow* window);
|
||||
|
||||
[DllImport(SSGC_libname, EntryPoint = "glfwHideWindow", CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe void glfwHideWindow(GLFWwindow* window);
|
||||
|
||||
[DllImport(SSGC_libname, EntryPoint = "glfwGetWindowSize", CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe void glfwGetWindowSize(GLFWwindow* window, int* width, int* height);
|
||||
|
||||
[DllImport(SSGC_libname, EntryPoint = "glfwGetWindowPos", CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe void glfwGetWindowPos(GLFWwindow* window, int* xpos, int* ypos);
|
||||
|
||||
[DllImport(SSGC_libname, EntryPoint = "glfwGetWindowFrameSize", CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe void glfwGetWindowFrameSize(GLFWwindow* window, int* left, int* top, int* right, int* bottom);
|
||||
|
||||
[DllImport(SSGC_libname, EntryPoint = "glfwGetWindowContentScale", CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe void glfwGetWindowContentScale(GLFWwindow* window, float* xscale, float* yscale);
|
||||
|
||||
[DllImport(SSGC_libname, EntryPoint = "glfwGetVersion", CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe void glfwGetVersion(int* major, int* minor, int* rev);
|
||||
|
||||
[DllImport(SSGC_libname, EntryPoint = "glfwGetMonitorWorkarea", CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe void glfwGetMonitorWorkarea(GLFWmonitor* monitor, int* xpos, int* ypos, int* width, int* height);
|
||||
|
||||
[DllImport(SSGC_libname, EntryPoint = "glfwGetMonitorPos", CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe void glfwGetMonitorPos(GLFWmonitor* monitor, int* xpos, int* ypos);
|
||||
|
||||
[DllImport(SSGC_libname, EntryPoint = "glfwGetMonitorPhysicalSize", CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe void glfwGetMonitorPhysicalSize(GLFWmonitor* monitor, int* widthMM, int* heightMM);
|
||||
|
||||
[DllImport(SSGC_libname, EntryPoint = "glfwGetMonitorContentScale", CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe void glfwGetMonitorContentScale(GLFWmonitor* monitor, float* xscale, float* yscale);
|
||||
|
||||
[DllImport(SSGC_libname, EntryPoint = "glfwGetFramebufferSize", CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe void glfwGetFramebufferSize(GLFWwindow* window, int* width, int* height);
|
||||
|
||||
[DllImport(SSGC_libname, EntryPoint = "glfwGetCursorPos", CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe void glfwGetCursorPos(GLFWwindow* window, double* xpos, double* ypos);
|
||||
|
||||
[DllImport(SSGC_libname, EntryPoint = "glfwFocusWindow", CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe void glfwFocusWindow(GLFWwindow* window);
|
||||
|
||||
[DllImport(SSGC_libname, EntryPoint = "glfwDestroyWindow", CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe void glfwDestroyWindow(GLFWwindow* window);
|
||||
|
||||
[DllImport(SSGC_libname, EntryPoint = "glfwDestroyCursor", CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe void glfwDestroyCursor(GLFWcursor* cursor);
|
||||
|
||||
[DllImport(SSGC_libname, EntryPoint = "glfwDefaultWindowHints", CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe void glfwDefaultWindowHints();
|
||||
|
||||
[DllImport(SSGC_libname, EntryPoint = "glfwGetTimerValue", CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe ulong glfwGetTimerValue();
|
||||
|
||||
[DllImport(SSGC_libname, EntryPoint = "glfwGetTimerFrequency", CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe ulong glfwGetTimerFrequency();
|
||||
|
||||
//window is the pointer to a glfwwindow instance
|
||||
[DllImport(SSGC_libname, EntryPoint = "glfwWindowShouldClose", CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe int glfwWindowShouldClose(IntPtr window);
|
||||
|
||||
[DllImport(SSGC_libname, EntryPoint = "glfwVulkanSupported", CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe int glfwVulkanSupported();
|
||||
|
||||
[DllImport(SSGC_libname, EntryPoint = "glfwUpdateGamepadMappings", CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe int glfwUpdateGamepadMappings(byte* str);
|
||||
|
||||
[DllImport(SSGC_libname, EntryPoint = "glfwRawMouseMotionSupported", CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe int glfwRawMouseMotionSupported();
|
||||
|
||||
[DllImport(SSGC_libname, EntryPoint = "glfwJoystickPresent", CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe int glfwJoystickPresent(int jid);
|
||||
|
||||
[DllImport(SSGC_libname, EntryPoint = "glfwJoystickIsGamepad", CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe int glfwJoystickIsGamepad(int jid);
|
||||
|
||||
[DllImport(SSGC_libname, EntryPoint = "glfwGetWindowAttrib", CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe int glfwGetWindowAttrib(GLFWwindow* window, int attrib);
|
||||
|
||||
[DllImport(SSGC_libname, EntryPoint = "glfwGetMouseButton", CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe int glfwGetMouseButton(GLFWwindow* window, int button);
|
||||
|
||||
[DllImport(SSGC_libname, EntryPoint = "glfwGetKeyScancode", CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe int glfwGetKeyScancode(int key);
|
||||
|
||||
|
||||
//window is the pointer to GLFWwindow instance
|
||||
[DllImport(SSGC_libname, EntryPoint = "glfwGetKey", CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern KeyStatus glfwGetKey(IntPtr window, int key);
|
||||
|
||||
[DllImport(SSGC_libname, EntryPoint = "glfwGetInputMode", CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe int glfwGetInputMode(GLFWwindow* window, int mode);
|
||||
|
||||
[DllImport(SSGC_libname, EntryPoint = "glfwGetGamepadState", CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe int glfwGetGamepadState(int jid, GLFWgamepadstate* state);
|
||||
|
||||
[DllImport(SSGC_libname, EntryPoint = "glfwGetError", CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe int glfwGetError(byte** description);
|
||||
|
||||
[DllImport(SSGC_libname, EntryPoint = "glfwExtensionSupported", CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe int glfwExtensionSupported(byte* extension);
|
||||
|
||||
[DllImport(SSGC_libname, EntryPoint = "glfwSetWindowSizeCallback", CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe GLFWwindowsizefun glfwSetWindowSizeCallback(GLFWwindow* window, GLFWwindowsizefun callback);
|
||||
|
||||
[DllImport(SSGC_libname, EntryPoint = "glfwSetWindowRefreshCallback", CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe GLFWwindowrefreshfun glfwSetWindowRefreshCallback(GLFWwindow* window, GLFWwindowrefreshfun callback);
|
||||
|
||||
[DllImport(SSGC_libname, EntryPoint = "glfwSetWindowPosCallback", CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe GLFWwindowposfun glfwSetWindowPosCallback(GLFWwindow* window, GLFWwindowposfun callback);
|
||||
|
||||
[DllImport(SSGC_libname, EntryPoint = "glfwSetWindowMaximizeCallback", CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe GLFWwindowmaximizefun glfwSetWindowMaximizeCallback(GLFWwindow* window, GLFWwindowmaximizefun callback);
|
||||
|
||||
[DllImport(SSGC_libname, EntryPoint = "glfwSetWindowIconifyCallback", CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe GLFWwindowiconifyfun glfwSetWindowIconifyCallback(GLFWwindow* window, GLFWwindowiconifyfun callback);
|
||||
|
||||
[DllImport(SSGC_libname, EntryPoint = "glfwSetWindowFocusCallback", CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe GLFWwindowfocusfun glfwSetWindowFocusCallback(GLFWwindow* window, GLFWwindowfocusfun callback);
|
||||
|
||||
[DllImport(SSGC_libname, EntryPoint = "glfwSetWindowContentScaleCallback", CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe GLFWwindowcontentscalefun glfwSetWindowContentScaleCallback(GLFWwindow* window, GLFWwindowcontentscalefun callback);
|
||||
|
||||
[DllImport(SSGC_libname, EntryPoint = "glfwSetWindowCloseCallback", CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe GLFWwindowclosefun glfwSetWindowCloseCallback(GLFWwindow* window, GLFWwindowclosefun callback);
|
||||
|
||||
[DllImport(SSGC_libname, EntryPoint = "glfwGetCurrentContext", CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe GLFWwindow* glfwGetCurrentContext();
|
||||
|
||||
//monitor and share are pointers to instance of glfwmonitor and glfwwindow
|
||||
//the method returns a pointer to glfw window instance
|
||||
[DllImport(SSGC_libname, EntryPoint = "glfwCreateWindow", CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe IntPtr glfwCreateWindow(
|
||||
int width, int height, byte[] title, IntPtr monitor, IntPtr share);
|
||||
|
||||
[DllImport(SSGC_libname, EntryPoint = "glfwSetScrollCallback", CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe GLFWscrollfun glfwSetScrollCallback(GLFWwindow* window, GLFWscrollfun callback);
|
||||
|
||||
[DllImport(SSGC_libname, EntryPoint = "glfwSetMouseButtonCallback",
|
||||
CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe GLFWmousebuttonfun glfwSetMouseButtonCallback(GLFWwindow* window, GLFWmousebuttonfun callback);
|
||||
|
||||
[DllImport(SSGC_libname, EntryPoint = "glfwSetMonitorCallback",
|
||||
CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe GLFWmonitorfun glfwSetMonitorCallback(GLFWmonitorfun callback);
|
||||
|
||||
[DllImport(SSGC_libname, EntryPoint = "glfwGetMonitors",
|
||||
CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe GLFWmonitor** glfwGetMonitors(int* count);
|
||||
|
||||
[DllImport(SSGC_libname, EntryPoint = "glfwGetWindowMonitor",
|
||||
CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe GLFWmonitor* glfwGetWindowMonitor(GLFWwindow* window);
|
||||
|
||||
[DllImport(SSGC_libname, EntryPoint = "glfwGetPrimaryMonitor",
|
||||
CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe GLFWmonitor* glfwGetPrimaryMonitor();
|
||||
|
||||
[DllImport(SSGC_libname, EntryPoint = "glfwSetKeyCallback",
|
||||
CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe GLFWkeyfun glfwSetKeyCallback(GLFWwindow* window, GLFWkeyfun callback);
|
||||
|
||||
[DllImport(SSGC_libname, EntryPoint = "glfwSetJoystickCallback",
|
||||
CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe GLFWjoystickfun glfwSetJoystickCallback(GLFWjoystickfun callback);
|
||||
|
||||
[DllImport(SSGC_libname, EntryPoint = "glfwGetProcAddress",
|
||||
CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
|
||||
internal static extern unsafe IntPtr glfwGetProcAddress(string procName);
|
||||
|
||||
//window is the pointer to a glfwwindow instance
|
||||
[DllImport(SSGC_libname, EntryPoint = "glfwSetFramebufferSizeCallback",
|
||||
CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe GLFWframebuffersizefun glfwSetFramebufferSizeCallback(IntPtr window, GLFWframebuffersizefun callback);
|
||||
|
||||
[DllImport(SSGC_libname, EntryPoint = "glfwSetErrorCallback",
|
||||
CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe GLFWerrorfun glfwSetErrorCallback(GLFWerrorfun callback);
|
||||
|
||||
[DllImport(SSGC_libname, EntryPoint = "glfwSetDropCallback",
|
||||
CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe GLFWdropfun glfwSetDropCallback(GLFWwindow* window, GLFWdropfun callback);
|
||||
|
||||
[DllImport(SSGC_libname, EntryPoint = "glfwSetCursorPosCallback",
|
||||
CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe GLFWcursorposfun glfwSetCursorPosCallback(GLFWwindow* window, GLFWcursorposfun callback);
|
||||
|
||||
[DllImport(SSGC_libname, EntryPoint = "glfwSetCursorEnterCallback",
|
||||
CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe GLFWcursorenterfun glfwSetCursorEnterCallback(GLFWwindow* window, GLFWcursorenterfun callback);
|
||||
|
||||
[DllImport(SSGC_libname, EntryPoint = "glfwCreateStandardCursor",
|
||||
CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe GLFWcursor* glfwCreateStandardCursor(int shape);
|
||||
|
||||
[DllImport(SSGC_libname, EntryPoint = "glfwCreateCursor",
|
||||
CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe GLFWcursor* glfwCreateCursor(GLFWimage* image, int xhot, int yhot);
|
||||
|
||||
[DllImport(SSGC_libname, EntryPoint = "glfwSetCharModsCallback", CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe GLFWcharmodsfun glfwSetCharModsCallback(GLFWwindow* window, GLFWcharmodsfun callback);
|
||||
|
||||
[DllImport(SSGC_libname, EntryPoint = "glfwSetCharCallback",
|
||||
CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe GLFWcharfun glfwSetCharCallback(GLFWwindow* window, GLFWcharfun callback);
|
||||
|
||||
[DllImport(SSGC_libname, EntryPoint = "glfwGetWindowOpacity",
|
||||
CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe float glfwGetWindowOpacity(GLFWwindow* window);
|
||||
|
||||
[DllImport(SSGC_libname, EntryPoint = "glfwGetTime",
|
||||
CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe double glfwGetTime();
|
||||
|
||||
[DllImport(SSGC_libname, EntryPoint = "unsigned", CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe byte* glfwGetJoystickHats(int jid, int* count);
|
||||
|
||||
[DllImport(SSGC_libname, EntryPoint = "unsigned", CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe byte* glfwGetJoystickButtons(int jid, int* count);
|
||||
|
||||
[DllImport(SSGC_libname, EntryPoint = "GLFWvidmode*", CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe GLFWvidmode* glfwGetVideoModes(GLFWmonitor* monitor, int* count);
|
||||
|
||||
[DllImport(SSGC_libname, EntryPoint = "GLFWvidmode*", CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe GLFWvidmode* glfwGetVideoMode(GLFWmonitor* monitor);
|
||||
|
||||
[DllImport(SSGC_libname, EntryPoint = "GLFWgammaramp*", CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe GLFWgammaramp* glfwGetGammaRamp(GLFWmonitor* monitor);
|
||||
|
||||
[DllImport(SSGC_libname, EntryPoint = "float*", CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe float* glfwGetJoystickAxes(int jid, int* count);
|
||||
|
||||
[DllImport(SSGC_libname, EntryPoint = "byte**", CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe byte** glfwGetRequiredInstanceExtensions(uint* count);
|
||||
|
||||
[DllImport(SSGC_libname, EntryPoint = "byte*", CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe byte* glfwGetVersionString();
|
||||
|
||||
[DllImport(SSGC_libname, EntryPoint = "byte*", CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe byte* glfwGetMonitorName(GLFWmonitor* monitor);
|
||||
|
||||
[DllImport(SSGC_libname, EntryPoint = "byte*", CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe byte* glfwGetKeyName(int key, int scancode);
|
||||
|
||||
[DllImport(SSGC_libname, EntryPoint = "byte*", CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe byte* glfwGetJoystickName(int jid);
|
||||
|
||||
[DllImport(SSGC_libname, EntryPoint = "byte*", CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe byte* glfwGetJoystickGUID(int jid);
|
||||
|
||||
[DllImport(SSGC_libname, EntryPoint = "byte*", CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe byte* glfwGetGamepadName(int jid);
|
||||
|
||||
[DllImport(SSGC_libname, EntryPoint = "byte*", CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe byte* glfwGetClipboardString(GLFWwindow* window);
|
||||
|
||||
|
||||
|
||||
//
|
||||
}
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
using StgSharp.Control;
|
||||
using StgSharp.Graphics;
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace StgSharp
|
||||
{
|
||||
internal static partial class internalIO
|
||||
{
|
||||
[DllImport("StgSharpGraphic",EntryPoint = "loadGLApi",
|
||||
CallingConvention = CallingConvention.Cdecl,CharSet =CharSet.Ansi)]
|
||||
internal static extern GraphicIOPack InternalInitGraphicApi();
|
||||
|
||||
[DllImport("StgSharpGraphic",EntryPoint = "initGL",
|
||||
CallingConvention = CallingConvention.Cdecl,CharSet = CharSet.Ansi)]
|
||||
internal static extern unsafe void InternalInitGL();
|
||||
|
||||
[DllImport("StgSharpGraphic",EntryPoint = "initGLAD",
|
||||
CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
|
||||
internal static extern unsafe int InternalInitGLAD();
|
||||
|
||||
|
||||
//
|
||||
}
|
||||
}
|
||||
@@ -1,48 +0,0 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace StgSharp.Control
|
||||
{
|
||||
|
||||
//these are gl functions used to create a window
|
||||
internal delegate void InternalInitGLDelegate();
|
||||
internal delegate IntPtr InternalGLcreateWindowDelegate
|
||||
(int width, int height, byte[] tittle, IntPtr monitor, IntPtr share);
|
||||
internal delegate void InternalGLmakeContextCurrent(IntPtr window);
|
||||
internal delegate void InternalGLswapInterval(int interval);
|
||||
internal delegate void InternalGLclearColorDelegate
|
||||
(float red, float green, float blue, float alpha);
|
||||
internal delegate GLFWproc internalglGetProcAddress(char[] name);
|
||||
internal delegate int internalGLADloadGLloader(InternalGLADloadproc load);
|
||||
internal delegate int InternalGLwindowShouldClose(IntPtr window);
|
||||
internal delegate void InternalGLswapBuffers(IntPtr window);
|
||||
|
||||
|
||||
//these are gl functions used to set a callback
|
||||
internal delegate FrameBufferSizeCallback InternalsetBufferSizeCallback(IntPtr window, FrameBufferSizeCallback callback);
|
||||
|
||||
|
||||
///
|
||||
internal delegate void GLFWproc();
|
||||
internal unsafe delegate void* InternalGLADloadproc(byte[] name);
|
||||
|
||||
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
internal struct GraphicIOPack
|
||||
{
|
||||
//these are gl functions used to create a window
|
||||
internal InternalGLcreateWindowDelegate internalGLcreateWindow;
|
||||
internal InternalGLmakeContextCurrent internalGLmakeContextCurrent;
|
||||
internal InternalGLswapInterval internalGLswapInterval;
|
||||
internal InternalGLclearColorDelegate internalGLclearColor;
|
||||
internal InternalGLwindowShouldClose internalGLwindowShouldClose;
|
||||
internal InternalGLswapBuffers internalGLswapBuffers;
|
||||
|
||||
|
||||
|
||||
//these are gl functions used to set a callback
|
||||
|
||||
internal InternalsetBufferSizeCallback internalGLsetBufferSize;
|
||||
}
|
||||
}
|
||||
@@ -18,6 +18,8 @@ namespace StgSharp
|
||||
internal static unsafe partial class internalIO
|
||||
{
|
||||
|
||||
internal const string SSGC_libname =
|
||||
"StgSharpGraphic";
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,175 @@
|
||||
namespace StgSharp
|
||||
{
|
||||
public static partial class Control
|
||||
{
|
||||
public enum Key : int
|
||||
{
|
||||
UNKNOWN = -1,
|
||||
SPACE = 32,
|
||||
APOSTROPHE = 39/*'*/,
|
||||
COMMA = 44/*,*/,
|
||||
MINUS = 45/*-*/,
|
||||
PERIOD = 46/*.*/,
|
||||
SLASH = 47/*/*/,
|
||||
ZERO = 48,
|
||||
ONE = 49,
|
||||
TWO = 50,
|
||||
THREE = 51,
|
||||
FOUR = 52,
|
||||
FIVE = 53,
|
||||
SIX = 54,
|
||||
SEVEN = 55,
|
||||
EIGHT = 56,
|
||||
NINE = 57,
|
||||
SEMICOLON = 59/*,*/,
|
||||
EQUAL = 61/*=*/,
|
||||
A = 65,
|
||||
B = 66,
|
||||
C = 67,
|
||||
D = 68,
|
||||
E = 69,
|
||||
F = 70,
|
||||
G = 71,
|
||||
H = 72,
|
||||
I = 73,
|
||||
J = 74,
|
||||
K = 75,
|
||||
L = 76,
|
||||
M = 77,
|
||||
N = 78,
|
||||
O = 79,
|
||||
P = 80,
|
||||
Q = 81,
|
||||
R = 82,
|
||||
S = 83,
|
||||
T = 84,
|
||||
U = 85,
|
||||
V = 86,
|
||||
W = 87,
|
||||
X = 88,
|
||||
Y = 89,
|
||||
Z = 90,
|
||||
LEFT_BRACKET = 91/*[*/,
|
||||
BACKSLASH = 92/*\*/,
|
||||
RIGHT_BRACKET = 93/*]*/,
|
||||
GRAVE_ACCENT = 96/*`*/,
|
||||
WORLD_1 = 161/*non-US#1*/,
|
||||
WORLD_2 = 162/*non-US#2*/,
|
||||
ESCAPE = 256,
|
||||
ENTER = 257,
|
||||
TAB = 258,
|
||||
BACKSPACE = 259,
|
||||
INSERT = 260,
|
||||
DELETE = 261,
|
||||
RIGHT = 262,
|
||||
LEFT = 263,
|
||||
DOWN = 264,
|
||||
UP = 265,
|
||||
PAGE_UP = 266,
|
||||
PAGE_DOWN = 267,
|
||||
HOME = 268,
|
||||
END = 269,
|
||||
CAPS_LOCK = 280,
|
||||
SCROLL_LOCK = 281,
|
||||
NUM_LOCK = 282,
|
||||
PRINT_SCREEN = 283,
|
||||
PAUSE = 284,
|
||||
F1 = 290,
|
||||
F2 = 291,
|
||||
F3 = 292,
|
||||
F4 = 293,
|
||||
F5 = 294,
|
||||
F6 = 295,
|
||||
F7 = 296,
|
||||
F8 = 297,
|
||||
F9 = 298,
|
||||
F10 = 299,
|
||||
F11 = 300,
|
||||
F12 = 301,
|
||||
F13 = 302,
|
||||
F14 = 303,
|
||||
F15 = 304,
|
||||
F16 = 305,
|
||||
F17 = 306,
|
||||
F18 = 307,
|
||||
F19 = 308,
|
||||
F20 = 309,
|
||||
F21 = 310,
|
||||
F22 = 311,
|
||||
F23 = 312,
|
||||
F24 = 313,
|
||||
F25 = 314,
|
||||
KP_0 = 320,
|
||||
KP_1 = 321,
|
||||
KP_2 = 322,
|
||||
KP_3 = 323,
|
||||
KP_4 = 324,
|
||||
KP_5 = 325,
|
||||
KP_6 = 326,
|
||||
KP_7 = 327,
|
||||
KP_8 = 328,
|
||||
KP_9 = 329,
|
||||
KP_DECIMAL = 330,
|
||||
KP_DIVIDE = 331,
|
||||
KP_MULTIPLY = 332,
|
||||
KP_SUBTRACT = 333,
|
||||
KP_ADD = 334,
|
||||
KP_ENTER = 335,
|
||||
KP_EQUAL = 336,
|
||||
LEFT_SHIFT = 340,
|
||||
LEFT_CONTROL = 341,
|
||||
LEFT_ALT = 342,
|
||||
LEFT_SUPER = 343,
|
||||
RIGHT_SHIFT = 344,
|
||||
RIGHT_CONTROL = 345,
|
||||
RIGHT_ALT = 346,
|
||||
RIGHT_SUPER = 347,
|
||||
MENU = 348
|
||||
}
|
||||
|
||||
public enum Joystick:int
|
||||
{
|
||||
JOYSTICK_1 = 0,
|
||||
JOYSTICK_2 = 1,
|
||||
JOYSTICK_3 = 2,
|
||||
JOYSTICK_4 = 3,
|
||||
JOYSTICK_5 = 4,
|
||||
JOYSTICK_6 = 5,
|
||||
JOYSTICK_7 = 6,
|
||||
JOYSTICK_8 = 7,
|
||||
JOYSTICK_9 = 8,
|
||||
JOYSTICK_10 = 9,
|
||||
JOYSTICK_11 = 10,
|
||||
JOYSTICK_12 = 11,
|
||||
JOYSTICK_13 = 12,
|
||||
JOYSTICK_14 = 13,
|
||||
JOYSTICK_15 = 14,
|
||||
JOYSTICK_16 = 15,
|
||||
JOYSTICK_LAST = JOYSTICK_16
|
||||
}
|
||||
|
||||
public enum Mouse : int
|
||||
{
|
||||
BUTTON_1 = 0,
|
||||
BUTTON_2 = 1,
|
||||
BUTTON_3 = 2,
|
||||
BUTTON_4 = 3,
|
||||
BUTTON_5 = 4,
|
||||
BUTTON_6 = 5,
|
||||
BUTTON_7 = 6,
|
||||
BUTTON_8 = 7,
|
||||
BUTTON_LAST = BUTTON_8,
|
||||
BUTTON_LEFT = BUTTON_1,
|
||||
BUTTON_RIGHT = BUTTON_2,
|
||||
BUTTON_MIDDLE = BUTTON_3
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
public enum KeyStatus : int
|
||||
{
|
||||
RELEASE = 0,
|
||||
PRESS = 1
|
||||
}
|
||||
}
|
||||
@@ -3,9 +3,9 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace StgSharp.Control
|
||||
namespace StgSharp.Controlling
|
||||
{
|
||||
public static partial class Instruction
|
||||
public static partial class Control
|
||||
{
|
||||
public static unsafe void RecycleMappedVec(Vec4d vec)
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using StgSharp.Geometries;
|
||||
|
||||
namespace StgSharp.Control
|
||||
namespace StgSharp.Controlling
|
||||
{
|
||||
public static class Remove
|
||||
{
|
||||
|
||||
@@ -3,7 +3,7 @@ using StgSharp.Graphics;
|
||||
using System;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
|
||||
namespace StgSharp.Control
|
||||
namespace StgSharp.Controlling
|
||||
{
|
||||
public static partial class TimeLine
|
||||
{
|
||||
@@ -23,10 +23,8 @@ namespace StgSharp.Control
|
||||
|
||||
static unsafe TimeLine()
|
||||
{
|
||||
|
||||
allForm = new LinkedList<Form>();
|
||||
allPool = new LinkedList<Pool>();
|
||||
internalIO.InternalInitGL();
|
||||
}
|
||||
|
||||
public static TimelineBlock CurrentOperation
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace StgSharp.Control
|
||||
namespace StgSharp.Controlling
|
||||
{
|
||||
public abstract class TimelineBlock
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using StgSharp.Control;
|
||||
using StgSharp.Controlling;
|
||||
using System;
|
||||
|
||||
namespace StgSharp.Entities
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using StgSharp.Control;
|
||||
using StgSharp.Controlling;
|
||||
|
||||
namespace StgSharp.Entities
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using StgSharp.Control;
|
||||
using StgSharp.Controlling;
|
||||
using StgSharp.Math;
|
||||
|
||||
namespace StgSharp.Geometries
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using StgSharp.Control;
|
||||
using StgSharp.Controlling;
|
||||
using StgSharp.Math;
|
||||
|
||||
namespace StgSharp.Geometries
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using StgSharp.Control;
|
||||
using StgSharp.Controlling;
|
||||
using StgSharp.Math;
|
||||
|
||||
namespace StgSharp.Geometries
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using StgSharp.Control;
|
||||
using StgSharp.Controlling;
|
||||
using StgSharp.Math;
|
||||
|
||||
namespace StgSharp.Geometries
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using StgSharp.Control;
|
||||
using StgSharp.Controlling;
|
||||
using StgSharp.Math;
|
||||
|
||||
namespace StgSharp.Geometries
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace StgSharp.Graphics
|
||||
public unsafe class Form
|
||||
{
|
||||
|
||||
internal long windowID; //pointer to the form
|
||||
internal IntPtr windowID; //pointer to the form
|
||||
internal formInfo info = new formInfo() ;
|
||||
internal IntPtr shader;
|
||||
internal LinkedList<Pool> allControl;
|
||||
|
||||
@@ -354,7 +354,7 @@ namespace StgSharp.Graphics
|
||||
internal const uint _GLFW_POLL_BUTTONS = 2;
|
||||
internal const uint _GLFW_POLL_ALL = (_GLFW_POLL_AXES | _GLFW_POLL_BUTTONS);
|
||||
internal const uint _GLFW_MESSAGE_SIZE = 1024;
|
||||
internal const uint GL_VERSION = 0x1f02;
|
||||
internal const int GL_VERSION = 0x1f02;
|
||||
internal const uint GL_NONE = 0;
|
||||
internal const uint GL_COLOR_BUFFER_BIT = 0x00004000;
|
||||
internal const uint GL_UNSIGNED_BYTE = 0x1401;
|
||||
|
||||
@@ -8,6 +8,7 @@ namespace StgSharp.Graphics
|
||||
using GLFWbool = Boolean;
|
||||
|
||||
//strucs defined in glfw3.h
|
||||
#region glfw3 struct
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public unsafe struct GLFWcontext
|
||||
@@ -31,8 +32,8 @@ namespace StgSharp.Graphics
|
||||
void (* makeCurrent) (_GLFWwindow*);
|
||||
void (* swapBuffers) (_GLFWwindow*);
|
||||
void (* swapInterval) (int);
|
||||
int (* extensionSupported) (const char*);
|
||||
GLFWglproc(*getProcAddress)(const char*);
|
||||
int (* extensionSupported) (const byte*);
|
||||
GLFWglproc(*getProcAddress)(const byte*);
|
||||
void (* destroy) (_GLFWwindow*);
|
||||
*/
|
||||
|
||||
@@ -159,7 +160,7 @@ namespace StgSharp.Graphics
|
||||
public unsafe struct GLFWmonitor
|
||||
{
|
||||
|
||||
char[] name = new char[128];
|
||||
byte[] name = new byte[128];
|
||||
void* userPointer;
|
||||
|
||||
// Physical dimensions in millimeters.
|
||||
@@ -210,8 +211,10 @@ namespace StgSharp.Graphics
|
||||
public bool stickyMouseButtons = false;
|
||||
public bool lockKeyMods = false;
|
||||
public int cursorMode = 0;
|
||||
public char[] mouseButtons = new char[8];
|
||||
public char[] keys = new char[349];
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)]
|
||||
public byte[] mouseButtons = new byte[8];
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 349)]
|
||||
public byte[] keys = new byte[349];
|
||||
// Virtual cursor position when cursor is disabled
|
||||
public double virtualCursorPosX = 0, virtualCursorPosY = 0;
|
||||
public bool rawMouseMotion = false;
|
||||
@@ -242,7 +245,8 @@ namespace StgSharp.Graphics
|
||||
//_GLFWerror* next;
|
||||
IntPtr next;
|
||||
int code;
|
||||
char[] description = new char[GLFW._GLFW_MESSAGE_SIZE];
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = (int)GLFW._GLFW_MESSAGE_SIZE)]
|
||||
byte[] description = new byte[GLFW._GLFW_MESSAGE_SIZE];
|
||||
|
||||
public GLFWerror()
|
||||
{
|
||||
@@ -281,7 +285,7 @@ namespace StgSharp.Graphics
|
||||
int ypos;
|
||||
int width;
|
||||
int height;
|
||||
char* title;
|
||||
byte* title;
|
||||
GLFWbool resizable;
|
||||
GLFWbool visible;
|
||||
GLFWbool decorated;
|
||||
@@ -296,7 +300,8 @@ namespace StgSharp.Graphics
|
||||
internal struct Ns
|
||||
{
|
||||
GLFWbool retina = false;
|
||||
char[] frameName = new char[256];
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 256)]
|
||||
byte[] frameName = new byte[256];
|
||||
|
||||
public Ns()
|
||||
{
|
||||
@@ -306,8 +311,10 @@ namespace StgSharp.Graphics
|
||||
|
||||
internal struct X11
|
||||
{
|
||||
char[] className = new char[256];
|
||||
char[] instanceName = new char[256];
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 256)]
|
||||
byte[] className = new byte[256];
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 256)]
|
||||
byte[] instanceName = new byte[256];
|
||||
|
||||
public X11()
|
||||
{
|
||||
@@ -323,7 +330,8 @@ namespace StgSharp.Graphics
|
||||
|
||||
internal struct Wl
|
||||
{
|
||||
char[] appId = new char[256];
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 256)]
|
||||
byte[] appId = new byte[256];
|
||||
|
||||
public Wl()
|
||||
{
|
||||
@@ -416,6 +424,7 @@ namespace StgSharp.Graphics
|
||||
|
||||
|
||||
GLFWbool joysticksInitialized;
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = GLFW.GLFW_JOYSTICK_LAST + 1)]
|
||||
_GLFWjoystick[] joysticks = new _GLFWjoystick[GLFW.GLFW_JOYSTICK_LAST + 1];
|
||||
//_GLFWmapping* mappings;
|
||||
IntPtr mappings;
|
||||
@@ -501,7 +510,8 @@ namespace StgSharp.Graphics
|
||||
{
|
||||
GLFWbool available;
|
||||
void* handle;
|
||||
char*[] extensions = new char*[2];
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 2)]
|
||||
byte*[] extensions = new byte*[2];
|
||||
IntPtr GetInstanceProcAddr;
|
||||
GLFWbool KHR_surface;
|
||||
GLFWbool KHR_win32_surface;
|
||||
@@ -543,9 +553,13 @@ namespace StgSharp.Graphics
|
||||
public unsafe struct _GLFWmapping
|
||||
{
|
||||
|
||||
char[] name = new char[128];
|
||||
char[] guid = new char[33];
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 128)]
|
||||
byte[] name = new byte[128];
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 33)]
|
||||
byte[] guid = new byte[33];
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 15)]
|
||||
_GLFWmapelement[] buttons = new _GLFWmapelement[15];
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 6)]
|
||||
_GLFWmapelement[] axes = new _GLFWmapelement[6];
|
||||
|
||||
public _GLFWmapping() { }
|
||||
@@ -563,9 +577,11 @@ namespace StgSharp.Graphics
|
||||
int buttonCount;
|
||||
byte* hats;
|
||||
int hatCount;
|
||||
char[] name = new char[128];
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 128)]
|
||||
byte[] name = new byte[128];
|
||||
void* userPointer;
|
||||
char[] guid = new char[33];
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 33)]
|
||||
byte[] guid = new byte[33];
|
||||
//_GLFWmapping* mapping;
|
||||
IntPtr mapping;
|
||||
|
||||
@@ -605,15 +621,15 @@ namespace StgSharp.Graphics
|
||||
GLFWbool(*createStandardCursor)(_GLFWcursor*, int);
|
||||
void (* destroyCursor) (_GLFWcursor*);
|
||||
void (* setCursor) (_GLFWwindow*, _GLFWcursor*);
|
||||
const char* (*getScancodeName)(int);
|
||||
const byte* (*getScancodeName)(int);
|
||||
int (* getKeyScancode) (int);
|
||||
void (* setClipboardString) (const char*);
|
||||
const char* (*getClipboardString)(void);
|
||||
void (* setClipboardString) (const byte*);
|
||||
const byte* (*getClipboardString)(void);
|
||||
GLFWbool(*initJoysticks)(void);
|
||||
void (* terminateJoysticks) (void);
|
||||
GLFWbool(*pollJoystick)(_GLFWjoystick*, int);
|
||||
const char* (*getMappingName)(void);
|
||||
void (* updateGamepadGUID) (char*);
|
||||
const byte* (*getMappingName)(void);
|
||||
void (* updateGamepadGUID) (byte*);
|
||||
// monitor
|
||||
void (* freeMonitor) (_GLFWmonitor*);
|
||||
void (* getMonitorPos) (_GLFWmonitor*, int*, int*);
|
||||
@@ -626,7 +642,7 @@ namespace StgSharp.Graphics
|
||||
// window
|
||||
GLFWbool(*createWindow)(_GLFWwindow*,const _GLFWwndconfig*,const _GLFWctxconfig*,const _GLFWfbconfig*);
|
||||
void (* destroyWindow) (_GLFWwindow*);
|
||||
void (* setWindowTitle) (_GLFWwindow*,const char*);
|
||||
void (* setWindowTitle) (_GLFWwindow*,const byte*);
|
||||
void (* setWindowIcon) (_GLFWwindow*, int,const GLFWimage*);
|
||||
void (* getWindowPos) (_GLFWwindow*, int*, int*);
|
||||
void (* setWindowPos) (_GLFWwindow*, int, int);
|
||||
@@ -739,7 +755,7 @@ namespace StgSharp.Graphics
|
||||
|
||||
|
||||
// vulkan
|
||||
//void (* getRequiredInstanceExtensions) (char**);
|
||||
//void (* getRequiredInstanceExtensions) (byte**);
|
||||
//GLFWbool(*getPhysicalDevicePresentationSupport)(VkInstance, VkPhysicalDevice, uint32_t);
|
||||
//VkResult(*createWindowSurface)(VkInstance, _GLFWwindow*,const VkAllocationCallbacks*, VkSurfaceKHR*);
|
||||
internal IntPtr getRequiredInstanceExtensions;
|
||||
@@ -760,7 +776,8 @@ namespace StgSharp.Graphics
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
internal unsafe struct VkExtensionProperties
|
||||
{
|
||||
char[] extensionName = new char[256];
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 256)]
|
||||
byte[] extensionName = new byte[256];
|
||||
uint specVersion;
|
||||
|
||||
public VkExtensionProperties()
|
||||
@@ -773,7 +790,8 @@ namespace StgSharp.Graphics
|
||||
{
|
||||
IntPtr next;
|
||||
int code;
|
||||
char[] description = new char[1024];
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 1024)]
|
||||
byte[] description = new byte[1024];
|
||||
|
||||
public _GLFWerror()
|
||||
{
|
||||
@@ -789,8 +807,17 @@ namespace StgSharp.Graphics
|
||||
[FieldOffset(8)]
|
||||
long part2;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region glad struct
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
internal struct GLsync
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
using StgSharp.Control;
|
||||
using StgSharp.Controlling;
|
||||
using StgSharp.Graphics;
|
||||
using StgSharp.Math;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
|
||||
namespace StgSharp
|
||||
@@ -21,22 +22,24 @@ namespace StgSharp
|
||||
/// <param name="share"></param>
|
||||
/// <returns>The instance of created form</returns>
|
||||
/// <exception cref="Exception"></exception>
|
||||
public static unsafe Form GLcreateWindow(int width, int height, byte[] tittle, IntPtr monitor, Form share)
|
||||
public static unsafe Form GLcreateWindow(
|
||||
int width, int height, string tittle, IntPtr monitor, Form share)
|
||||
{
|
||||
byte[] tittleBytes = Encoding.UTF8.GetBytes(tittle);
|
||||
IntPtr windowPtr;
|
||||
if (share == null)
|
||||
{
|
||||
windowPtr = glIO.internalGLcreateWindow(
|
||||
width, height, tittle, monitor, (IntPtr)0);
|
||||
windowPtr = internalIO.glfwCreateWindow(
|
||||
800, 600, tittleBytes, monitor, IntPtr.Zero);
|
||||
}
|
||||
else
|
||||
{
|
||||
windowPtr = glIO.internalGLcreateWindow(
|
||||
width, height, tittle, monitor, (IntPtr)share.windowID);
|
||||
windowPtr = internalIO.glfwCreateWindow(
|
||||
width, height, tittleBytes, monitor, share.windowID);
|
||||
}
|
||||
|
||||
|
||||
if ((int)windowPtr == -1 || (int)windowPtr == -2)
|
||||
if ((long)windowPtr == -1 || (long)windowPtr == -2)
|
||||
{
|
||||
throw new Exception("Cannot create window instance!");
|
||||
}
|
||||
@@ -44,7 +47,7 @@ namespace StgSharp
|
||||
{
|
||||
Form form = new Form();
|
||||
form.Size = new Vec2d(width, height);
|
||||
form.windowID = (long)windowPtr;
|
||||
form.windowID = windowPtr;
|
||||
return form;
|
||||
}
|
||||
}
|
||||
@@ -62,7 +65,7 @@ namespace StgSharp
|
||||
public static unsafe Form GLcreateWindow(int width, int height, string tittle, IntPtr monitor, IntPtr share)
|
||||
{
|
||||
byte[] tittleCharArray = System.Text.Encoding.UTF8.GetBytes(tittle);
|
||||
long windowPtr = (long)glIO.internalGLcreateWindow
|
||||
IntPtr windowPtr = internalIO.glfwCreateWindow
|
||||
(width, height, tittleCharArray, monitor, share);
|
||||
|
||||
if ((int)windowPtr == -1 || (int)windowPtr == -2)
|
||||
@@ -81,20 +84,38 @@ namespace StgSharp
|
||||
|
||||
public static unsafe void GLmakeContexCurrent(Form form)
|
||||
{
|
||||
glIO.internalGLmakeContextCurrent((IntPtr)form.windowID);
|
||||
internalIO.glfwMakeContextCurrent(form.windowID);
|
||||
}
|
||||
|
||||
|
||||
public static unsafe bool GLwindowShouldClose(Form form)
|
||||
{
|
||||
int a = glIO.internalGLwindowShouldClose((IntPtr)form.windowID);
|
||||
int a = internalIO.glfwWindowShouldClose(form.windowID);
|
||||
return a != 0;
|
||||
}
|
||||
|
||||
|
||||
public static unsafe void GLswapBuffers(Form form)
|
||||
{
|
||||
glIO.internalGLswapBuffers((IntPtr)form.windowID);
|
||||
internalIO.glfwSwapBuffers(form.windowID);
|
||||
}
|
||||
|
||||
|
||||
|
||||
public static IntPtr GetProcAddress(string name)
|
||||
{
|
||||
IntPtr ret = internalIO.glfwGetProcAddress(name);
|
||||
if (ret == IntPtr.Zero)
|
||||
{
|
||||
#if DEBUG
|
||||
Console.WriteLine(name);
|
||||
#endif
|
||||
return (IntPtr)0b1111111111;
|
||||
}
|
||||
else
|
||||
{
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+2677
-5
File diff suppressed because it is too large
Load Diff
@@ -1,33 +1,16 @@
|
||||
using StgSharp.Control;
|
||||
using StgSharp.Controlling;
|
||||
using StgSharp.Graphics;
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace StgSharp
|
||||
{
|
||||
public static unsafe partial class Graphic
|
||||
{
|
||||
internal static GraphicIOPack glIO;
|
||||
private static bool isGLSet = false;
|
||||
private static bool isGLADset = false;
|
||||
private static bool isGLready = false;
|
||||
|
||||
/// <summary>
|
||||
/// Load OpenGL API to StgSharp core programm,
|
||||
/// please call this method before call any other
|
||||
/// graphic APIs in StgSharp.
|
||||
/// </summary>
|
||||
/// <exception cref="Exception">If run this method twice, will throw exception</exception>
|
||||
public static unsafe void LoadGL()
|
||||
{
|
||||
if (!isGLADset)
|
||||
{
|
||||
glIO = internalIO.InternalInitGraphicApi();
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new Exception("Do not load GL api twice.");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
@@ -35,11 +18,11 @@ namespace StgSharp
|
||||
/// This method should be called before other
|
||||
/// graphic methods, after LoadGL method.
|
||||
/// </summary>
|
||||
public static void InitGL()
|
||||
public static void InitGL(int majorVersion, int minorVersion)
|
||||
{
|
||||
if (!isGLSet)
|
||||
{
|
||||
internalIO.InternalInitGL();
|
||||
internalIO.InternalInitGL(majorVersion, minorVersion);
|
||||
isGLready = isGLSet && isGLADset;
|
||||
}
|
||||
else
|
||||
@@ -48,7 +31,7 @@ namespace StgSharp
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Attach GLFW API to GLAD,
|
||||
@@ -56,19 +39,22 @@ namespace StgSharp
|
||||
/// and before other graphic method.
|
||||
/// </summary>
|
||||
/// <exception cref="Exception">The accident that program cannot attach GLFW to GLAD</exception>
|
||||
public static unsafe void InitGLAD()
|
||||
public static unsafe void InitGLAD(glLoader loader)
|
||||
{
|
||||
|
||||
|
||||
if (!isGLADset)
|
||||
{
|
||||
int a = internalIO.InternalInitGLAD();
|
||||
if (a != 0)
|
||||
if (a == 0)
|
||||
{
|
||||
throw new Exception("Cannot attach GLFW to GLAD!");
|
||||
}
|
||||
else
|
||||
{
|
||||
isGLready = isGLSet && isGLADset;
|
||||
|
||||
LoadGLLoader(loader);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -110,7 +96,7 @@ namespace StgSharp
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -109,5 +109,10 @@ namespace StgSharp
|
||||
return Value.ToString();
|
||||
}
|
||||
|
||||
public static implicit operator T(Counter<T> counter)
|
||||
{
|
||||
return counter.Value;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
using StgSharp.Math;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Numerics;
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
@@ -12,97 +10,11 @@ namespace StgSharp
|
||||
{
|
||||
internal static partial class internalIO
|
||||
{
|
||||
|
||||
#region load
|
||||
|
||||
[DllImport(dllName: "StgSharpGraphic", EntryPoint = "load",
|
||||
CallingConvention = CallingConvention.Cdecl)]
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
internal static extern ref Vector4 load_internal(float x,float y, float z, float w);
|
||||
|
||||
[DllImport(dllName: "StgSharpGraphic", EntryPoint = "load",
|
||||
CallingConvention = CallingConvention.Cdecl)]
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
internal static unsafe extern Vector4* loadptr_internal(float x, float y, float z, float w);
|
||||
|
||||
[DllImport("StgSharpGraphic",EntryPoint = "load_matmap",
|
||||
CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern IntPtr load_mat(IntPtr c0, IntPtr c1, IntPtr c2, IntPtr c3);
|
||||
|
||||
[DllImport("StgSharpGraphic", EntryPoint = "load_cpy",
|
||||
CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern IntPtr load_cpy_internal(IntPtr ptr);
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
#region add sub
|
||||
|
||||
[DllImport("StgSharpGraphic", EntryPoint = "addps",
|
||||
CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern IntPtr addps_internal(IntPtr ptr1, IntPtr ptr2);
|
||||
|
||||
[DllImport("StgSharpGraphic", EntryPoint = "subps",
|
||||
CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern IntPtr subps_internal(IntPtr ptr1, IntPtr ptr2);
|
||||
|
||||
#endregion
|
||||
|
||||
#region mulps
|
||||
|
||||
[DllImport("StgSharpGraphic", EntryPoint = "mulps",
|
||||
CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern IntPtr mulps_internal(IntPtr ptr1, IntPtr ptr2);
|
||||
|
||||
[DllImport("StgSharpGraphic", EntryPoint = "mulps_const",
|
||||
CallingConvention = CallingConvention.Cdecl)]
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
internal static extern IntPtr mulps_const_internal(IntPtr ptr, float value);
|
||||
|
||||
|
||||
[DllImport("StgSharpGraphic", EntryPoint = "mulps_sum",
|
||||
CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern float mulps_sum_internal(IntPtr ptr1, IntPtr ptr2);
|
||||
|
||||
[DllImport("StgSharpGraphic", EntryPoint = "mulps_sum",
|
||||
CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe float mulps_sum_internal(Vector4* ptr1, Vector4* ptr2);
|
||||
|
||||
[DllImport("StgSharpGraphic", EntryPoint = "mulps_sum",
|
||||
CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe float mulps_sum_internal(Vec4d* ptr1, Vec4d* ptr2);
|
||||
|
||||
#endregion
|
||||
|
||||
#region div
|
||||
|
||||
|
||||
[DllImport("StgSharpGraphic", EntryPoint = "mulps",
|
||||
CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern IntPtr divps_internal(IntPtr ptr1, IntPtr ptr2);
|
||||
|
||||
[DllImport("StgSharpGraphic", EntryPoint = "divps_const",
|
||||
CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern IntPtr divps_const_internal(IntPtr ptr, float value);
|
||||
|
||||
#endregion
|
||||
|
||||
[DllImport("StgSharpGraphic", EntryPoint = "sqrtss_const",
|
||||
CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern float sqrtss_const_internal(float a);
|
||||
|
||||
|
||||
|
||||
|
||||
[DllImport("StgSharpGraphic", EntryPoint = "set_Vector4ptr_default",
|
||||
[DllImport(SSGC_libname, EntryPoint = "set_Vector4ptr_default",
|
||||
CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern IntPtr set_Vector4ptr_default_internal();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#region deinit Vector4
|
||||
|
||||
[DllImport(
|
||||
@@ -135,21 +47,21 @@ namespace StgSharp
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
internal static extern unsafe void deinit_internal(Mat4* ptr);
|
||||
|
||||
[DllImport("StgSharpGraphic", EntryPoint = "deinitVector4",
|
||||
[DllImport(SSGC_libname, EntryPoint = "deinitVector4",
|
||||
CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern void deinitVector4_internal(ref Vector4 vec);
|
||||
|
||||
[DllImport("StgSharpGraphic", EntryPoint = "deinitVector4",
|
||||
[DllImport(SSGC_libname, EntryPoint = "deinitVector4",
|
||||
CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe void deinitVector4_internal(Vector4* vec);
|
||||
|
||||
#endregion
|
||||
|
||||
[DllImport("StgSharpGraphic", EntryPoint = "deinit_matmapPtr_sse",
|
||||
[DllImport(SSGC_libname, EntryPoint = "deinit_matmapPtr_sse",
|
||||
CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern void deinitMatmapPtr_sse_internal(ref Vector4Map mapPtr);
|
||||
|
||||
[DllImport("StgSharpGraphic", EntryPoint = "deinit_matmap_sse",
|
||||
[DllImport(SSGC_libname, EntryPoint = "deinit_matmap_sse",
|
||||
CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern void deinitMatmap_sse_internal(ref Vector4Map mapPtr);
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
using StgSharp;
|
||||
using StgSharp.Control;
|
||||
using StgSharp.Controlling;
|
||||
using StgSharp.Logic;
|
||||
using System.Numerics;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
@@ -3,7 +3,7 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace StgSharp.Control
|
||||
namespace StgSharp.Controlling
|
||||
{
|
||||
public static unsafe partial class TimeLine
|
||||
{
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace StgSharp
|
||||
{
|
||||
#region add
|
||||
|
||||
[DllImport("StgsharpGraphic", EntryPoint = "add_Mat2",
|
||||
[DllImport(SSGC_libname, EntryPoint = "add_Mat2",
|
||||
CallingConvention = CallingConvention.Cdecl)]
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
internal static extern Mat2* add_mat2(Mat2* left, Mat2* right);
|
||||
@@ -20,23 +20,22 @@ namespace StgSharp
|
||||
|
||||
#region sub
|
||||
|
||||
[DllImport("StgsharpGraphic", EntryPoint = "sub_mat2",
|
||||
[DllImport(SSGC_libname, EntryPoint = "sub_mat2",
|
||||
CallingConvention = CallingConvention.Cdecl)]
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
internal static extern unsafe Mat2* sub_mat2(Mat2* left, Mat2* right);
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region transpose
|
||||
|
||||
|
||||
[DllImport("StgsharpGraphic", EntryPoint = "transmpose2to4",
|
||||
[DllImport(SSGC_libname, EntryPoint = "transmpose2to4",
|
||||
CallingConvention = CallingConvention.Cdecl)]
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
internal static extern unsafe void Transpose2to4_internal(Mat2* source, Mat4* target);
|
||||
|
||||
[DllImport("StgsharpGraphic", EntryPoint = "transmpose2to3",
|
||||
[DllImport(SSGC_libname, EntryPoint = "transmpose2to3",
|
||||
CallingConvention = CallingConvention.Cdecl)]
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
internal static extern unsafe void Transpose2to3_internal(Mat2* source, Mat3* target);
|
||||
@@ -45,7 +44,7 @@ namespace StgSharp
|
||||
|
||||
#region deinit mat2
|
||||
|
||||
[DllImport("StgsharpGraphic", EntryPoint = "deinit_mat2",
|
||||
[DllImport(SSGC_libname, EntryPoint = "deinit_mat2",
|
||||
CallingConvention = CallingConvention.Cdecl)]
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
internal static extern unsafe void deinit_mat2(Mat2* mat);
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace StgSharp
|
||||
|
||||
#region det
|
||||
|
||||
[DllImport("StgsharpGraphic", EntryPoint = "det_mat3",
|
||||
[DllImport(SSGC_libname, EntryPoint = "det_mat3",
|
||||
CallingConvention = CallingConvention.Cdecl)]
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
internal static extern unsafe float det_mat3(Mat3* mat);
|
||||
@@ -20,18 +20,18 @@ namespace StgSharp
|
||||
|
||||
#region transpose
|
||||
|
||||
[DllImport("StgsharpGraphic", EntryPoint = "transpose3to4",
|
||||
[DllImport(SSGC_libname, EntryPoint = "transpose3to4",
|
||||
CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe void Transpose3to4_internal(Mat3* source, Mat4* target);
|
||||
|
||||
[DllImport("StgsharpGra[hic", EntryPoint = "transpose3to4",
|
||||
CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe void Transpose3to3_internal(Mat3* source, Mat3* target);
|
||||
|
||||
|
||||
[DllImport("StgsharpGra[hic", EntryPoint = "transpose3to2",
|
||||
CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe void Transpose3to2_internal(Mat3* source, Mat2* target);
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
|
||||
@@ -12,15 +12,15 @@ namespace StgSharp
|
||||
|
||||
#region transpose
|
||||
|
||||
[DllImport("StgsharpGraphic", EntryPoint = "transpose4to4",
|
||||
[DllImport(SSGC_libname, EntryPoint = "transpose4to4",
|
||||
CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe void Transpose4to4_internal(Mat4* source, Mat4* target);
|
||||
|
||||
[DllImport("StgsharpGraphic", EntryPoint = "transpose4to3",
|
||||
[DllImport(SSGC_libname, EntryPoint = "transpose4to3",
|
||||
CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe void Transpose4to3_internal(Mat4* source, Mat3* target);
|
||||
|
||||
[DllImport("StgsharpGraphic", EntryPoint = "transpose4to2",
|
||||
[DllImport(SSGC_libname, EntryPoint = "transpose4to2",
|
||||
CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern unsafe void Transpose4to2_internal(Mat4* source, Mat2* target);
|
||||
|
||||
@@ -29,7 +29,7 @@ namespace StgSharp
|
||||
|
||||
#region det
|
||||
|
||||
[DllImport("StgsharpGraphic", EntryPoint = "det_mat4",
|
||||
[DllImport(SSGC_libname, EntryPoint = "det_mat4",
|
||||
CallingConvention = CallingConvention.Cdecl)]
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
internal static unsafe extern float det_mat4(Mat4* matPtr, Mat4* transpose);
|
||||
@@ -39,7 +39,7 @@ namespace StgSharp
|
||||
#region deinit_mat4
|
||||
|
||||
|
||||
[DllImport("StgSharpGraphic", EntryPoint = "deinit_mat4",
|
||||
[DllImport(SSGC_libname, EntryPoint = "deinit_mat4",
|
||||
CallingConvention = CallingConvention.Cdecl)]
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
internal static extern void deinit_mat4(Mat4* mat);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using StgSharp.Control;
|
||||
using StgSharp.Controlling;
|
||||
using System.Numerics;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using StgSharp.Control;
|
||||
using StgSharp.Controlling;
|
||||
using StgSharp.Math;
|
||||
using System.Numerics;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using StgSharp.Control;
|
||||
using StgSharp.Controlling;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
@@ -8,16 +8,7 @@ namespace StgSharp.Math
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static float Sqrt(float x)
|
||||
{
|
||||
|
||||
/**/
|
||||
#if NET6_0_OR_GREATER
|
||||
return System.MathF.Sqrt(x);
|
||||
#else
|
||||
|
||||
/**/
|
||||
return internalIO.sqrtss_const_internal(x);
|
||||
/**/
|
||||
#endif
|
||||
return MathF.Sqrt(x);
|
||||
/**/
|
||||
}
|
||||
|
||||
|
||||
Binary file not shown.
@@ -4,16 +4,21 @@
|
||||
<name>StgSharp</name>
|
||||
</assembly>
|
||||
<members>
|
||||
<member name="M:StgSharp.Instruction.InitPool">
|
||||
<member name="M:StgSharp.Control.InitPool">
|
||||
<summary>
|
||||
Add a pool to timeline controller, and return the instance of the pool.
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="T:StgSharp.Control.GLFWproc">
|
||||
|
||||
<member name="M:StgSharp.Control.GetKeyStatus(StgSharp.Graphics.Form,StgSharp.Control.Key)">
|
||||
<summary>
|
||||
Get the status of a certain key on the keyboard.
|
||||
</summary>
|
||||
<param name="form"></param>
|
||||
<param name="key"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="F:StgSharp.Control.TimeLine.tickCounter">
|
||||
<member name="F:StgSharp.Controlling.TimeLine.tickCounter">
|
||||
<summary>
|
||||
Tick counter count the frames passed since the program start.
|
||||
</summary>
|
||||
@@ -103,7 +108,7 @@
|
||||
but only can be referred by pointers.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphic.GLcreateWindow(System.Int32,System.Int32,System.Byte[],System.IntPtr,StgSharp.Graphics.Form)">
|
||||
<member name="M:StgSharp.Graphic.GLcreateWindow(System.Int32,System.Int32,System.String,System.IntPtr,StgSharp.Graphics.Form)">
|
||||
<summary>
|
||||
Creates a form and its associated context.
|
||||
</summary>
|
||||
@@ -127,22 +132,14 @@
|
||||
<returns>The handle of created window</returns>
|
||||
<exception cref="T:System.Exception"></exception>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphic.LoadGL">
|
||||
<summary>
|
||||
Load OpenGL API to StgSharp core programm,
|
||||
please call this method before call any other
|
||||
graphic APIs in StgSharp.
|
||||
</summary>
|
||||
<exception cref="T:System.Exception">If run this method twice, will throw exception</exception>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphic.InitGL">
|
||||
<member name="M:StgSharp.Graphic.InitGL(System.Int32,System.Int32)">
|
||||
<summary>
|
||||
Init an instance of OpenGL program,
|
||||
This method should be called before other
|
||||
graphic methods, after LoadGL method.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphic.InitGLAD">
|
||||
<member name="M:StgSharp.Graphic.InitGLAD(StgSharp.glLoader)">
|
||||
<summary>
|
||||
Attach GLFW API to GLAD,
|
||||
this method should be called after LoadGL
|
||||
@@ -150,6 +147,13 @@
|
||||
</summary>
|
||||
<exception cref="T:System.Exception">The accident that program cannot attach GLFW to GLAD</exception>
|
||||
</member>
|
||||
<member name="T:StgSharp.glLoader">
|
||||
<summary>
|
||||
Function handler to load an opengl function by serching its name.
|
||||
</summary>
|
||||
<param name="funcname">the name of the Opengl function</param>
|
||||
<returns>An intptr value representing the pointer to the function</returns>
|
||||
</member>
|
||||
<member name="M:StgSharp.LinkedList`1.Add(`0)">
|
||||
<summary>
|
||||
Add an item to the tail of linked list.
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
".NETStandard,Version=v2.1/": {
|
||||
"StgSharp/1.0.0": {
|
||||
"dependencies": {
|
||||
"Facepunch.Steamworks": "2.3.3",
|
||||
"Microsoft.Bcl.HashCode": "1.1.1",
|
||||
"Microsoft.CSharp": "4.7.0"
|
||||
},
|
||||
@@ -17,14 +16,6 @@
|
||||
"StgSharp.dll": {}
|
||||
}
|
||||
},
|
||||
"Facepunch.Steamworks/2.3.3": {
|
||||
"runtime": {
|
||||
"lib/netstandard2.0/Facepunch.Steamworks.Win64.dll": {
|
||||
"assemblyVersion": "1.0.0.0",
|
||||
"fileVersion": "1.0.0.0"
|
||||
}
|
||||
}
|
||||
},
|
||||
"Microsoft.Bcl.HashCode/1.1.1": {
|
||||
"runtime": {
|
||||
"lib/netstandard2.1/Microsoft.Bcl.HashCode.dll": {
|
||||
@@ -49,13 +40,6 @@
|
||||
"serviceable": false,
|
||||
"sha512": ""
|
||||
},
|
||||
"Facepunch.Steamworks/2.3.3": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-7nUjWX/uy6JbDX7Q3n8ij7vrpWjTM0S8hXO24R3ZwQ0QgY0sXVlxzh3unmYoLvKGi31rzDHqGX68I169hnHNxQ==",
|
||||
"path": "facepunch.steamworks/2.3.3",
|
||||
"hashPath": "facepunch.steamworks.2.3.3.nupkg.sha512"
|
||||
},
|
||||
"Microsoft.Bcl.HashCode/1.1.1": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
|
||||
Binary file not shown.
@@ -4,13 +4,21 @@
|
||||
<name>StgSharp</name>
|
||||
</assembly>
|
||||
<members>
|
||||
<member name="M:StgSharp.Instruction.InitPool">
|
||||
<member name="M:StgSharp.Control.InitPool">
|
||||
<summary>
|
||||
Add a pool to timeline controller, and return the instance of the pool.
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="F:StgSharp.Control.ProgramTimeLine.tickCounter">
|
||||
<member name="M:StgSharp.Control.GetKeyStatus(StgSharp.Graphics.Form,StgSharp.Control.Key)">
|
||||
<summary>
|
||||
Get the status of a certain key on the keyboard.
|
||||
</summary>
|
||||
<param name="form"></param>
|
||||
<param name="key"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="F:StgSharp.Controlling.TimeLine.tickCounter">
|
||||
<summary>
|
||||
Tick counter count the frames passed since the program start.
|
||||
</summary>
|
||||
@@ -44,7 +52,7 @@
|
||||
<summary>
|
||||
计算位移失量,需要手动输入游戏刻以提供时间数据
|
||||
</summary>
|
||||
<param name="tickCounter"></param>
|
||||
<param name="tick"></param>
|
||||
<returns>表示位移量的三维矢量</returns>
|
||||
</member>
|
||||
<member name="T:StgSharp.Geometries.IPlainGeometry">
|
||||
@@ -54,11 +62,19 @@
|
||||
</member>
|
||||
<member name="M:StgSharp.Geometries.Parallelogram.MovVertex03(System.UInt32)">
|
||||
<summary>
|
||||
移动平行四边形的第三个顶点,是一个多余的方法,调用会引发多余变量异常
|
||||
Move the third vertix. this is a useless method for Parallelograms.
|
||||
</summary>
|
||||
<param name="tick">当前游戏刻</param>
|
||||
<param name="tick">Current time tick</param>
|
||||
<returns></returns>
|
||||
<exception cref="T:StgSharp.Geometries.UnusedVertexException">几何体过定义</exception>
|
||||
<exception cref="T:StgSharp.Geometries.UnusedVertexException">Geometry overdefined</exception>
|
||||
</member>
|
||||
<member name="M:StgSharp.Geometries.Parallelogram.MovVertex04(System.UInt32)">
|
||||
<summary>
|
||||
Move the third vertix. This method is useless for Parallelograms.
|
||||
</summary>
|
||||
<param name="tick">Current time tick</param>
|
||||
<returns></returns>
|
||||
<exception cref="T:StgSharp.Geometries.UnusedVertexException">Geometry overdefined</exception>
|
||||
</member>
|
||||
<member name="M:StgSharp.Geometries.Point.Update(System.UInt32)">
|
||||
<summary>
|
||||
@@ -80,227 +96,75 @@
|
||||
A square
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.Form.#ctor">
|
||||
<summary>
|
||||
Constructor of a Form, creats an instance of a form and
|
||||
initilize all the customizing operations.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:StgSharp.Graphics.SSGwindow">
|
||||
<summary>
|
||||
A window struct that has nearly no differencr with GLFWwindow,
|
||||
but only can be referred by pointers.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphic.GLcreateWindow(System.Int32,System.Int32,System.String,System.IntPtr,StgSharp.Graphics.Form)">
|
||||
<summary>
|
||||
Creates a form and its associated context.
|
||||
</summary>
|
||||
<param name="width">Required width</param>
|
||||
<param name="height">Required width</param>
|
||||
<param name="tittle">Tittle of the window </param>
|
||||
<param name="monitor"></param>
|
||||
<param name="share"></param>
|
||||
<returns>The instance of created form</returns>
|
||||
<exception cref="T:System.Exception"></exception>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphic.GLcreateWindow(System.Int32,System.Int32,System.String,System.IntPtr,System.IntPtr)">
|
||||
<summary>
|
||||
Creates a window and its associated context.
|
||||
</summary>
|
||||
<param name="width">Required width</param>
|
||||
<param name="height">Required width</param>
|
||||
<param name="tittle">Tittle of the window </param>
|
||||
<param name="monitor"></param>
|
||||
<param name="share"></param>
|
||||
<returns>The handle of created window</returns>
|
||||
<exception cref="T:System.Exception"></exception>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphic.InitGL(System.Int32,System.Int32)">
|
||||
<summary>
|
||||
Init an instance of OpenGL program,
|
||||
This method should be called before other
|
||||
graphic methods, after LoadGL method.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphic.InitGLAD(StgSharp.glLoader)">
|
||||
<summary>
|
||||
Attach GLFW API to GLAD,
|
||||
this method should be called after LoadGL
|
||||
and before other graphic method.
|
||||
</summary>
|
||||
<exception cref="T:System.Exception">The accident that program cannot attach GLFW to GLAD</exception>
|
||||
</member>
|
||||
<member name="T:StgSharp.glLoader">
|
||||
<summary>
|
||||
Function handler to load an opengl function by serching its name.
|
||||
</summary>
|
||||
<param name="funcname">the name of the Opengl function</param>
|
||||
<returns>An intptr value representing the pointer to the function</returns>
|
||||
</member>
|
||||
<member name="M:StgSharp.LinkedList`1.Add(`0)">
|
||||
<summary>
|
||||
Add an item to the tail of linked list.
|
||||
</summary>
|
||||
<param name="t">The item ready to add to the list</param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Math.VectorCalc.multiple(StgSharp.Math.colum2,StgSharp.Math.vec2d)">
|
||||
<member name="T:StgSharp.Math.Vec2d">
|
||||
<summary>
|
||||
|
||||
A two dimension vector defined by two elements.
|
||||
Vec2Ds in StgSharp are defaultly usaed as colum vector.
|
||||
</summary>
|
||||
<param name="colum"></param>
|
||||
<param name="vec"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:StgSharp.Math.VectorCalc.multiple(StgSharp.Math.vec2d,StgSharp.Math.vec2d)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
<param name="vec1"></param>
|
||||
<param name="vec2"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:StgSharp.Math.VectorCalc.multiple(StgSharp.Math.vec2d,StgSharp.Math.colum2)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
<param name="vec"></param>
|
||||
<param name="colum"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:StgSharp.Math.VectorCalc.multiple(StgSharp.Math.vec2d,StgSharp.Math.matrix2x2)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
<param name="vec"></param>
|
||||
<param name="matrix"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:StgSharp.Math.VectorCalc.multiple(StgSharp.Math.vec2d,StgSharp.Math.matrix2x3)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
<param name="vec"></param>
|
||||
<param name="matrix"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:StgSharp.Math.VectorCalc.multiple(StgSharp.Math.vec2d,StgSharp.Math.matrix2x4)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
<param name="vec"></param>
|
||||
<param name="matrix"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:StgSharp.Math.VectorCalc.multiple(StgSharp.Math.matrix2x2,StgSharp.Math.colum2)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
<param name="matrix"></param>
|
||||
<param name="colum"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:StgSharp.Math.VectorCalc.multiple(StgSharp.Math.matrix2x2,StgSharp.Math.matrix2x2)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
<param name="matrix1"></param>
|
||||
<param name="matrix2"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:StgSharp.Math.VectorCalc.multiple(StgSharp.Math.matrix2x2,StgSharp.Math.matrix2x3)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
<param name="matrix1"></param>
|
||||
<param name="matrix2"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:StgSharp.Math.VectorCalc.multiple(StgSharp.Math.matrix2x2,StgSharp.Math.matrix2x4)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
<param name="matrix1"></param>
|
||||
<param name="matrix2"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:StgSharp.Math.VectorCalc.multiple(StgSharp.Math.matrix2x3,StgSharp.Math.colum3)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
<param name="matrix"></param>
|
||||
<param name="vec"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:StgSharp.Math.VectorCalc.multiple(StgSharp.Math.matrix2x3,StgSharp.Math.matrix3x2)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
<param name="matrix1"></param>
|
||||
<param name="matrix2"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:StgSharp.Math.VectorCalc.multiple(StgSharp.Math.matrix2x3,StgSharp.Math.matrix3x3)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
<param name="matrix1"></param>
|
||||
<param name="matrix2"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:StgSharp.Math.VectorCalc.multiple(StgSharp.Math.matrix2x3,StgSharp.Math.matrix3x4)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
<param name="matrix1"></param>
|
||||
<param name="matrix2"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:StgSharp.Math.VectorCalc.multiple(StgSharp.Math.matrix2x4,StgSharp.Math.matrix4x2)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
<param name="matrix1"></param>
|
||||
<param name="matrix2"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:StgSharp.Math.VectorCalc.multiple(StgSharp.Math.matrix2x4,StgSharp.Math.matrix4x3)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
<param name="matrix1"></param>
|
||||
<param name="matrix2"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:StgSharp.Math.VectorCalc.multiple(StgSharp.Math.matrix2x4,StgSharp.Math.matrix4x4)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
<param name="matrix1"></param>
|
||||
<param name="matrix2"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:StgSharp.Math.VectorCalc.multiple(StgSharp.Math.matrix3x2,StgSharp.Math.matrix2x2)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
<param name="matrix1"></param>
|
||||
<param name="matrix2"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:StgSharp.Math.VectorCalc.multiple(StgSharp.Math.matrix3x2,StgSharp.Math.matrix2x3)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
<param name="matrix1"></param>
|
||||
<param name="matrix2"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:StgSharp.Math.VectorCalc.multiple(StgSharp.Math.matrix3x2,StgSharp.Math.matrix2x4)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
<param name="matrix1"></param>
|
||||
<param name="matrix2"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:StgSharp.Math.VectorCalc.multiple(StgSharp.Math.matrix3x3,StgSharp.Math.matrix3x2)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
<param name="matrix1"></param>
|
||||
<param name="matrix2"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:StgSharp.Math.VectorCalc.multiple(StgSharp.Math.matrix3x3,StgSharp.Math.matrix3x3)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
<param name="matrix1"></param>
|
||||
<param name="matrix2"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:StgSharp.Math.VectorCalc.multiple(StgSharp.Math.matrix3x4,StgSharp.Math.matrix4x2)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
<param name="matrix1"></param>
|
||||
<param name="matrix2"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:StgSharp.Math.VectorCalc.multiple(StgSharp.Math.matrix3x4,StgSharp.Math.matrix4x3)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
<param name="matrix1"></param>
|
||||
<param name="matrix2"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:StgSharp.Math.VectorCalc.multiple(StgSharp.Math.matrix3x4,StgSharp.Math.matrix4x4)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
<param name="matrix1"></param>
|
||||
<param name="matrix2"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:StgSharp.Math.VectorCalc.multiple(StgSharp.Math.matrix4x2,StgSharp.Math.matrix2x4)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
<param name="matrix1"></param>
|
||||
<param name="matrix2"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:StgSharp.Math.VectorCalc.multiple(StgSharp.Math.matrix4x4,StgSharp.Math.matrix4x4)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
<param name="matrix1"></param>
|
||||
<param name="matrix2"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:StgSharp.Math.Calc.ASin(System.Single)">
|
||||
<summary>
|
||||
@@ -334,21 +198,17 @@
|
||||
<param name="y"></param>
|
||||
<returns>Returns the value of x^y</returns>
|
||||
</member>
|
||||
<member name="T:StgSharp.Properties.Resources">
|
||||
<member name="M:StgSharp.Math.Calc.Random">
|
||||
<summary>
|
||||
一个强类型的资源类,用于查找本地化的字符串等。
|
||||
returns a random float number between 0 and 1.
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="P:StgSharp.Properties.Resources.ResourceManager">
|
||||
<member name="M:StgSharp.Math.Calc.RandomSeed">
|
||||
<summary>
|
||||
返回此类使用的缓存的 ResourceManager 实例。
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:StgSharp.Properties.Resources.Culture">
|
||||
<summary>
|
||||
重写当前线程的 CurrentUICulture 属性,对
|
||||
使用此强类型资源类的所有资源查找执行重写。
|
||||
Generates a random seed in int value.
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
</members>
|
||||
</doc>
|
||||
|
||||
Binary file not shown.
@@ -70,7 +70,7 @@
|
||||
"privateAssets": "all"
|
||||
}
|
||||
},
|
||||
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\7.0.306\\RuntimeIdentifierGraph.json"
|
||||
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\7.0.400\\RuntimeIdentifierGraph.json"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">$(UserProfile)\.nuget\packages\</NuGetPackageRoot>
|
||||
<NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">C:\Users\Nitlo\.nuget\packages\;C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages</NuGetPackageFolders>
|
||||
<NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle>
|
||||
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">6.6.0</NuGetToolVersion>
|
||||
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">6.7.0</NuGetToolVersion>
|
||||
</PropertyGroup>
|
||||
<ItemGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
|
||||
<SourceRoot Include="C:\Users\Nitlo\.nuget\packages\" />
|
||||
|
||||
@@ -203,7 +203,7 @@
|
||||
"privateAssets": "all"
|
||||
}
|
||||
},
|
||||
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\7.0.306\\RuntimeIdentifierGraph.json"
|
||||
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\7.0.400\\RuntimeIdentifierGraph.json"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"version": 2,
|
||||
"dgSpecHash": "nyq9v8WRAFwIjz8I9Gv9vf0PpGAcnjjNKfzoUjZTNrikCVkWYQ0og9Fjs/Iji8EwIym3cvVShDpL3VAfbdckRQ==",
|
||||
"dgSpecHash": "laAh6HOqaqkeza4HK3EBhAx7AjcOlrd8Z6s26b8lsUCoYM8PIJh/NJy8SIv8UHq9F9mqp0Pw10DuCZW5/r5x5g==",
|
||||
"success": true,
|
||||
"projectFilePath": "D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\源代码\\StgSharp\\StgSharp.csproj",
|
||||
"expectedPackageFiles": [
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -1 +1 @@
|
||||
affa619bf07b05c035efee881282f4490e2b3fd5
|
||||
a58e0bad75f945d384a0d1dfa8c31c469d253ee7
|
||||
|
||||
Binary file not shown.
@@ -4,16 +4,21 @@
|
||||
<name>StgSharp</name>
|
||||
</assembly>
|
||||
<members>
|
||||
<member name="M:StgSharp.Instruction.InitPool">
|
||||
<member name="M:StgSharp.Control.InitPool">
|
||||
<summary>
|
||||
Add a pool to timeline controller, and return the instance of the pool.
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="T:StgSharp.Control.GLFWproc">
|
||||
|
||||
<member name="M:StgSharp.Control.GetKeyStatus(StgSharp.Graphics.Form,StgSharp.Control.Key)">
|
||||
<summary>
|
||||
Get the status of a certain key on the keyboard.
|
||||
</summary>
|
||||
<param name="form"></param>
|
||||
<param name="key"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="F:StgSharp.Control.TimeLine.tickCounter">
|
||||
<member name="F:StgSharp.Controlling.TimeLine.tickCounter">
|
||||
<summary>
|
||||
Tick counter count the frames passed since the program start.
|
||||
</summary>
|
||||
@@ -103,7 +108,7 @@
|
||||
but only can be referred by pointers.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphic.GLcreateWindow(System.Int32,System.Int32,System.Byte[],System.IntPtr,StgSharp.Graphics.Form)">
|
||||
<member name="M:StgSharp.Graphic.GLcreateWindow(System.Int32,System.Int32,System.String,System.IntPtr,StgSharp.Graphics.Form)">
|
||||
<summary>
|
||||
Creates a form and its associated context.
|
||||
</summary>
|
||||
@@ -127,22 +132,14 @@
|
||||
<returns>The handle of created window</returns>
|
||||
<exception cref="T:System.Exception"></exception>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphic.LoadGL">
|
||||
<summary>
|
||||
Load OpenGL API to StgSharp core programm,
|
||||
please call this method before call any other
|
||||
graphic APIs in StgSharp.
|
||||
</summary>
|
||||
<exception cref="T:System.Exception">If run this method twice, will throw exception</exception>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphic.InitGL">
|
||||
<member name="M:StgSharp.Graphic.InitGL(System.Int32,System.Int32)">
|
||||
<summary>
|
||||
Init an instance of OpenGL program,
|
||||
This method should be called before other
|
||||
graphic methods, after LoadGL method.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphic.InitGLAD">
|
||||
<member name="M:StgSharp.Graphic.InitGLAD(StgSharp.glLoader)">
|
||||
<summary>
|
||||
Attach GLFW API to GLAD,
|
||||
this method should be called after LoadGL
|
||||
@@ -150,6 +147,13 @@
|
||||
</summary>
|
||||
<exception cref="T:System.Exception">The accident that program cannot attach GLFW to GLAD</exception>
|
||||
</member>
|
||||
<member name="T:StgSharp.glLoader">
|
||||
<summary>
|
||||
Function handler to load an opengl function by serching its name.
|
||||
</summary>
|
||||
<param name="funcname">the name of the Opengl function</param>
|
||||
<returns>An intptr value representing the pointer to the function</returns>
|
||||
</member>
|
||||
<member name="M:StgSharp.LinkedList`1.Add(`0)">
|
||||
<summary>
|
||||
Add an item to the tail of linked list.
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1 +1 @@
|
||||
875f5b150116d1a7cb65e453e97603b061ab1377
|
||||
8aba738477b1c9dbd1dd8e532aae5f0dbceda2dd
|
||||
|
||||
@@ -1,10 +1,7 @@
|
||||
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharp\bin\x64\Release\netstandard2.1\StgSharpGraphics.dll
|
||||
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharp\bin\x64\Release\netstandard2.1\StgSharp.deps.json
|
||||
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharp\bin\x64\Release\netstandard2.1\StgSharp.dll
|
||||
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharp\bin\x64\Release\netstandard2.1\StgSharp.xml
|
||||
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharp\obj\x64\Release\netstandard2.1\StgSharp.csproj.AssemblyReference.cache
|
||||
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharp\obj\x64\Release\netstandard2.1\StgSharp.Properties.Resources.resources
|
||||
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharp\obj\x64\Release\netstandard2.1\StgSharp.csproj.GenerateResource.cache
|
||||
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharp\obj\x64\Release\netstandard2.1\StgSharp.GeneratedMSBuildEditorConfig.editorconfig
|
||||
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharp\obj\x64\Release\netstandard2.1\StgSharp.AssemblyInfoInputs.cache
|
||||
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharp\obj\x64\Release\netstandard2.1\StgSharp.AssemblyInfo.cs
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -4,13 +4,21 @@
|
||||
<name>StgSharp</name>
|
||||
</assembly>
|
||||
<members>
|
||||
<member name="M:StgSharp.Instruction.InitPool">
|
||||
<member name="M:StgSharp.Control.InitPool">
|
||||
<summary>
|
||||
Add a pool to timeline controller, and return the instance of the pool.
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="F:StgSharp.Control.ProgramTimeLine.tickCounter">
|
||||
<member name="M:StgSharp.Control.GetKeyStatus(StgSharp.Graphics.Form,StgSharp.Control.Key)">
|
||||
<summary>
|
||||
Get the status of a certain key on the keyboard.
|
||||
</summary>
|
||||
<param name="form"></param>
|
||||
<param name="key"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="F:StgSharp.Controlling.TimeLine.tickCounter">
|
||||
<summary>
|
||||
Tick counter count the frames passed since the program start.
|
||||
</summary>
|
||||
@@ -44,7 +52,7 @@
|
||||
<summary>
|
||||
计算位移失量,需要手动输入游戏刻以提供时间数据
|
||||
</summary>
|
||||
<param name="tickCounter"></param>
|
||||
<param name="tick"></param>
|
||||
<returns>表示位移量的三维矢量</returns>
|
||||
</member>
|
||||
<member name="T:StgSharp.Geometries.IPlainGeometry">
|
||||
@@ -54,11 +62,19 @@
|
||||
</member>
|
||||
<member name="M:StgSharp.Geometries.Parallelogram.MovVertex03(System.UInt32)">
|
||||
<summary>
|
||||
移动平行四边形的第三个顶点,是一个多余的方法,调用会引发多余变量异常
|
||||
Move the third vertix. this is a useless method for Parallelograms.
|
||||
</summary>
|
||||
<param name="tick">当前游戏刻</param>
|
||||
<param name="tick">Current time tick</param>
|
||||
<returns></returns>
|
||||
<exception cref="T:StgSharp.Geometries.UnusedVertexException">几何体过定义</exception>
|
||||
<exception cref="T:StgSharp.Geometries.UnusedVertexException">Geometry overdefined</exception>
|
||||
</member>
|
||||
<member name="M:StgSharp.Geometries.Parallelogram.MovVertex04(System.UInt32)">
|
||||
<summary>
|
||||
Move the third vertix. This method is useless for Parallelograms.
|
||||
</summary>
|
||||
<param name="tick">Current time tick</param>
|
||||
<returns></returns>
|
||||
<exception cref="T:StgSharp.Geometries.UnusedVertexException">Geometry overdefined</exception>
|
||||
</member>
|
||||
<member name="M:StgSharp.Geometries.Point.Update(System.UInt32)">
|
||||
<summary>
|
||||
@@ -80,227 +96,75 @@
|
||||
A square
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.Form.#ctor">
|
||||
<summary>
|
||||
Constructor of a Form, creats an instance of a form and
|
||||
initilize all the customizing operations.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:StgSharp.Graphics.SSGwindow">
|
||||
<summary>
|
||||
A window struct that has nearly no differencr with GLFWwindow,
|
||||
but only can be referred by pointers.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphic.GLcreateWindow(System.Int32,System.Int32,System.String,System.IntPtr,StgSharp.Graphics.Form)">
|
||||
<summary>
|
||||
Creates a form and its associated context.
|
||||
</summary>
|
||||
<param name="width">Required width</param>
|
||||
<param name="height">Required width</param>
|
||||
<param name="tittle">Tittle of the window </param>
|
||||
<param name="monitor"></param>
|
||||
<param name="share"></param>
|
||||
<returns>The instance of created form</returns>
|
||||
<exception cref="T:System.Exception"></exception>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphic.GLcreateWindow(System.Int32,System.Int32,System.String,System.IntPtr,System.IntPtr)">
|
||||
<summary>
|
||||
Creates a window and its associated context.
|
||||
</summary>
|
||||
<param name="width">Required width</param>
|
||||
<param name="height">Required width</param>
|
||||
<param name="tittle">Tittle of the window </param>
|
||||
<param name="monitor"></param>
|
||||
<param name="share"></param>
|
||||
<returns>The handle of created window</returns>
|
||||
<exception cref="T:System.Exception"></exception>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphic.InitGL(System.Int32,System.Int32)">
|
||||
<summary>
|
||||
Init an instance of OpenGL program,
|
||||
This method should be called before other
|
||||
graphic methods, after LoadGL method.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphic.InitGLAD(StgSharp.glLoader)">
|
||||
<summary>
|
||||
Attach GLFW API to GLAD,
|
||||
this method should be called after LoadGL
|
||||
and before other graphic method.
|
||||
</summary>
|
||||
<exception cref="T:System.Exception">The accident that program cannot attach GLFW to GLAD</exception>
|
||||
</member>
|
||||
<member name="T:StgSharp.glLoader">
|
||||
<summary>
|
||||
Function handler to load an opengl function by serching its name.
|
||||
</summary>
|
||||
<param name="funcname">the name of the Opengl function</param>
|
||||
<returns>An intptr value representing the pointer to the function</returns>
|
||||
</member>
|
||||
<member name="M:StgSharp.LinkedList`1.Add(`0)">
|
||||
<summary>
|
||||
Add an item to the tail of linked list.
|
||||
</summary>
|
||||
<param name="t">The item ready to add to the list</param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Math.VectorCalc.multiple(StgSharp.Math.colum2,StgSharp.Math.vec2d)">
|
||||
<member name="T:StgSharp.Math.Vec2d">
|
||||
<summary>
|
||||
|
||||
A two dimension vector defined by two elements.
|
||||
Vec2Ds in StgSharp are defaultly usaed as colum vector.
|
||||
</summary>
|
||||
<param name="colum"></param>
|
||||
<param name="vec"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:StgSharp.Math.VectorCalc.multiple(StgSharp.Math.vec2d,StgSharp.Math.vec2d)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
<param name="vec1"></param>
|
||||
<param name="vec2"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:StgSharp.Math.VectorCalc.multiple(StgSharp.Math.vec2d,StgSharp.Math.colum2)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
<param name="vec"></param>
|
||||
<param name="colum"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:StgSharp.Math.VectorCalc.multiple(StgSharp.Math.vec2d,StgSharp.Math.matrix2x2)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
<param name="vec"></param>
|
||||
<param name="matrix"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:StgSharp.Math.VectorCalc.multiple(StgSharp.Math.vec2d,StgSharp.Math.matrix2x3)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
<param name="vec"></param>
|
||||
<param name="matrix"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:StgSharp.Math.VectorCalc.multiple(StgSharp.Math.vec2d,StgSharp.Math.matrix2x4)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
<param name="vec"></param>
|
||||
<param name="matrix"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:StgSharp.Math.VectorCalc.multiple(StgSharp.Math.matrix2x2,StgSharp.Math.colum2)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
<param name="matrix"></param>
|
||||
<param name="colum"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:StgSharp.Math.VectorCalc.multiple(StgSharp.Math.matrix2x2,StgSharp.Math.matrix2x2)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
<param name="matrix1"></param>
|
||||
<param name="matrix2"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:StgSharp.Math.VectorCalc.multiple(StgSharp.Math.matrix2x2,StgSharp.Math.matrix2x3)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
<param name="matrix1"></param>
|
||||
<param name="matrix2"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:StgSharp.Math.VectorCalc.multiple(StgSharp.Math.matrix2x2,StgSharp.Math.matrix2x4)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
<param name="matrix1"></param>
|
||||
<param name="matrix2"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:StgSharp.Math.VectorCalc.multiple(StgSharp.Math.matrix2x3,StgSharp.Math.colum3)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
<param name="matrix"></param>
|
||||
<param name="vec"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:StgSharp.Math.VectorCalc.multiple(StgSharp.Math.matrix2x3,StgSharp.Math.matrix3x2)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
<param name="matrix1"></param>
|
||||
<param name="matrix2"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:StgSharp.Math.VectorCalc.multiple(StgSharp.Math.matrix2x3,StgSharp.Math.matrix3x3)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
<param name="matrix1"></param>
|
||||
<param name="matrix2"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:StgSharp.Math.VectorCalc.multiple(StgSharp.Math.matrix2x3,StgSharp.Math.matrix3x4)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
<param name="matrix1"></param>
|
||||
<param name="matrix2"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:StgSharp.Math.VectorCalc.multiple(StgSharp.Math.matrix2x4,StgSharp.Math.matrix4x2)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
<param name="matrix1"></param>
|
||||
<param name="matrix2"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:StgSharp.Math.VectorCalc.multiple(StgSharp.Math.matrix2x4,StgSharp.Math.matrix4x3)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
<param name="matrix1"></param>
|
||||
<param name="matrix2"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:StgSharp.Math.VectorCalc.multiple(StgSharp.Math.matrix2x4,StgSharp.Math.matrix4x4)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
<param name="matrix1"></param>
|
||||
<param name="matrix2"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:StgSharp.Math.VectorCalc.multiple(StgSharp.Math.matrix3x2,StgSharp.Math.matrix2x2)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
<param name="matrix1"></param>
|
||||
<param name="matrix2"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:StgSharp.Math.VectorCalc.multiple(StgSharp.Math.matrix3x2,StgSharp.Math.matrix2x3)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
<param name="matrix1"></param>
|
||||
<param name="matrix2"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:StgSharp.Math.VectorCalc.multiple(StgSharp.Math.matrix3x2,StgSharp.Math.matrix2x4)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
<param name="matrix1"></param>
|
||||
<param name="matrix2"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:StgSharp.Math.VectorCalc.multiple(StgSharp.Math.matrix3x3,StgSharp.Math.matrix3x2)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
<param name="matrix1"></param>
|
||||
<param name="matrix2"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:StgSharp.Math.VectorCalc.multiple(StgSharp.Math.matrix3x3,StgSharp.Math.matrix3x3)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
<param name="matrix1"></param>
|
||||
<param name="matrix2"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:StgSharp.Math.VectorCalc.multiple(StgSharp.Math.matrix3x4,StgSharp.Math.matrix4x2)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
<param name="matrix1"></param>
|
||||
<param name="matrix2"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:StgSharp.Math.VectorCalc.multiple(StgSharp.Math.matrix3x4,StgSharp.Math.matrix4x3)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
<param name="matrix1"></param>
|
||||
<param name="matrix2"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:StgSharp.Math.VectorCalc.multiple(StgSharp.Math.matrix3x4,StgSharp.Math.matrix4x4)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
<param name="matrix1"></param>
|
||||
<param name="matrix2"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:StgSharp.Math.VectorCalc.multiple(StgSharp.Math.matrix4x2,StgSharp.Math.matrix2x4)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
<param name="matrix1"></param>
|
||||
<param name="matrix2"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:StgSharp.Math.VectorCalc.multiple(StgSharp.Math.matrix4x4,StgSharp.Math.matrix4x4)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
<param name="matrix1"></param>
|
||||
<param name="matrix2"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:StgSharp.Math.Calc.ASin(System.Single)">
|
||||
<summary>
|
||||
@@ -334,21 +198,17 @@
|
||||
<param name="y"></param>
|
||||
<returns>Returns the value of x^y</returns>
|
||||
</member>
|
||||
<member name="T:StgSharp.Properties.Resources">
|
||||
<member name="M:StgSharp.Math.Calc.Random">
|
||||
<summary>
|
||||
一个强类型的资源类,用于查找本地化的字符串等。
|
||||
returns a random float number between 0 and 1.
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="P:StgSharp.Properties.Resources.ResourceManager">
|
||||
<member name="M:StgSharp.Math.Calc.RandomSeed">
|
||||
<summary>
|
||||
返回此类使用的缓存的 ResourceManager 实例。
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:StgSharp.Properties.Resources.Culture">
|
||||
<summary>
|
||||
重写当前线程的 CurrentUICulture 属性,对
|
||||
使用此强类型资源类的所有资源查找执行重写。
|
||||
Generates a random seed in int value.
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
</members>
|
||||
</doc>
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -1,9 +1,9 @@
|
||||
using StgSharp.Math;
|
||||
using StgSharp.Graphics;
|
||||
using StgSharp.Math;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Numerics;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Runtime.Intrinsics.X86;
|
||||
|
||||
namespace StgSharp
|
||||
{
|
||||
@@ -13,19 +13,63 @@ namespace StgSharp
|
||||
|
||||
internal unsafe static void Main(string[] args)
|
||||
{
|
||||
Matrix3x3 matrix = new Matrix3x3(
|
||||
1,2,3,
|
||||
4,5,6,
|
||||
7,8,9
|
||||
|
||||
Graphic.InitGL(3, 3);
|
||||
|
||||
Form f = Graphic.GLcreateWindow(
|
||||
800, 600, "Test STG#!", IntPtr.Zero, null
|
||||
);
|
||||
Graphic.GLmakeContexCurrent(f);
|
||||
internalIO.glfwSetFramebufferSizeCallback(f.windowID, FormSizeCallback);
|
||||
|
||||
Console.WriteLine(matrix.Det());
|
||||
GetApiRep();
|
||||
Graphic.InitGLAD(Graphic.GetProcAddress);
|
||||
|
||||
while (internalIO.glfwWindowShouldClose(f.windowID) == 0)
|
||||
{
|
||||
ProcessInput(f.windowID);
|
||||
|
||||
Graphic.glClearColor(0.2f, 0.3f, 0.3f, 1.0f);
|
||||
Graphic.glClear(GLFW.GL_COLOR_BUFFER_BIT);
|
||||
|
||||
internalIO.glfwSwapBuffers(f.windowID);
|
||||
internalIO.glfwPollEvents();
|
||||
}
|
||||
|
||||
internalIO.glfwTerminate();
|
||||
|
||||
}
|
||||
|
||||
public static void FormSizeCallback(IntPtr window, int width, int height)
|
||||
{
|
||||
Graphic.glViewport(0, 0, width, height);
|
||||
}
|
||||
|
||||
public static void ProcessInput(IntPtr windowPtr)
|
||||
{
|
||||
if (internalIO.glfwGetKey(windowPtr, (int)Control.Key.ESCAPE)
|
||||
== KeyStatus.PRESS)
|
||||
{
|
||||
internalIO.glfwSetWindowShouldClose(windowPtr, 1);
|
||||
}
|
||||
}
|
||||
|
||||
[DllImport(internalIO.SSGC_libname, EntryPoint = "getApiReporter",
|
||||
CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
|
||||
internal extern static void internal_getApiReporter(IntPtr reporter);
|
||||
|
||||
internal static void GetApiRep()
|
||||
{
|
||||
showApiHandler handle = new showApiHandler(ShowApiAddress);
|
||||
internal_getApiReporter(Marshal.GetFunctionPointerForDelegate(handle));
|
||||
}
|
||||
internal delegate void showApiHandler(ulong add);
|
||||
internal static void ShowApiAddress(ulong address)
|
||||
{
|
||||
Console.WriteLine(address);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user