daily update on 20240305 by nitload youmu

This commit is contained in:
YoumuLiu
2024-03-05 10:17:02 +08:00
parent 1f2fca4c8f
commit 6a0cccae79
156 changed files with 23040 additions and 1385 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large Load Diff
Binary file not shown.
Binary file not shown.
@@ -14,7 +14,7 @@ using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("BenchMark")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+a2241a5a5816a9438c63e3ca3c69313e6f2e8f56")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+1f2fca4c8fe323daf9751677ccfdf0f7b04a9be8")]
[assembly: System.Reflection.AssemblyProductAttribute("BenchMark")]
[assembly: System.Reflection.AssemblyTitleAttribute("BenchMark")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
@@ -1 +1 @@
fe1624e5f302bd492e10a40cae96d24ccf2b6a19e0800ac0ba18b718db3e3a16
1b559b7de794dd65a77a826f372c4869f4f694564820837fdd05922d644b8624
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large Load Diff
-628
View File
@@ -1,628 +0,0 @@
/*************************************************************************
* GLFW 3.3 - www.glfw.org
* A library for OpenGL, window and input
*------------------------------------------------------------------------
* Copyright (c) 2002-2006 Marcus Geelnard
* Copyright (c) 2006-2018 Camilla Löwy <elmindreda@glfw.org>
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
* arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose,
* including commercial applications, and to alter it and redistribute it
* freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not
* claim that you wrote the original software. If you use this software
* in a product, an acknowledgment in the product documentation would
* be appreciated but is not required.
*
* 2. Altered source versions must be plainly marked as such, and must not
* be misrepresented as being the original software.
*
* 3. This notice may not be removed or altered from any source
* distribution.
*
*************************************************************************/
#ifndef _glfw3_native_h_
#define _glfw3_native_h_
#ifdef __cplusplus
extern "C" {
#endif
/*************************************************************************
* Doxygen documentation
*************************************************************************/
/*! @file glfw3native.h
* @brief The header of the native access functions.
*
* This is the header file of the native access functions. See @ref native for
* more information.
*/
/*! @defgroup native Native access
* @brief Functions related to accessing native handles.
*
* **By using the native access functions you assert that you know what you're
* doing and how to fix problems caused by using them. If you don't, you
* shouldn't be using them.**
*
* Before the inclusion of @ref glfw3native.h, you may define zero or more
* window system API macro and zero or more context creation API macros.
*
* The chosen backends must match those the library was compiled for. Failure
* to do this will cause a link-time error.
*
* The available window API macros are:
* * `GLFW_EXPOSE_NATIVE_WIN32`
* * `GLFW_EXPOSE_NATIVE_COCOA`
* * `GLFW_EXPOSE_NATIVE_X11`
* * `GLFW_EXPOSE_NATIVE_WAYLAND`
*
* The available context API macros are:
* * `GLFW_EXPOSE_NATIVE_WGL`
* * `GLFW_EXPOSE_NATIVE_NSGL`
* * `GLFW_EXPOSE_NATIVE_GLX`
* * `GLFW_EXPOSE_NATIVE_EGL`
* * `GLFW_EXPOSE_NATIVE_OSMESA`
*
* These macros select which of the native access functions that are declared
* and which platform-specific headers to include. It is then up your (by
* definition platform-specific) code to handle which of these should be
* defined.
*
* If you do not want the platform-specific headers to be included, define
* `GLFW_NATIVE_INCLUDE_NONE` before including the @ref glfw3native.h header.
*
* @code
* #define GLFW_EXPOSE_NATIVE_WIN32
* #define GLFW_EXPOSE_NATIVE_WGL
* #define GLFW_NATIVE_INCLUDE_NONE
* #include <GLFW/glfw3native.h>
* @endcode
*/
/*************************************************************************
* System headers and types
*************************************************************************/
#if !defined(GLFW_NATIVE_INCLUDE_NONE)
#if defined(GLFW_EXPOSE_NATIVE_WIN32) || defined(GLFW_EXPOSE_NATIVE_WGL)
/* This is a workaround for the fact that glfw3.h needs to export APIENTRY (for
* example to allow applications to correctly declare a GL_KHR_debug callback)
* but windows.h assumes no one will define APIENTRY before it does
*/
#if defined(GLFW_APIENTRY_DEFINED)
#undef APIENTRY
#undef GLFW_APIENTRY_DEFINED
#endif
#include <windows.h>
#elif defined(GLFW_EXPOSE_NATIVE_COCOA) || defined(GLFW_EXPOSE_NATIVE_NSGL)
#if defined(__OBJC__)
#import <Cocoa/Cocoa.h>
#else
#include <ApplicationServices/ApplicationServices.h>
#include <objc/objc.h>
#endif
#elif defined(GLFW_EXPOSE_NATIVE_X11) || defined(GLFW_EXPOSE_NATIVE_GLX)
#include <X11/Xlib.h>
#include <X11/extensions/Xrandr.h>
#elif defined(GLFW_EXPOSE_NATIVE_WAYLAND)
#include <wayland-client.h>
#endif
#if defined(GLFW_EXPOSE_NATIVE_WGL)
/* WGL is declared by windows.h */
#endif
#if defined(GLFW_EXPOSE_NATIVE_NSGL)
/* NSGL is declared by Cocoa.h */
#endif
#if defined(GLFW_EXPOSE_NATIVE_GLX)
/* This is a workaround for the fact that glfw3.h defines GLAPIENTRY because by
* default it also acts as an OpenGL header
* However, glx.h will include gl.h, which will define it unconditionally
*/
#if defined(GLFW_GLAPIENTRY_DEFINED)
#undef GLAPIENTRY
#undef GLFW_GLAPIENTRY_DEFINED
#endif
#include <GL/glx.h>
#endif
#if defined(GLFW_EXPOSE_NATIVE_EGL)
#include <EGL/egl.h>
#endif
#if defined(GLFW_EXPOSE_NATIVE_OSMESA)
/* This is a workaround for the fact that glfw3.h defines GLAPIENTRY because by
* default it also acts as an OpenGL header
* However, osmesa.h will include gl.h, which will define it unconditionally
*/
#if defined(GLFW_GLAPIENTRY_DEFINED)
#undef GLAPIENTRY
#undef GLFW_GLAPIENTRY_DEFINED
#endif
#include <GL/osmesa.h>
#endif
#endif /*GLFW_NATIVE_INCLUDE_NONE*/
/*************************************************************************
* Functions
*************************************************************************/
#if defined(GLFW_EXPOSE_NATIVE_WIN32)
/*! @brief Returns the adapter device name of the specified monitor.
*
* @return The UTF-8 encoded adapter device name (for example `\\.\DISPLAY1`)
* of the specified monitor, or `NULL` if an [error](@ref error_handling)
* occurred.
*
* @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
*
* @thread_safety This function may be called from any thread. Access is not
* synchronized.
*
* @since Added in version 3.1.
*
* @ingroup native
*/
GLFWAPI const char* glfwGetWin32Adapter(GLFWmonitor* monitor);
/*! @brief Returns the display device name of the specified monitor.
*
* @return The UTF-8 encoded display device name (for example
* `\\.\DISPLAY1\Monitor0`) of the specified monitor, or `NULL` if an
* [error](@ref error_handling) occurred.
*
* @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
*
* @thread_safety This function may be called from any thread. Access is not
* synchronized.
*
* @since Added in version 3.1.
*
* @ingroup native
*/
GLFWAPI const char* glfwGetWin32Monitor(GLFWmonitor* monitor);
/*! @brief Returns the `HWND` of the specified window.
*
* @return The `HWND` of the specified window, or `NULL` if an
* [error](@ref error_handling) occurred.
*
* @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
*
* @remark The `HDC` associated with the window can be queried with the
* [GetDC](https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getdc)
* function.
* @code
* HDC dc = GetDC(glfwGetWin32Window(window));
* @endcode
* This DC is private and does not need to be released.
*
* @thread_safety This function may be called from any thread. Access is not
* synchronized.
*
* @since Added in version 3.0.
*
* @ingroup native
*/
GLFWAPI HWND glfwGetWin32Window(GLFWwindow* window);
#endif
#if defined(GLFW_EXPOSE_NATIVE_WGL)
/*! @brief Returns the `HGLRC` of the specified window.
*
* @return The `HGLRC` of the specified window, or `NULL` if an
* [error](@ref error_handling) occurred.
*
* @errors Possible errors include @ref GLFW_NO_WINDOW_CONTEXT and @ref
* GLFW_NOT_INITIALIZED.
*
* @remark The `HDC` associated with the window can be queried with the
* [GetDC](https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getdc)
* function.
* @code
* HDC dc = GetDC(glfwGetWin32Window(window));
* @endcode
* This DC is private and does not need to be released.
*
* @thread_safety This function may be called from any thread. Access is not
* synchronized.
*
* @since Added in version 3.0.
*
* @ingroup native
*/
GLFWAPI HGLRC glfwGetWGLContext(GLFWwindow* window);
#endif
#if defined(GLFW_EXPOSE_NATIVE_COCOA)
/*! @brief Returns the `CGDirectDisplayID` of the specified monitor.
*
* @return The `CGDirectDisplayID` of the specified monitor, or
* `kCGNullDirectDisplay` if an [error](@ref error_handling) occurred.
*
* @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
*
* @thread_safety This function may be called from any thread. Access is not
* synchronized.
*
* @since Added in version 3.1.
*
* @ingroup native
*/
GLFWAPI CGDirectDisplayID glfwGetCocoaMonitor(GLFWmonitor* monitor);
/*! @brief Returns the `NSWindow` of the specified window.
*
* @return The `NSWindow` of the specified window, or `nil` if an
* [error](@ref error_handling) occurred.
*
* @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
*
* @thread_safety This function may be called from any thread. Access is not
* synchronized.
*
* @since Added in version 3.0.
*
* @ingroup native
*/
GLFWAPI id glfwGetCocoaWindow(GLFWwindow* window);
#endif
#if defined(GLFW_EXPOSE_NATIVE_NSGL)
/*! @brief Returns the `NSOpenGLContext` of the specified window.
*
* @return The `NSOpenGLContext` of the specified window, or `nil` if an
* [error](@ref error_handling) occurred.
*
* @errors Possible errors include @ref GLFW_NO_WINDOW_CONTEXT and @ref
* GLFW_NOT_INITIALIZED.
*
* @thread_safety This function may be called from any thread. Access is not
* synchronized.
*
* @since Added in version 3.0.
*
* @ingroup native
*/
GLFWAPI id glfwGetNSGLContext(GLFWwindow* window);
#endif
#if defined(GLFW_EXPOSE_NATIVE_X11)
/*! @brief Returns the `Display` used by GLFW.
*
* @return The `Display` used by GLFW, or `NULL` if an
* [error](@ref error_handling) occurred.
*
* @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
*
* @thread_safety This function may be called from any thread. Access is not
* synchronized.
*
* @since Added in version 3.0.
*
* @ingroup native
*/
GLFWAPI Display* glfwGetX11Display(void);
/*! @brief Returns the `RRCrtc` of the specified monitor.
*
* @return The `RRCrtc` of the specified monitor, or `None` if an
* [error](@ref error_handling) occurred.
*
* @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
*
* @thread_safety This function may be called from any thread. Access is not
* synchronized.
*
* @since Added in version 3.1.
*
* @ingroup native
*/
GLFWAPI RRCrtc glfwGetX11Adapter(GLFWmonitor* monitor);
/*! @brief Returns the `RROutput` of the specified monitor.
*
* @return The `RROutput` of the specified monitor, or `None` if an
* [error](@ref error_handling) occurred.
*
* @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
*
* @thread_safety This function may be called from any thread. Access is not
* synchronized.
*
* @since Added in version 3.1.
*
* @ingroup native
*/
GLFWAPI RROutput glfwGetX11Monitor(GLFWmonitor* monitor);
/*! @brief Returns the `Window` of the specified window.
*
* @return The `Window` of the specified window, or `None` if an
* [error](@ref error_handling) occurred.
*
* @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
*
* @thread_safety This function may be called from any thread. Access is not
* synchronized.
*
* @since Added in version 3.0.
*
* @ingroup native
*/
GLFWAPI Window glfwGetX11Window(GLFWwindow* window);
/*! @brief Sets the current primary selection to the specified string.
*
* @param[in] string A UTF-8 encoded string.
*
* @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
* GLFW_PLATFORM_ERROR.
*
* @pointer_lifetime The specified string is copied before this function
* returns.
*
* @thread_safety This function must only be called from the main thread.
*
* @sa @ref clipboard
* @sa glfwGetX11SelectionString
* @sa glfwSetClipboardString
*
* @since Added in version 3.3.
*
* @ingroup native
*/
GLFWAPI void glfwSetX11SelectionString(const char* string);
/*! @brief Returns the contents of the current primary selection as a string.
*
* If the selection is empty or if its contents cannot be converted, `NULL`
* is returned and a @ref GLFW_FORMAT_UNAVAILABLE error is generated.
*
* @return The contents of the selection as a UTF-8 encoded string, or `NULL`
* if an [error](@ref error_handling) occurred.
*
* @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
* GLFW_PLATFORM_ERROR.
*
* @pointer_lifetime The returned string is allocated and freed by GLFW. You
* should not free it yourself. It is valid until the next call to @ref
* glfwGetX11SelectionString or @ref glfwSetX11SelectionString, or until the
* library is terminated.
*
* @thread_safety This function must only be called from the main thread.
*
* @sa @ref clipboard
* @sa glfwSetX11SelectionString
* @sa glfwGetClipboardString
*
* @since Added in version 3.3.
*
* @ingroup native
*/
GLFWAPI const char* glfwGetX11SelectionString(void);
#endif
#if defined(GLFW_EXPOSE_NATIVE_GLX)
/*! @brief Returns the `GLXContext` of the specified window.
*
* @return The `GLXContext` of the specified window, or `NULL` if an
* [error](@ref error_handling) occurred.
*
* @errors Possible errors include @ref GLFW_NO_WINDOW_CONTEXT and @ref
* GLFW_NOT_INITIALIZED.
*
* @thread_safety This function may be called from any thread. Access is not
* synchronized.
*
* @since Added in version 3.0.
*
* @ingroup native
*/
GLFWAPI GLXContext glfwGetGLXContext(GLFWwindow* window);
/*! @brief Returns the `GLXWindow` of the specified window.
*
* @return The `GLXWindow` of the specified window, or `None` if an
* [error](@ref error_handling) occurred.
*
* @errors Possible errors include @ref GLFW_NO_WINDOW_CONTEXT and @ref
* GLFW_NOT_INITIALIZED.
*
* @thread_safety This function may be called from any thread. Access is not
* synchronized.
*
* @since Added in version 3.2.
*
* @ingroup native
*/
GLFWAPI GLXWindow glfwGetGLXWindow(GLFWwindow* window);
#endif
#if defined(GLFW_EXPOSE_NATIVE_WAYLAND)
/*! @brief Returns the `struct wl_display*` used by GLFW.
*
* @return The `struct wl_display*` used by GLFW, or `NULL` if an
* [error](@ref error_handling) occurred.
*
* @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
*
* @thread_safety This function may be called from any thread. Access is not
* synchronized.
*
* @since Added in version 3.2.
*
* @ingroup native
*/
GLFWAPI struct wl_display* glfwGetWaylandDisplay(void);
/*! @brief Returns the `struct wl_output*` of the specified monitor.
*
* @return The `struct wl_output*` of the specified monitor, or `NULL` if an
* [error](@ref error_handling) occurred.
*
* @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
*
* @thread_safety This function may be called from any thread. Access is not
* synchronized.
*
* @since Added in version 3.2.
*
* @ingroup native
*/
GLFWAPI struct wl_output* glfwGetWaylandMonitor(GLFWmonitor* monitor);
/*! @brief Returns the main `struct wl_surface*` of the specified window.
*
* @return The main `struct wl_surface*` of the specified window, or `NULL` if
* an [error](@ref error_handling) occurred.
*
* @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
*
* @thread_safety This function may be called from any thread. Access is not
* synchronized.
*
* @since Added in version 3.2.
*
* @ingroup native
*/
GLFWAPI struct wl_surface* glfwGetWaylandWindow(GLFWwindow* window);
#endif
#if defined(GLFW_EXPOSE_NATIVE_EGL)
/*! @brief Returns the `EGLDisplay` used by GLFW.
*
* @return The `EGLDisplay` used by GLFW, or `EGL_NO_DISPLAY` if an
* [error](@ref error_handling) occurred.
*
* @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
*
* @remark Because EGL is initialized on demand, this function will return
* `EGL_NO_DISPLAY` until the first context has been created via EGL.
*
* @thread_safety This function may be called from any thread. Access is not
* synchronized.
*
* @since Added in version 3.0.
*
* @ingroup native
*/
GLFWAPI EGLDisplay glfwGetEGLDisplay(void);
/*! @brief Returns the `EGLContext` of the specified window.
*
* @return The `EGLContext` of the specified window, or `EGL_NO_CONTEXT` if an
* [error](@ref error_handling) occurred.
*
* @errors Possible errors include @ref GLFW_NO_WINDOW_CONTEXT and @ref
* GLFW_NOT_INITIALIZED.
*
* @thread_safety This function may be called from any thread. Access is not
* synchronized.
*
* @since Added in version 3.0.
*
* @ingroup native
*/
GLFWAPI EGLContext glfwGetEGLContext(GLFWwindow* window);
/*! @brief Returns the `EGLSurface` of the specified window.
*
* @return The `EGLSurface` of the specified window, or `EGL_NO_SURFACE` if an
* [error](@ref error_handling) occurred.
*
* @errors Possible errors include @ref GLFW_NO_WINDOW_CONTEXT and @ref
* GLFW_NOT_INITIALIZED.
*
* @thread_safety This function may be called from any thread. Access is not
* synchronized.
*
* @since Added in version 3.0.
*
* @ingroup native
*/
GLFWAPI EGLSurface glfwGetEGLSurface(GLFWwindow* window);
#endif
#if defined(GLFW_EXPOSE_NATIVE_OSMESA)
/*! @brief Retrieves the color buffer associated with the specified window.
*
* @param[in] window The window whose color buffer to retrieve.
* @param[out] width Where to store the width of the color buffer, or `NULL`.
* @param[out] height Where to store the height of the color buffer, or `NULL`.
* @param[out] format Where to store the OSMesa pixel format of the color
* buffer, or `NULL`.
* @param[out] buffer Where to store the address of the color buffer, or
* `NULL`.
* @return `GLFW_TRUE` if successful, or `GLFW_FALSE` if an
* [error](@ref error_handling) occurred.
*
* @errors Possible errors include @ref GLFW_NO_WINDOW_CONTEXT and @ref
* GLFW_NOT_INITIALIZED.
*
* @thread_safety This function may be called from any thread. Access is not
* synchronized.
*
* @since Added in version 3.3.
*
* @ingroup native
*/
GLFWAPI int glfwGetOSMesaColorBuffer(GLFWwindow* window, int* width, int* height, int* format, void** buffer);
/*! @brief Retrieves the depth buffer associated with the specified window.
*
* @param[in] window The window whose depth buffer to retrieve.
* @param[out] width Where to store the width of the depth buffer, or `NULL`.
* @param[out] height Where to store the height of the depth buffer, or `NULL`.
* @param[out] bytesPerValue Where to store the number of bytes per depth
* buffer element, or `NULL`.
* @param[out] buffer Where to store the address of the depth buffer, or
* `NULL`.
* @return `GLFW_TRUE` if successful, or `GLFW_FALSE` if an
* [error](@ref error_handling) occurred.
*
* @errors Possible errors include @ref GLFW_NO_WINDOW_CONTEXT and @ref
* GLFW_NOT_INITIALIZED.
*
* @thread_safety This function may be called from any thread. Access is not
* synchronized.
*
* @since Added in version 3.3.
*
* @ingroup native
*/
GLFWAPI int glfwGetOSMesaDepthBuffer(GLFWwindow* window, int* width, int* height, int* bytesPerValue, void** buffer);
/*! @brief Returns the `OSMesaContext` of the specified window.
*
* @return The `OSMesaContext` of the specified window, or `NULL` if an
* [error](@ref error_handling) occurred.
*
* @errors Possible errors include @ref GLFW_NO_WINDOW_CONTEXT and @ref
* GLFW_NOT_INITIALIZED.
*
* @thread_safety This function may be called from any thread. Access is not
* synchronized.
*
* @since Added in version 3.3.
*
* @ingroup native
*/
GLFWAPI OSMesaContext glfwGetOSMesaContext(GLFWwindow* window);
#endif
#ifdef __cplusplus
}
#endif
#endif /* _glfw3_native_h_ */
File diff suppressed because it is too large Load Diff
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -204,7 +204,7 @@
<member name="T:StgSharp.Graphics.ElementBuffer">
<summary>
A collecion of handle to Element Buffer Object in OpenGL.
Each <see langword="int"/> value indexed from instance of this class this
Each <see langword="uint"/> value indexed from instance of this class this
is the only handle to one Element Buffer Object.
</summary>
</member>
@@ -234,9 +234,9 @@
<param name="usage">How OpenGL use these data, defined by <see cref="T:StgSharp.Graphics.BufferUsage"/></param>
</member>
<member name="M:StgSharp.Graphics.VertexBuffer.Unbind">
<summary>
<summary>
</summary>
</summary>
</member>
<member name="M:StgSharp.Graphics.glManager.LoadGLapi(StgSharp.Graphics.Form,StgSharp.Graphics.GLfuncLoader)">
<summary>
@@ -252,18 +252,37 @@
<param name="name">Name of the OpenGL api</param>
<returns>The funtion pointer of the api in form of <see cref="T:System.IntPtr"/></returns>
</member>
<member name="M:StgSharp.Graphics.Shader.Compile(System.String[])">
<member name="T:StgSharp.Graphics.glHandle">
<summary>
Compile the vertex shader to be attached to this shader.
A handle to an OpenGL object,
must be indexed from a <see cref="T:StgSharp.Graphics.glHandleSet"/>.
Direct call will cause <see langword="InvalidOperationException"/>
</summary>
</member>
<member name="T:StgSharp.Graphics.glHandleSet">
<summary>
A handle to an OpenGL object.
</summary>
</member>
<member name="M:StgSharp.Graphics.glHandleSet.Free">
<summary>
temporarily release the handle of GLhandle sets.
Please call <see cref="M:StgSharp.Graphics.glHandleSet.Pin"/> method before indexing.
</summary>
</member>
<member name="M:StgSharp.Graphics.glHandleSet.Release">
<summary>
Realse all resource in this handle.
This will release all resource in this <see cref="T:StgSharp.Graphics.glHandle"/>.
This <see langword="glHandle"/> will be not usable.
</summary>
<param name="code">GLSL code of vertex shader.</param>
</member>
<member name="M:StgSharp.Graphics.Shader.AttachTo(System.Int32,StgSharp.Graphics.ShaderProgram)">
<summary>
<summary>
</summary>
<param name="target"></param>
<param name="index"></param>
</summary>
<param name="target"></param>
<param name="index"></param>
</member>
<member name="M:StgSharp.Graphics.ShaderProgram.#ctor(StgSharp.Graphics.IglFunc)">
<summary>
@@ -277,24 +296,24 @@
</member>
<member name="M:StgSharp.Graphics.ShaderProgram.GetUniform``1(System.String)">
<summary>
Get a uniform form current shader,
the value type of the uniform should be provided.
Get a uniform form current shader,
the value type of the uniform should be provided.
</summary>
<param name="name">Name of the Uniform in shader code</param>
<returns></returns>
</member>
<member name="M:StgSharp.Graphics.ShaderProgram.GetUniform``2(System.String)">
<summary>
Get a uniform form current shader,
the value type of the uniform should be provided.
Get a uniform form current shader,
the value type of the uniform should be provided.
</summary>
<param name="name">Name of the Uniform in shader code</param>
<returns></returns>
</member>
<member name="M:StgSharp.Graphics.ShaderProgram.GetUniform``3(System.String)">
<summary>
Get a uniform form current shader,
the value type of the uniform should be provided.
Get a uniform form current shader,
the value type of the uniform should be provided.
</summary>
<param name="name">Name of the Uniform in shader code</param>
<returns></returns>
@@ -332,7 +351,7 @@
<param name="form">The form used as frame update benchmark.</param>
<exception cref="T:System.InvalidOperationException">More than one alingment attached to one form timer</exception>
</member>
<member name="M:StgSharp.Graphics.IglFunc.AttachShader(System.glHandle,System.glHandle)">
<member name="M:StgSharp.Graphics.IglFunc.AttachShader(StgSharp.Graphics.glHandle,StgSharp.Graphics.glHandle)">
<summary>
Same fucntion as OpenGL api glAttachShader.
Only the first <see href="shader"/> in handle
@@ -342,21 +361,21 @@
<param name="program">Shader program to be attachec</param>
<param name="shader">A shader part to attach</param>
</member>
<member name="M:StgSharp.Graphics.IglFunc.BindBuffer(StgSharp.Graphics.BufferType,System.glHandle)">
<member name="M:StgSharp.Graphics.IglFunc.BindBuffer(StgSharp.Graphics.BufferType,StgSharp.Graphics.glHandle)">
<summary>
Bind the indexed buffer object to certain type of buffer
</summary>
<param name="bufferType"></param>
<param name="handle"></param>
</member>
<member name="M:StgSharp.Graphics.IglFunc.BindTexture(System.UInt32,System.glHandle)">
<member name="M:StgSharp.Graphics.IglFunc.BindTexture(System.UInt32,StgSharp.Graphics.glHandle)">
<summary>
Same function as OpenGL api, glBindTexture.
</summary>
<param name="type">Type of texture to bind</param>
<param name="texture">Sign of texture</param>
</member>
<member name="M:StgSharp.Graphics.IglFunc.BindVertexArray(System.glHandle)">
<member name="M:StgSharp.Graphics.IglFunc.BindVertexArray(StgSharp.Graphics.glHandle)">
<summary>
Same function as OpenGL api, glBindVertexArray
</summary>
@@ -379,15 +398,6 @@
<param name="B">Specify the red values used when the color buffers are cleared.</param>
<param name="A">Specify the red values used when the color buffers are cleared.</param>
</member>
<member name="M:StgSharp.Graphics.IglFunc.CompileShader(StgSharp.Graphics.ShaderType,System.String[])">
<summary>
Conpile the provided shader code in string form.
</summary>
<param name="shaderCodeArray">A string array contains all shaders' code</param>
<param name="shaderType">An <see cref="T:StgSharp.Graphics.ShaderType"/> enum represent the type of the shader to
conpile, including vertex shader and fragment shader.</param>
<returns>An handle of conpiled shader</returns>
</member>
<member name="M:StgSharp.Graphics.IglFunc.CreateProgram">
<summary>
Same function as OpenGL api, glCreateProgram
@@ -412,19 +422,19 @@
<param name="share"></param>
<exception cref="T:System.Exception"></exception>
</member>
<member name="M:StgSharp.Graphics.IglFunc.DeleteBuffer(System.glHandle)">
<member name="M:StgSharp.Graphics.IglFunc.DeleteBuffer(StgSharp.Graphics.glHandle)">
<summary>
Same function as OpenGL api, glDeleteBuffer. This method can delete one buffer in one call
</summary>
<param name="handle">a handle representing the buffer to be deleted</param>
</member>
<member name="M:StgSharp.Graphics.IglFunc.DeleteBuffers(System.glHandleSet)">
<member name="M:StgSharp.Graphics.IglFunc.DeleteBuffers(StgSharp.Graphics.glHandleSet)">
<summary>
Same function as OpenGL api, glDeleteBuffer. This method can delete a sets of buffers in one call.
</summary>
<param name="handleSet">Array of buffers to be deleted</param>
</member>
<member name="M:StgSharp.Graphics.IglFunc.DeleteVertexArrays(System.glHandleSet)">
<member name="M:StgSharp.Graphics.IglFunc.DeleteVertexArrays(StgSharp.Graphics.glHandleSet)">
<summary>
Same function as OpenGL api, glDeleteVertexArrays
</summary>
@@ -458,7 +468,7 @@
</summary>
<param name="count">Amount of vao to be generated</param>
</member>
<member name="M:StgSharp.Graphics.IglFunc.GetUniformLocation(System.glHandle,System.String)">
<member name="M:StgSharp.Graphics.IglFunc.GetUniformLocation(StgSharp.Graphics.glHandle,System.String)">
<summary>
Same fucntion as OpenGL api, glGetUniformLocation
</summary>
@@ -545,7 +555,7 @@
<param name="stride">Pixels stride of each sets of data</param>
<param name="pointer"></param>
</member>
<member name="M:StgSharp.Graphics.IglFunc.TextureImage2d``1(System.Int32,System.Int32,System.UInt32,System.UInt32,System.UInt32,System.UInt32,System.UInt32,System.glHandle)">
<member name="M:StgSharp.Graphics.IglFunc.TextureImage2d``1(System.Int32,System.Int32,System.UInt32,System.UInt32,System.UInt32,System.UInt32,System.UInt32,StgSharp.Graphics.glHandle)">
<summary>
Same function as OpenGL api glTexImage2d
</summary>
@@ -566,7 +576,7 @@
<param name="pname">name of parameter</param>
<param name="param">value of parameter</param>
</member>
<member name="M:StgSharp.Graphics.IglFunc.UseProgram(System.glHandle)">
<member name="M:StgSharp.Graphics.IglFunc.UseProgram(StgSharp.Graphics.glHandle)">
<summary>
Same fucntion as OpenGL api glUseShader.
</summary>
@@ -905,31 +915,6 @@
</summary>
<returns></returns>
</member>
<member name="T:System.glHandle">
<summary>
A handle to an OpenGL object,
must be indexed from a <see cref="T:System.glHandleSet"/>.
Direct call will cause <see langword="InvalidOperationException"/>
</summary>
</member>
<member name="T:System.glHandleSet">
<summary>
A handle to an OpenGL object.
</summary>
</member>
<member name="M:System.glHandleSet.Free">
<summary>
temporarily release the handle of GLhandle sets.
Please call <see cref="M:System.glHandleSet.Pin"/> method before indexing.
</summary>
</member>
<member name="M:System.glHandleSet.Release">
<summary>
Realse all resource in this handle.
This will release all resource in this <see cref="T:System.glHandle"/>.
This <see langword="glHandle"/> will be not usable.
</summary>
</member>
<member name="T:Windows.Win32.Foundation.COLORREF">
<summary>The COLORREF value is used to specify an RGB color.</summary>
<remarks>
+3 -2
View File
@@ -1,6 +1,7 @@
using StgSharp.Controlling;
using StgSharp.Graphics;
using StgSharp.Math;
using System;
using System.Diagnostics.CodeAnalysis;
using System.Runtime.InteropServices;
@@ -187,7 +188,7 @@ namespace StgSharp.Graphics
internal unsafe delegate*<uint, uint, int, int, int, int, int, int, int, int, uint, uint, void> glBlitNamedFramebuffer;
internal unsafe delegate*<uint, uint, ulong, UIntPtr, void> glBufferAddressRangeNV;
internal unsafe delegate*<uint, uint, ulong, void> glBufferAttachMemoryNV;
internal unsafe delegate*<uint, IntPtr, void*, uint, void> glBufferData;
internal unsafe delegate*<uint, IntPtr, IntPtr, uint, void> glBufferData;
internal unsafe delegate*<uint, IntPtr, void*, uint, void> glBufferDataARB;
internal unsafe delegate*<uint, IntPtr, UIntPtr, bool, void> glBufferPageCommitmentARB;
internal unsafe delegate*<uint, IntPtr, UIntPtr, uint, ulong, bool, void> glBufferPageCommitmentMemNV;
@@ -1823,7 +1824,7 @@ namespace StgSharp.Graphics
internal unsafe delegate*<uint, uint, uint, void> glShaderOp1EXT;
internal unsafe delegate*<uint, uint, uint, uint, void> glShaderOp2EXT;
internal unsafe delegate*<uint, uint, uint, uint, uint, void> glShaderOp3EXT;
internal unsafe delegate*<uint, uint, byte*, string, byte*, void> glShaderSource;
internal unsafe delegate* unmanaged[Stdcall]<uint, uint, byte**, void*, void> glShaderSource;
internal unsafe delegate*<GLhandleARB, uint, byte**, int*, void> glShaderSourceARB;
internal unsafe delegate*<uint, uint, uint, void> glShaderStorageBlockBinding;
internal unsafe delegate*<bool, void> glShadingRateImageBarrierNV;
@@ -104,6 +104,7 @@ namespace StgSharp
internal static void InternalWriteLog(string logLine, LogType logType)
{
logSyncSemaphore.Wait();
if (!File.Exists(SS_errorlog))
{
FileStream stream = File.Create(SS_errorlog);
@@ -115,6 +116,7 @@ namespace StgSharp
logStream.WriteLine($"{logType}\t@\t{DateTime.Now.ToString("o")}");
logStream.WriteLine(logLine);
}
logSyncSemaphore.Release(1);
}
}
}
@@ -1,36 +1,37 @@
using System;
using System.Runtime.InteropServices;
/**/
namespace StgSharp.Graphics
{
//rename types in style of GLFW
using GLFWbool = Boolean;
//strucs defined in GLFW3.h
#region GLFW3 struct
[StructLayout(LayoutKind.Sequential)]
public unsafe struct GLFWcontext
{
int client;
int source;
int major, minor, revision;
GLFWbool forward, debug, noerror;
int profile;
int robustness;
int release;
private int client;
private int source;
private int major, minor, revision;
private GLFWbool forward, debug, noerror;
private int profile;
private int robustness;
private int release;
//PFNGLGETSTRINGIPROC GetStringi;
IntPtr GetStringi;
private IntPtr GetStringi;
//PFNGLGETINTEGERVPROC GetIntegerv;
IntPtr GetIntegerv;
private IntPtr GetIntegerv;
//PFNGLGETSTRINGPROC GetString;
IntPtr GetString;
private IntPtr GetString;
/*
void (* makeCurrent) (GLFWwindow*);
@@ -41,12 +42,12 @@ namespace StgSharp.Graphics
void (* destroy) (GLFWwindow*);
*/
delegate*<GLFWwindow*> makeCurrent;
delegate*<GLFWwindow*> swapBuffer;
delegate*<int> swapInterval;
delegate*<byte*> extensionSupported;
delegate*<delegate*<void>, void> getProcAddress;
IntPtr destroy;
private delegate*<GLFWwindow*> makeCurrent;
private delegate*<GLFWwindow*> swapBuffer;
private delegate*<int> swapInterval;
private delegate*<byte*> extensionSupported;
private delegate*<delegate*<void>, void> getProcAddress;
private IntPtr destroy;
internal struct egl
{
@@ -55,24 +56,24 @@ namespace StgSharp.Graphics
EGLContext handle;
EGLSurface surface;
*/
void* config;
void* handle;
void* surface;
void* client;
private void* config;
private void* handle;
private void* surface;
private void* client;
}
internal struct osmesa
{
//OSMesaContext handle;
void* handle;
int width;
int height;
void* buffer;
private void* handle;
private int width;
private int height;
private void* buffer;
}
// This is defined in platform.h
//GLFW_PLATFORM_CONTEXT_STATE
}
[StructLayout(LayoutKind.Sequential)]
@@ -95,46 +96,43 @@ namespace StgSharp.Graphics
public int blueBits;
/*! The refresh rate, in Hz, of the video mode.
*/
int refreshRate;
private int refreshRate;
}
[StructLayout(LayoutKind.Sequential)]
public unsafe struct GLFWgammaramp
{
/*! An array of value describing the response of the red channel.
*/
ushort* red;
private ushort* red;
/*! An array of value describing the response of the green channel.
*/
ushort* green;
private ushort* green;
/*! An array of value describing the response of the blue channel.
*/
ushort* blue;
private ushort* blue;
/*! The number of elements in each array.
*/
uint size;
private uint size;
}
[StructLayout(LayoutKind.Sequential)]
public unsafe struct GLFWimage
{
/*! The width, in pixels, of this image.
*/
int width;
private int width;
/*! The height, in pixels, of this image.
*/
int height;
private int height;
/*! The pixel data of this image, arranged left-to-right, top-to-bottom.
*/
byte* pixels;
private byte* pixels;
}
[StructLayout(LayoutKind.Sequential)]
public unsafe struct GLFWgamepadstate
{
/*! The states of each [gamepad button](@ref gamepad_buttons), `GLFW_PRESS`
* or `GLFW_RELEASE`.
*/
@@ -149,40 +147,44 @@ namespace StgSharp.Graphics
public unsafe struct GLFWallocator
{
//GLFWallocatefun allocate;
IntPtr allocate;
private IntPtr allocate;
//GLFWreallocatefun reallocate;
IntPtr reallocate;
private IntPtr reallocate;
//GLFWdeallocatefun deallocate;
IntPtr deallocate;
void* user;
private IntPtr deallocate;
private void* user;
}
[StructLayout(LayoutKind.Sequential)]
public unsafe struct GLFWmonitor
{
byte[] name = new byte[128];
void* userPointer;
private byte[] name = new byte[128];
private void* userPointer;
// Physical dimensions in millimeters.
int widthMM, heightMM;
private int widthMM, heightMM;
// The window whose video mode is current on this monitor
//GLFWwindow* window;
IntPtr window;
private IntPtr window;
//GLFWvidmode* modes;
IntPtr modes;
int modeCount;
GLFWvidmode currentMode;
private IntPtr modes;
GLFWgammaramp originalRamp;
GLFWgammaramp currentRamp;
private int modeCount;
private GLFWvidmode currentMode;
private GLFWgammaramp originalRamp;
private GLFWgammaramp currentRamp;
// not transformed
//GLFW_PLATFORM_MONITOR_STATE;
public GLFWmonitor() { }
public GLFWmonitor()
{ }
}
[StructLayout(LayoutKind.Sequential)]
@@ -214,15 +216,16 @@ namespace StgSharp.Graphics
public int cursorMode = 0;
public fixed byte mouseButtons[8];
public fixed byte keys[349];
// Virtual cursor position when cursor is disabled
public double virtualCursorPosX = 0, virtualCursorPosY = 0;
public bool rawMouseMotion = false;
public GLFWcontext context = default;
public GLFWwindow()
{
}
}
@@ -230,7 +233,7 @@ namespace StgSharp.Graphics
public struct GLFWcursor
{
//GLFWcursor* next;
IntPtr next;
private IntPtr next;
// This is defined in platform.h
// not completed in tranformation
@@ -241,7 +244,6 @@ namespace StgSharp.Graphics
[StructLayout(LayoutKind.Sequential)]
public unsafe struct GLFWerror
{
//GLFWerror* next;
IntPtr next;
int code;
@@ -257,61 +259,64 @@ namespace StgSharp.Graphics
[StructLayout(LayoutKind.Sequential)]
public unsafe struct GLFWinitconfig
{
private GLFWbool hatButtons;
private int angleType;
private int platformID;
GLFWbool hatButtons;
int angleType;
int platformID;
//PFN_vkGetInstanceProcAddr vulkanLoader;
IntPtr vulkanLoader;
struct ns
private IntPtr vulkanLoader;
private struct ns
{
GLFWbool menubar;
GLFWbool chdir;
private GLFWbool menubar;
private GLFWbool chdir;
}
struct x11
private struct x11
{
GLFWbool xcbVulkanSurface;
private GLFWbool xcbVulkanSurface;
}
struct wl
private struct wl
{
int libdecorMode;
private int libdecorMode;
}
}
[StructLayout(LayoutKind.Sequential)]
public unsafe struct GLFWwndconfig
{
private int xpos;
private int ypos;
private int width;
private int height;
private byte* title;
private GLFWbool resizable;
private GLFWbool visible;
private GLFWbool decorated;
private GLFWbool focused;
private GLFWbool autoIconify;
private GLFWbool floating;
private GLFWbool maximized;
private GLFWbool centerCursor;
private GLFWbool focusOnShow;
private GLFWbool mousePassthrough;
private GLFWbool scaleToMonitor;
int xpos;
int ypos;
int width;
int height;
byte* title;
GLFWbool resizable;
GLFWbool visible;
GLFWbool decorated;
GLFWbool focused;
GLFWbool autoIconify;
GLFWbool floating;
GLFWbool maximized;
GLFWbool centerCursor;
GLFWbool focusOnShow;
GLFWbool mousePassthrough;
GLFWbool scaleToMonitor;
internal struct Ns
{
GLFWbool retina = false;
private GLFWbool retina = false;
public fixed byte frameName[256];
public Ns()
{
}
}
internal Ns ns = new Ns();
internal struct X11
{
public fixed byte className[256];
public fixed byte instanceName[256];
@@ -319,12 +324,14 @@ namespace StgSharp.Graphics
{
}
}
internal X11 x11 = new X11();
internal struct Win32
{
GLFWbool keymenu;
private GLFWbool keymenu;
}
internal Win32 win32 = new Win32();
internal struct Wl
@@ -335,6 +342,7 @@ namespace StgSharp.Graphics
{
}
}
internal Wl wl = new Wl();
public GLFWwndconfig()
@@ -345,22 +353,25 @@ namespace StgSharp.Graphics
[StructLayout(LayoutKind.Sequential)]
public unsafe struct GLFWctxconfig
{
int client;
int source;
int major;
int minor;
GLFWbool forward;
GLFWbool debug;
GLFWbool noerror;
int profile;
int robustness;
int release;
private int client;
private int source;
private int major;
private int minor;
private GLFWbool forward;
private GLFWbool debug;
private GLFWbool noerror;
private int profile;
private int robustness;
private int release;
//GLFWwindow* share;
IntPtr share;
private IntPtr share;
internal struct Nsgl
{
GLFWbool offline;
private GLFWbool offline;
}
internal Nsgl nsgl = new Nsgl();
public GLFWctxconfig()
@@ -371,78 +382,81 @@ namespace StgSharp.Graphics
[StructLayout(LayoutKind.Sequential)]
public unsafe struct GLFWfbconfig
{
int redBits;
int greenBits;
int blueBits;
int alphaBits;
int depthBits;
int stencilBits;
int accumRedBits;
int accumGreenBits;
int accumBlueBits;
int accumAlphaBits;
int auxBuffers;
GLFWbool stereo;
int samples;
GLFWbool sRGB;
GLFWbool doublebuffer;
GLFWbool transparent;
uintptr_t handle;
private int redBits;
private int greenBits;
private int blueBits;
private int alphaBits;
private int depthBits;
private int stencilBits;
private int accumRedBits;
private int accumGreenBits;
private int accumBlueBits;
private int accumAlphaBits;
private int auxBuffers;
private GLFWbool stereo;
private int samples;
private GLFWbool sRGB;
private GLFWbool doublebuffer;
private GLFWbool transparent;
private uintptr_t handle;
}
[StructLayout(LayoutKind.Sequential)]
internal unsafe struct GLFWlibrary
{
GLFWbool initialized;
GLFWallocator allocator;
private GLFWbool initialized;
private GLFWallocator allocator;
GLFWplatform platform;
private GLFWplatform platform;
internal unsafe struct Hints
{
GLFWinitconfig init;
GLFWfbconfig framebuffer;
GLFWwndconfig window;
GLFWctxconfig context;
int refreshRate;
private GLFWinitconfig init;
private GLFWfbconfig framebuffer;
private GLFWwndconfig window;
private GLFWctxconfig context;
private int refreshRate;
}
internal Hints hints = new Hints();
//GLFWerror* errorListHead;
IntPtr errorListHead;
private IntPtr errorListHead;
//GLFWcursor* cursorListHead;
IntPtr cursorListHead;
private IntPtr cursorListHead;
//GLFWwindow* windowListHead;
IntPtr windowListHead;
private IntPtr windowListHead;
//GLFWmonitor** monitors;
IntPtr monitors;
int monitorCount;
private IntPtr monitors;
private int monitorCount;
private GLFWbool joysticksInitialized;
GLFWbool joysticksInitialized;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = GLconst.GLFW_JOYSTICK_LAST + 1)]
GLFWjoystick[] joysticks = new GLFWjoystick[GLconst.GLFW_JOYSTICK_LAST + 1];
//GLFWmapping* mappings;
IntPtr mappings;
int mappingCount;
private GLFWjoystick[] joysticks = new GLFWjoystick[GLconst.GLFW_JOYSTICK_LAST + 1];
GLFWls errorSlot;
GLFWls contextSlot;
GLFWmutex errorLock;
//GLFWmapping* mappings;
private IntPtr mappings;
private int mappingCount;
private GLFWls errorSlot;
private GLFWls contextSlot;
private GLFWmutex errorLock;
internal unsafe struct timer
{
ulong offset;
private ulong offset;
// This is defined in platform.h
//not transformed function defination
//GLFW_PLATFORM_LIBRARY_TIMER_STATE
}
internal unsafe struct Egl
{
internal int platform;
@@ -488,101 +502,105 @@ namespace StgSharp.Graphics
internal IntPtr GetPlatformDisplayEXT;
internal IntPtr CreatePlatformWindowSurfaceEXT;
}
internal Egl egl = new Egl();
internal unsafe struct Osmesa
{
void* handle;
private void* handle;
IntPtr CreateContextExt;
IntPtr CreateContextAttribs;
IntPtr DestroyContext;
IntPtr MakeCurrent;
IntPtr GetColorBuffer;
IntPtr GetDepthBuffer;
IntPtr GetProcAddress;
private IntPtr CreateContextExt;
private IntPtr CreateContextAttribs;
private IntPtr DestroyContext;
private IntPtr MakeCurrent;
private IntPtr GetColorBuffer;
private IntPtr GetDepthBuffer;
private IntPtr GetProcAddress;
}
internal Osmesa osmesa = new Osmesa();
internal unsafe struct vk
{
GLFWbool available;
void* handle;
fixed ulong extensions[2];
IntPtr GetInstanceProcAddr;
GLFWbool KHR_surface;
GLFWbool KHR_win32_surface;
GLFWbool MVK_macos_surface;
GLFWbool EXT_metal_surface;
GLFWbool KHR_xlib_surface;
GLFWbool KHR_xcb_surface;
GLFWbool KHR_wayland_surface;
private GLFWbool available;
private void* handle;
private fixed ulong extensions[2];
private IntPtr GetInstanceProcAddr;
private GLFWbool KHR_surface;
private GLFWbool KHR_win32_surface;
private GLFWbool MVK_macos_surface;
private GLFWbool EXT_metal_surface;
private GLFWbool KHR_xlib_surface;
private GLFWbool KHR_xcb_surface;
private GLFWbool KHR_wayland_surface;
public vk()
{
}
}
internal unsafe struct Callbacks
{
IntPtr monitor;
IntPtr joystick;
private IntPtr monitor;
private IntPtr joystick;
}
internal Callbacks callbacks = new Callbacks();
public GLFWlibrary()
{
}
}
[StructLayout(LayoutKind.Sequential)]
public unsafe struct GLFWmapelement
{
byte type;
byte index;
sbyte axisScale;
sbyte axisOffset;
private byte type;
private byte index;
private sbyte axisScale;
private sbyte axisOffset;
}
[StructLayout(LayoutKind.Sequential)]
public unsafe struct GLFWmapping
{
private fixed byte name[128];
private fixed byte guid[33];
fixed byte name[128];
fixed byte guid[33];
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 15)]
GLFWmapelement[] buttons = new GLFWmapelement[15];
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 6)]
GLFWmapelement[] axes = new GLFWmapelement[6];
private GLFWmapelement[] buttons = new GLFWmapelement[15];
public GLFWmapping() { }
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 6)]
private GLFWmapelement[] axes = new GLFWmapelement[6];
public GLFWmapping()
{ }
}
[StructLayout(LayoutKind.Sequential)]
public unsafe struct GLFWjoystick
{
private GLFWbool allocated;
private GLFWbool connected;
private float* axes;
private int axisCount;
private byte* buttons;
private int buttonCount;
private byte* hats;
private int hatCount;
private fixed byte name[128];
private void* userPointer;
private fixed byte guid[33];
GLFWbool allocated;
GLFWbool connected;
float* axes;
int axisCount;
byte* buttons;
int buttonCount;
byte* hats;
int hatCount;
fixed byte name[128];
void* userPointer;
fixed byte guid[33];
//GLFWmapping* mapping;
IntPtr mapping;
private IntPtr mapping;
// This is defined in platform.h
// not completed in transforming
// GLFW_PLATFORM_JOYSTICK_STATE;
public GLFWjoystick() { }
public GLFWjoystick()
{ }
}
[StructLayout(LayoutKind.Sequential)]
@@ -596,13 +614,14 @@ namespace StgSharp.Graphics
[StructLayout(LayoutKind.Sequential)]
public unsafe struct GLFWplatform
{
private int platformID;
int platformID;
// init
//GLFWbool(*init)(void);
IntPtr init;
private IntPtr init;
//void (* terminate) (void);
IntPtr terminate;
private IntPtr terminate;
// input
/* void (* getCursorPos) (GLFWwindow*, double*, double*);
@@ -688,8 +707,10 @@ namespace StgSharp.Graphics
internal IntPtr pollJoystick;
internal IntPtr getMappingName;
internal IntPtr updateGamepadGUID;
// monitor
internal IntPtr freeMonitor;
internal IntPtr getMonitorPos;
internal IntPtr getMonitorContentScale;
internal IntPtr getMonitorWorkarea;
@@ -697,8 +718,10 @@ namespace StgSharp.Graphics
internal IntPtr getVideoMode;
internal IntPtr getGammaRamp;
internal IntPtr setGammaRamp;
// window
internal IntPtr createWindow;
internal IntPtr destroyWindow;
internal IntPtr setWindowTitle;
internal IntPtr setWindowIcon;
@@ -736,25 +759,23 @@ namespace StgSharp.Graphics
internal IntPtr waitEventsTimeout;
internal IntPtr postEmptyEvent;
// EGL
//EGLenum(*getEGLPlatform)(EGLint**);
//EGLNativeDisplayType(*getEGLNativeDisplay)(void);
//EGLNativeWindowType(*getEGLNativeWindow)(GLFWwindow*);
internal IntPtr getEGLPlatform;
internal IntPtr getEGLNativeDisplay;
internal IntPtr getEGLNativeWindow;
// vulkan
//void (* getRequiredInstanceExtensions) (byte**);
//GLFWbool(*getPhysicalDevicePresentationSupport)(VkInstance, VkPhysicalDevice, uint32_t);
//VkResult(*createWindowSurface)(VkInstance, GLFWwindow*,const VkAllocationCallbacks*, VkSurfaceKHR*);
internal IntPtr getRequiredInstanceExtensions;
internal IntPtr VkPhysicalDevice;
internal IntPtr GLFWwindow;
}
[StructLayout(LayoutKind.Sequential)]
@@ -769,8 +790,8 @@ namespace StgSharp.Graphics
[StructLayout(LayoutKind.Sequential)]
internal unsafe struct VkExtensionProperties
{
fixed byte extensionName[256];
uint specVersion;
private fixed byte extensionName[256];
private uint specVersion;
public VkExtensionProperties()
{
@@ -792,27 +813,26 @@ namespace StgSharp.Graphics
}
*/
[StructLayout(LayoutKind.Explicit, Size = 16)]
public struct uintptr_t
{
[FieldOffset(0)]
long part1;
private long part1;
[FieldOffset(8)]
long part2;
private long part2;
}
#endregion
#endregion GLFW3 struct
#region glad struct
[StructLayout(LayoutKind.Sequential)]
internal struct GLsync
{
}
#endregion
#endregion glad struct
}
/**/
+19 -4
View File
@@ -2,6 +2,7 @@
using StgSharp.Controlling;
using StgSharp.Logic;
using StgSharp.Math;
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
@@ -272,7 +273,7 @@ namespace StgSharp.Graphics
else
{
M128 m = default;
m.UInt64[0] = (ulong)windowID;
m.Write<ulong>(0, (ulong)windowID);
GLonUpdate glu = gl as GLonUpdate;
glu.frameworkHandleEnqueue(
(IntPtr)(delegate*<void>)&InternalSwapBuffer, m);
@@ -405,13 +406,27 @@ namespace StgSharp.Graphics
ConcurrentQueue<IntPtr> glActions = (gl as GLonUpdate).GLactionQueue;
#pragma warning restore CS8602
IntPtr currentOperation;
while (gl.GetWindowShouldClose(this))
TimeSpan span = new TimeSpan(100L);
try
{
if (glActions.TryDequeue(out currentOperation))
while (gl.GetWindowShouldClose(this))
{
((delegate*<void>)currentOperation)();
if (glActions.TryDequeue(out currentOperation))
{
((delegate*<void>)currentOperation)();
}
else
{
Thread.Sleep(span);
}
}
}
catch (Exception e)
{
this.ShouldClose = true;
(gl as GLonUpdate).ShowDequeueStream();
throw;
}
}
#endregion form main
+2 -1
View File
@@ -1,5 +1,6 @@
using StgSharp;
using StgSharp.Logic;
using System;
using System.Runtime.CompilerServices;
using System.Threading;
@@ -9,7 +10,6 @@ namespace StgSharp.Graphics
{
public partial class Form
{
private bool isFullyRendered = false;
internal class FrameUpdateTimer
@@ -29,6 +29,7 @@ namespace StgSharp.Graphics
{
get { return tickCounter; }
}
internal void Refresh()
{
refreshed = false;
+7 -7
View File
@@ -1,4 +1,5 @@
using StgSharp.Math;
using System;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
@@ -7,11 +8,9 @@ using System.Text;
namespace StgSharp.Graphics
{
/// <summary>
/// A collecion of handle to Element Buffer Object in OpenGL.
/// Each <see langword="int"/> value indexed from instance of this class this
/// Each <see langword="uint"/> value indexed from instance of this class this
/// is the only handle to one Element Buffer Object.
/// </summary>
public unsafe class ElementBuffer : BufferObjectBase
@@ -22,8 +21,7 @@ namespace StgSharp.Graphics
_bufferHandle = GL.GenBuffers(n);
}
public override void Bind(int index)
public override sealed void Bind(int index)
{
GL.BindBuffer(BufferType.ELEMENT_ARRAY_BUFFER, _bufferHandle[index]);
}
@@ -31,16 +29,18 @@ namespace StgSharp.Graphics
public void SetValue<T>(int index, T[] bufferArray, BufferUsage usage)
where T : struct, IConvertible
{
Console.WriteLine("Setting ebo data.");
GL.BindBuffer(BufferType.ELEMENT_ARRAY_BUFFER, _bufferHandle[index]);
GL.SetBufferData(BufferType.ELEMENT_ARRAY_BUFFER, bufferArray, usage);
}
protected sealed override void Dispose(bool disposing)
protected override sealed void Dispose(bool disposing)
{
if (disposing)
{
GL.DeleteBuffers(_bufferHandle);
_bufferHandle.Release();
}
}
}
}
}
+5 -5
View File
@@ -5,7 +5,6 @@ using System.Text;
namespace StgSharp.Graphics
{
public unsafe class VertexArray : BufferObjectBase
{
internal VertexArray(int n, IglFunc gl)
@@ -15,7 +14,7 @@ namespace StgSharp.Graphics
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public sealed override void Bind(int index)
public override sealed void Bind(int index)
{
GL.BindVertexArray(_bufferHandle[index]);
}
@@ -23,7 +22,7 @@ namespace StgSharp.Graphics
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public void BindNull()
{
GL.BindVertexArray(glHandle.Alloc(0));
GL.BindVertexArray(glHandle.Zero);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
@@ -35,12 +34,13 @@ namespace StgSharp.Graphics
stride, pointer);
}
protected sealed override void Dispose(bool disposing)
protected override sealed void Dispose(bool disposing)
{
if (disposing)
{
GL.DeleteVertexArrays(_bufferHandle);
_bufferHandle.Release();
}
}
}
}
}
+7 -7
View File
@@ -1,4 +1,5 @@
using StgSharp.Math;
using System;
using System.Collections.Generic;
using System.Net.Security;
@@ -9,7 +10,6 @@ using System.Text;
namespace StgSharp.Graphics
{
public unsafe class VertexBuffer : BufferObjectBase
{
internal VertexBuffer(int n, IglFunc glFunc)
@@ -18,7 +18,7 @@ namespace StgSharp.Graphics
_bufferHandle = GL.GenBuffers(n);
}
public sealed override void Bind(int index)
public override sealed void Bind(int index)
{
GL.BindBuffer(BufferType.ARRAY_BUFFER, _bufferHandle[index]);
}
@@ -32,9 +32,9 @@ namespace StgSharp.Graphics
/// <param name="usage">How OpenGL use these data, defined by <see cref="BufferUsage"/></param>
public void SetValue<T>(int index, T bufferData, BufferUsage usage) where T : IMat
{
Console.WriteLine("Setting vbo data.");
GL.BindBuffer(BufferType.ARRAY_BUFFER, _bufferHandle[index]);
GL.SetBufferData(BufferType.ARRAY_BUFFER, bufferData, usage);
}
/// <summary>
@@ -51,7 +51,7 @@ namespace StgSharp.Graphics
}
/// <summary>
///
///
/// </summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public void Unbind()
@@ -65,13 +65,13 @@ namespace StgSharp.Graphics
GL = gl;
}
protected sealed override void Dispose(bool disposing)
protected override sealed void Dispose(bool disposing)
{
if (disposing)
{
GL.DeleteBuffers(_bufferHandle);
_bufferHandle.Release();
}
}
}
}
}
+28 -1
View File
@@ -9,8 +9,35 @@ using System.Security.AccessControl;
using System.Text;
using System.Threading.Tasks;
namespace System
namespace StgSharp.Graphics
{
//TODO 发现一个大问题,paramQueue大多数时候取出的是数组,不是数组句柄,也就是说其内存将被长期固定且不能回收,这是内存泄漏
public unsafe class glArrayHandle
{
internal readonly Array copy;
internal GCHandle handle;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public IntPtr AddressOfArray()
{
return handle.AddrOfPinnedObject();
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static glArrayHandle Alloc<T>(T[] array) where T : struct
{
Array copy = new T[array.Length];
array.CopyTo(copy, 0);
return new glArrayHandle(copy);
}
internal glArrayHandle(Array array)
{
copy = array;
handle = GCHandle.Alloc(array, GCHandleType.Pinned);
}
}
/// <summary>
/// A handle to an OpenGL object,
/// must be indexed from a <see cref="glHandleSet"/>.
+1 -3
View File
@@ -9,7 +9,5 @@ namespace StgSharp.Graphics
{
public unsafe partial class Form
{
}
}
}
+30 -48
View File
@@ -54,13 +54,13 @@ namespace StgSharp.Graphics
[MethodImpl(MethodImplOptions.AggressiveInlining)]
void IglFunc.AttachShader(glHandle program, glHandle shader)
{
api->glAttachShader(*program.valuePtr, *shader.valuePtr);
api->glAttachShader(*program.valuePtr, shader.DirectValue);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
void IglFunc.BindBuffer(BufferType bufferType, glHandle handle)
{
api->glBindBuffer((uint)bufferType, *handle.valuePtr);
api->glBindBuffer((uint)bufferType, handle.DirectValue);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
@@ -93,57 +93,39 @@ namespace StgSharp.Graphics
while (api->glGetError() != 0) { }
}
glHandleSet IglFunc.CompileShader(ShaderType shaderType, params string[] shaderCodeArray)
[MethodImpl(MethodImplOptions.AggressiveInlining)]
unsafe void IglFunc.LoadShaderSource(glHandle shaderHandle, string codeStream)
{
int l = shaderCodeArray.Length;
if (l == 0)
byte[] stream = Encoding.UTF8.GetBytes(codeStream);
fixed (byte* streamPtr = stream)
{
throw new ArgumentException("At least one pice of code is required.");
api->glShaderSource(shaderHandle.DirectValue, 1, &streamPtr, (void*)0);
}
glHandleSet handleSet = new glHandleSet(l);
for (int i = 0; i < l; i++)
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
glHandleSet IglFunc.CreateShaderSet(int count, ShaderType type)
{
glHandleSet ret = new glHandleSet(count);
uint t = (uint)type;
for (int i = 0; i < count; i++)
{
uint shaderID;
byte[] data = Encoding.UTF8.GetBytes(shaderCodeArray[i] + '\0');
fixed (byte* codePtr = data)
uint id = api->glCreateShader(t);
if (id == 0)
{
shaderID = InternalIO.InternalLoadShaderCode(api, codePtr, (int)shaderType);
uint error = api->glGetError();
InternalIO.InternalWriteLog($"Failed in creating shader: {error}", LogType.Error);
throw new Exception();
}
if (shaderID == 0) //compile error handler
{
IntPtr logPtr = InternalIO.InternalReadSSCLog();
string log;
try
{
byte[] logByte = new byte[512];
Marshal.Copy(logPtr, logByte, 0, 512);
log = Encoding.UTF8.GetString(logByte);
log = log.Replace("\0", "");
bool isUseful = false;
foreach (char item in log)
{
if (!char.IsControl(item))
{
isUseful = true; break;
}
}
if (!isUseful)
{
throw new Exception();
}
}
catch (Exception)
{
log = "Failed to compile shader.\n" +
"Failed to get GLSL compiler log";
}
InternalIO.InternalWriteLog(log, LogType.Error);
}
handleSet.SetValue(i, shaderID);
ret.SetValue(i, id);
}
return handleSet;
return ret;
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
void IglFunc.CompileShader(glHandle shaderhandle)
{
api->glCompileShader(shaderhandle.DirectValue);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
@@ -301,7 +283,7 @@ namespace StgSharp.Graphics
api->glBufferData(
(uint)bufferType,
(IntPtr)size,
&bufferData,
(IntPtr)(&bufferData),
(uint)usage);
}
@@ -317,7 +299,7 @@ namespace StgSharp.Graphics
api->glBufferData(
(uint)bufferType,
(IntPtr)size,
bufferPtr,
(IntPtr)bufferPtr,
(uint)usage);
}
+18 -8
View File
@@ -18,11 +18,11 @@ namespace StgSharp.Graphics
private FrameTimeoutException refreshSIgnal = new FrameTimeoutException();
private FrameTimeoutException signal = new FrameTimeoutException("This frame is timeout");
unsafe GLcontext* IglFunc.Context => throw signal;
private GLonTimeout()
{ }
unsafe GLcontext* IglFunc.Context => throw signal;
void IglFunc.ActiveTexture(uint type) => throw signal;
void IglFunc.AfterAlign(Form form, Action action) => throw signal;
@@ -43,12 +43,17 @@ namespace StgSharp.Graphics
void IglFunc.ClearGraphicError() => throw signal;
glHandleSet IglFunc.CompileShader(ShaderType shaderType, params string[] shaderCode) => throw signal;
public void CompileShader(glHandle shaderhandle)
{
throw signal;
}
glHandle IglFunc.CreateProgram() => throw signal;
glHandleSet IglFunc.CreateProgram(int count) => throw signal;
glHandleSet IglFunc.CreateShaderSet(int count, StgSharp.Graphics.ShaderType type) => throw signal;
IntPtr IglFunc.CreateWindowHandle(int width, int height, string tittle, IntPtr monitor, Form share) => throw signal;
glHandle IglFunc.CreatGraphicProgram() => throw signal;
@@ -71,6 +76,11 @@ namespace StgSharp.Graphics
bool IglFunc.GetWindowShouldClose(Form form) => throw signal;
void IglFunc.LoadShaderSource(glHandle shaderHandle, string codeStream)
{
throw signal;
}
void IglFunc.MakeContexCurrent(Form form) => throw signal;
void IglFunc.SetBufferData<T>(BufferType bufferType, T bufferData, BufferUsage usage) => throw signal;
@@ -93,6 +103,11 @@ namespace StgSharp.Graphics
void IglFunc.SetVertexAttribute(uint index, int size, TypeCode t, bool normalized, uint stride, int pointer) => throw signal;
void IglFunc.SwitchContext()
{
throw signal;
}
unsafe void IglFunc.TextureImage2d<T>(int target, int level, uint internalformat, uint width, uint height, uint format, uint type, glHandle pixels) => throw signal;
void IglFunc.TextureParameter(int target, uint pname, int param) => throw signal;
@@ -102,10 +117,5 @@ namespace StgSharp.Graphics
void IglFunc.Viewport(int x, int y, uint width, uint height) => throw signal;
internal static GLonTimeout Set() => singleInstance;
void IglFunc.SwitchContext()
{
throw signal;
}
}
}
+54 -42
View File
@@ -17,15 +17,13 @@ namespace StgSharp.Graphics
{
private static ConcurrentQueue<IntPtr> glActionQueue;
private static GLparamQueue paramQueue;
private FrameTimeoutException refreshSignal = new();
private GLcontext* api;
private FrameTimeoutException refreshSignal = new();
private IntPtr SwapBufferPtr = (IntPtr)(delegate*<IntPtr, void>)&InternalIO.glfwSwapBuffers;
GLcontext* IglFunc.Context
internal void ShowDequeueStream()
{
get => api;
paramQueue.ShowDequeueLog();
}
internal GLonUpdate(GLcontext* context)
@@ -38,6 +36,11 @@ namespace StgSharp.Graphics
api = context;
}
GLcontext* IglFunc.Context
{
get => api;
}
internal static GLparamQueue ParamQueue
{
get { return paramQueue; }
@@ -84,8 +87,8 @@ namespace StgSharp.Graphics
void IglFunc.BindBuffer(BufferType bufferType, glHandle handle)
{
M128 m = default;
m.UInt32[0] = (uint)bufferType;
m.UInt64[1] = (ulong)handle.Handle;
m.Write<uint>(0, (uint)bufferType);
m.Write<ulong>(1, (ulong)handle.valuePtr);
paramQueue.Enqueue(m);
glActionQueue.Enqueue(BindBufferPtr);
}
@@ -94,8 +97,8 @@ namespace StgSharp.Graphics
void IglFunc.BindTexture(uint type, glHandle texture)
{
M128 m = default;
m.UInt64[1] = (ulong)texture.valuePtr;
m.UInt32[0] = (uint)type;
m.Write<uint>(0, (uint)type);
m.Write<ulong>(1, (ulong)texture.valuePtr);
paramQueue.Enqueue(m);
glActionQueue.Enqueue(BindTexturePtr);
}
@@ -110,6 +113,7 @@ namespace StgSharp.Graphics
[MethodImpl(MethodImplOptions.AggressiveInlining)]
void IglFunc.Clear(MaskBufferBit mask)
{
paramQueue.Enqueue((int)mask);
glActionQueue.Enqueue(ClearPtr);
}
@@ -126,22 +130,10 @@ namespace StgSharp.Graphics
glActionQueue.Enqueue(ClearGraphicErrorPtr);
}
glHandleSet IglFunc.CompileShader(ShaderType shaderType, params string[] shaderCode)
unsafe void IglFunc.CompileShader(glHandle shaderhandle)
{
int l = shaderCode.Length;
if (l == 0)
{
throw new ArgumentException("Should input at least one piece of shader code");
}
glHandleSet shaderHandle = new glHandleSet(shaderCode.Length);
paramQueue.Enqueue((int)shaderType, l);
for (int i = 0; i < l; i++)
{
GCHandle codePtr = GCHandle.Alloc(Encoding.UTF8.GetBytes(shaderCode[i] + '\0'), GCHandleType.Pinned);
paramQueue.Enqueue((IntPtr)(shaderHandle.handle + i), codePtr.AddrOfPinnedObject());
}
paramQueue.Enqueue((IntPtr)shaderhandle.valuePtr);
glActionQueue.Enqueue(CompileShaderPtr);
return shaderHandle;
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
@@ -153,18 +145,31 @@ namespace StgSharp.Graphics
return h;
}
//TODO
[MethodImpl(MethodImplOptions.AggressiveInlining)]
glHandleSet IglFunc.CreateProgram(int count)
{
M128 m = default;
glHandleSet h = new glHandleSet(count);
m.UInt64[0] = (ulong)h.handle;
m.Int32[2] = count;
m.Write<ulong>(0, (ulong)h.handle);
m.Write<int>(2, count);
paramQueue.Enqueue(m);
glActionQueue.Enqueue(CreateProgramSetPtr);
return h;
}
glHandleSet IglFunc.CreateShaderSet(int count, ShaderType type)
{
glHandleSet ret = new glHandleSet(count);
M128 m = new M128();
m.Write<int>(0, count);
m.Write<uint>(1, (uint)type);
m.Write<ulong>(1, (ulong)ret.handle);
paramQueue.Enqueue(m);
glActionQueue.Enqueue(CreateShaderPtr);
return ret;
}
IntPtr IglFunc.CreateWindowHandle(int width, int height, string tittle, IntPtr monitor, Form share)
{
byte[] tittleBytes = Encoding.UTF8.GetBytes(tittle);
@@ -203,8 +208,8 @@ namespace StgSharp.Graphics
unsafe void IglFunc.DeleteBuffer(glHandle handle)
{
M128 m = default;
m.UInt64[0] = (ulong)handle.Handle;
m.UInt32[2] = 1;
m.Write<ulong>(0, (ulong)handle.valuePtr);
m.Write(2, 1);
paramQueue.Enqueue(m);
glActionQueue.Enqueue(DeleBufferPtr);
}
@@ -212,16 +217,16 @@ namespace StgSharp.Graphics
unsafe void IglFunc.DeleteBuffers(glHandleSet handle)
{
M128 m = default;
m.UInt32[2] = (uint)handle.length;
m.UInt64[0] = (ulong)handle.handle;
m.Write<uint>(2, (uint)handle.length);
m.Write<ulong>(0, (ulong)handle.handle);
paramQueue.Enqueue(m);
glActionQueue.Enqueue(DeleBufferPtr);
}
unsafe void IglFunc.DeleteVertexArrays(glHandleSet arrays)
{
M128 m = default; m.UInt64[1] = (ulong)arrays.handle;
m.Int32[0] = arrays.length;
M128 m = default; m.Write<ulong>(1, (ulong)arrays.handle);
m.Write<int>(0, arrays.length);
paramQueue.Enqueue(m);
glActionQueue.Enqueue(DeleteVertexArrayPtr);
}
@@ -258,7 +263,7 @@ namespace StgSharp.Graphics
unsafe glHandleSet IglFunc.GenBuffers(int count)
{
glHandleSet h = new glHandleSet(count);
M128 m = default; m.UInt32[2] = (uint)count; m.UInt64[0] = (ulong)h.handle;
M128 m = default; m.Write<uint>(2, (uint)count); m.Write<ulong>(0, (ulong)h.handle);
paramQueue.Enqueue(m);
glActionQueue.Enqueue(GenBufferPtr);
return h;
@@ -267,7 +272,7 @@ namespace StgSharp.Graphics
unsafe glHandleSet IglFunc.GenTextures(int count)
{
glHandleSet h = new glHandleSet(count);
M128 m = default; m.UInt32[2] = (uint)count; m.UInt64[0] = (ulong)h.handle;
M128 m = default; m.Write<uint>(2, (uint)count); m.Write<ulong>(0, (ulong)h.handle);
paramQueue.Enqueue(m);
glActionQueue.Enqueue(GenTexturesPtr);
return h;
@@ -276,7 +281,7 @@ namespace StgSharp.Graphics
unsafe glHandleSet IglFunc.GenVertexArrays(int count)
{
glHandleSet h = new glHandleSet(count);
M128 m = default; m.UInt32[2] = (uint)count; m.UInt64[0] = (ulong)h.handle;
M128 m = default; m.Write<uint>(2, (uint)count); m.Write<ulong>(0, (ulong)h.handle);
paramQueue.Enqueue(m);
glActionQueue.Enqueue(GenTexturesPtr);
return h;
@@ -286,9 +291,9 @@ namespace StgSharp.Graphics
unsafe glSHandle IglFunc.GetUniformLocation(glHandle program, string ptr)
{
glSHandle h = glSHandle.Alloc(0);
M128 m;
m.UInt64[0] = (ulong)program.Handle;
m.UInt64[1] = (ulong)GCHandle.Alloc(Encoding.UTF8.GetBytes(ptr)).AddrOfPinnedObject();
M128 m = default;
m.Write<ulong>(0, (ulong)program.Handle);
m.Write<ulong>(1, (ulong)GCHandle.Alloc(Encoding.UTF8.GetBytes(ptr)).AddrOfPinnedObject());
paramQueue.Enqueue(m);
paramQueue.Enqueue((IntPtr)h.valuePtr);
glActionQueue.Enqueue(GetUniformLocationPtr);
@@ -310,6 +315,12 @@ namespace StgSharp.Graphics
InternalIO.glfwSwapBuffers(form.windowID);
}
void IglFunc.LoadShaderSource(glHandle shaderHandle, string codeStream)
{
paramQueue.Enqueue(shaderHandle);
paramQueue.Enqueue(codeStream);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
void IglFunc.MakeContexCurrent(Form form)
{
@@ -330,7 +341,8 @@ namespace StgSharp.Graphics
void IglFunc.SetBufferData<T>(BufferType bufferType, T[] bufferArray, BufferUsage usage)
{
paramQueue.Enqueue((uint)bufferType, (uint)usage);
paramQueue.Enqueue((IntPtr)(Marshal.SizeOf<T>() * bufferArray.Length), GCHandle.Alloc(bufferArray).AddrOfPinnedObject());
paramQueue.Enqueue((IntPtr)(Marshal.SizeOf<T>() * bufferArray.Length));
paramQueue.Enqueue<T>(bufferArray);
glActionQueue.Enqueue(BufferDataPtr);
}
@@ -359,9 +371,9 @@ namespace StgSharp.Graphics
void IglFunc.TextureParameter(int target, uint pname, int param)
{
M128 m = default;
m.Int32[0] = target;
m.UInt32[2] = pname;
m.Int32[3] = param;
m.Write<int>(0, target);
m.Write<uint>(2, pname);
m.Write<int>(3, param);
paramQueue.Enqueue(m);
glActionQueue.Enqueue(TextureParameterPtr);
}
@@ -382,11 +394,11 @@ namespace StgSharp.Graphics
[MethodImpl(MethodImplOptions.AggressiveInlining)]
internal void frameworkHandleEnqueue(IntPtr methodHandle, params M128[] param)
{
glActionQueue.Enqueue(methodHandle);
foreach (M128 item in param)
{
paramQueue.Enqueue(item);
}
glActionQueue.Enqueue(methodHandle);
}
}
}
@@ -18,16 +18,17 @@ namespace StgSharp.Graphics
private IntPtr ActiveTexturePtr = (IntPtr)(delegate*<void>)&InternalActiveTexture;
private IntPtr AttachShaderPtr = (IntPtr)(delegate*<void>)&InternalAttachShader;
private IntPtr BindBufferPtr = (IntPtr)(delegate*<void>)&InternalBindBuffer;
private IntPtr ClearColorPtr = (IntPtr)(delegate*<void>)&InternalClearColor;
private IntPtr ClearGraphicErrorPtr = (IntPtr)(delegate*<void>)&InternalClearGraphicError;
private IntPtr CompileShaderPtr = (IntPtr)(delegate*<void>)&InternalCompileShader;
private IntPtr DeleBufferPtr = (IntPtr)(delegate*<void>)&InternalDeleteBuffer;
private IntPtr BindTexturePtr = (IntPtr)(delegate*<void>)&InternalBindTexture;
private IntPtr BindVertexArrayPtr = (IntPtr)(delegate*<void>)&InternalBindVertexArray;
private IntPtr BufferDataPtr = (IntPtr)(delegate*<void>)&InternalSetBufferData;
private IntPtr ClearColorPtr = (IntPtr)(delegate*<void>)&InternalClearColor;
private IntPtr ClearGraphicErrorPtr = (IntPtr)(delegate*<void>)&InternalClearGraphicError;
private IntPtr ClearPtr = (IntPtr)(delegate*<void>)&InternalClear;
private IntPtr CompileShaderPtr = (IntPtr)(delegate*<void>)&InternalCompileShader;
private IntPtr CreateProgramPtr = (IntPtr)(delegate*<void>)&InternalCreateProgram;
private IntPtr CreateProgramSetPtr = (IntPtr)(delegate*<void>)&InternalCreateProgramSet;
private IntPtr CreateShaderPtr = (IntPtr)(delegate*<void>)&InternalCreateShader;
private IntPtr DeleBufferPtr = (IntPtr)(delegate*<void>)&InternalDeleteBuffer;
private IntPtr DeleteVertexArrayPtr = (IntPtr)(delegate*<void>)&InternalDeleteVertexArrays;
private IntPtr DrawElementsPtr = (IntPtr)(delegate*<void>)&InternalDrawElements;
private IntPtr GenBufferPtr = (IntPtr)(delegate*<void>)&InternalGenBuffers;
@@ -35,6 +36,7 @@ namespace StgSharp.Graphics
private IntPtr GenVertexArraysPtr = (IntPtr)(delegate*<void>)&InternalGenVertexArrays;
private IntPtr GetUniformLocationPtr = (IntPtr)(delegate*<void>)&InternalGetUniformLocation;
private IntPtr SetVertexArrayPtr = (IntPtr)(delegate*<void>)&InternalSetVertexAttribute;
private IntPtr ShaderSourcePtr = (IntPtr)(delegate*<void>)&InternalShaderSource;
private IntPtr textureImage2dPtr = (IntPtr)(delegate*<void>)&InternalTextureImage2d;
private IntPtr TextureParameterPtr = (IntPtr)(delegate*<void>)&InternalTextureParameter;
private IntPtr UseProgramPtr = (IntPtr)(delegate*<void>)&InternalUseProgram;
@@ -56,16 +58,21 @@ namespace StgSharp.Graphics
private static void InternalBindBuffer()
{
M128 m = default;
M128 m = new M128();
paramQueue.TryDequeue(out m);
paramQueue.context->glBindBuffer(m.UInt32[0], *(uint*)m.UInt64[1]);
uint usage = m.Read<uint>(0);
uint handle = *(uint*)m.Read<ulong>(1);
paramQueue.context->glBindBuffer(usage, handle);
}
private static void InternalBindTexture()
{
M128 m = default;
paramQueue.TryDequeue(out m);
paramQueue.context->glBindTexture(m.UInt32[0], *(uint*)m.UInt64[1]);
paramQueue.context->glBindTexture(
m.Read<uint>(0),
*(uint*)m.Read<ulong>(1)
);
}
private static void InternalBindVertexArray()
@@ -94,53 +101,14 @@ namespace StgSharp.Graphics
while (paramQueue.context->glGetError() != 0) { }
}
private static void InternalCompileShader()
private static unsafe void InternalCompileShader()
{
IntPtr shaderHandle, codeHandle;
int count, type;
paramQueue.TryDequeue(out type, out count);
for (int i = 0; i < count; i++)
{
paramQueue.TryDequeue(out shaderHandle, out codeHandle);
GCHandle code = GCHandle.FromIntPtr(codeHandle);
byte[] c = (byte[])code.Target;
Console.WriteLine(Encoding.UTF8.GetString(c));
*(uint*)shaderHandle = InternalIO.InternalLoadShaderCode(paramQueue.context, (byte*)codeHandle, type);
if (*(uint*)shaderHandle == 0)
{
IntPtr logPtr = InternalIO.InternalReadSSCLog();
string log;
try
{
byte[] logByte = new byte[512];
Marshal.Copy(logPtr, logByte, 0, 512);
log = Encoding.UTF8.GetString(logByte);
log = log.Replace("\0", "");
bool isUseful = false;
foreach (char item in log)
{
if (!char.IsControl(item))
{
isUseful = true; break;
}
}
if (!isUseful)
{
throw new Exception();
}
}
catch (Exception)
{
log = "Failed to compile shader.\nFailed to get GLSL compiler log";
}
InternalIO.InternalWriteLog(log, LogType.Error);
}
GCHandle.FromIntPtr(codeHandle).Free();
}
IntPtr handle = default;
paramQueue.TryDequeue(out handle);
paramQueue.context->glCompileShader(*(uint*)handle);
}
//TODO
private static void InternalCreateProgram()
{
IntPtr programHandle = default;
@@ -153,25 +121,36 @@ namespace StgSharp.Graphics
uint* programHandle;
M128 m = default;
paramQueue.TryDequeue(out m);
programHandle = (uint*)m.UInt64[0];
for (int i = 0; i < m.Int32[2]; i++)
programHandle = (uint*)m.Read<ulong>(0);
for (int i = 0; i < m.Read<int>(2); i++)
{
*(programHandle + i) = paramQueue.context->glCreateProgram();
}
}
private static unsafe void InternalCreateShader()
{
M128 m = default;
paramQueue.TryDequeue(out m);
int count = m.Read<int>(0); uint type = m.Read<uint>(1); uint* handle = (uint*)m.Read<ulong>(1);
for (int i = 0; i < count; i++)
{
*(handle + i) = paramQueue.context->glCreateShader(type);
}
}
private static void InternalDeleteBuffer()
{
M128 m = default;
paramQueue.TryDequeue(out m);
paramQueue.context->glDeleteBuffers(m.UInt32[2], (uint*)m.UInt64[0]);
paramQueue.context->glDeleteBuffers(m.Read<uint>(2), (uint*)m.Read<ulong>(0));
}
private static void InternalDeleteVertexArrays()
{
M128 m = default;
paramQueue.TryDequeue(out m);
paramQueue.context->glDeleteVertexArrays((uint)m.Int32[0], (uint*)m.UInt64[0]);
paramQueue.context->glDeleteVertexArrays((uint)m.Read<int>(0), (uint*)m.Read<ulong>(0));
}
private static void InternalDrawElements()
@@ -187,21 +166,21 @@ namespace StgSharp.Graphics
{
M128 m = default;
paramQueue.TryDequeue(out m);
paramQueue.context->glGenBuffers(m.UInt32[2], (uint*)m.UInt64[0]);
paramQueue.context->glGenBuffers(m.Read<uint>(2), (uint*)m.Read<ulong>(0));
}
private static void InternalGenTextures()
{
M128 m = default;
paramQueue.TryDequeue(out m);
paramQueue.context->glGenTextures(m.UInt32[2], (uint*)m.UInt64[0]);
paramQueue.context->glGenTextures(m.Read<uint>(2), (uint*)m.Read<ulong>(0));
}
private static void InternalGenVertexArrays()
{
M128 m = default;
paramQueue.TryDequeue(out m);
paramQueue.context->glGenVertexArrays(m.UInt32[2], (uint*)m.UInt64[0]);
paramQueue.context->glGenVertexArrays(m.Read<uint>(2), (uint*)m.Read<ulong>(0));
}
private static void InternalGetUniformLocation()
@@ -215,11 +194,12 @@ namespace StgSharp.Graphics
private static void InternalSetBufferData()
{
uint type = 0, use = 0;
IntPtr size = default, handle = default;
IntPtr size = default;
glArrayHandle array = default;
paramQueue.TryDequeue(out type, out use);
paramQueue.TryDequeue(out size, out handle);
paramQueue.context->glBufferData(type, size, (void*)handle, use);
GCHandle.FromIntPtr(handle).Free();
paramQueue.TryDequeue(out size);
paramQueue.TryDequeue(out array);
paramQueue.context->glBufferData(type, size, array.AddressOfArray(), use);
}
private static void InternalSetVertexAttribute()
@@ -232,6 +212,18 @@ namespace StgSharp.Graphics
paramQueue.context->glEnableVertexAttribArray(index);
}
private static unsafe void InternalShaderSource()
{
IntPtr handle = default;
byte[] stream = Array.Empty<byte>();
paramQueue.TryDequeue(out handle);
paramQueue.TryDequeue(out stream);
fixed (byte* sPtr = stream)
{
paramQueue.context->glShaderSource(*(uint*)handle, 1, &sPtr, (void*)0);
}
}
private static void InternalTextureImage2d()
{
IntPtr pix = IntPtr.Zero;
@@ -240,14 +232,13 @@ namespace StgSharp.Graphics
paramQueue.TryDequeue(out level, out internalFormat, out width, out height);
paramQueue.TryDequeue(out target, out format, out type);
paramQueue.context->glTexImage2D(target, (int)level, internalFormat, width, height, 0, format, type, (void*)pix);
GCHandle.FromIntPtr(pix).Free();
}
private static void InternalTextureParameter()
{
M128 m = default;
paramQueue.TryDequeue(out m);
paramQueue.context->glTextureParameteri(m.UInt32[0], m.UInt32[2], m.Int32[3]);
paramQueue.context->glTextureParameteri(m.Read<uint>(0), m.Read<uint>(2), m.Read<int>(3));
}
private static void InternalUseProgram()
@@ -261,7 +252,7 @@ namespace StgSharp.Graphics
{
M128 m = default;
paramQueue.TryDequeue(out m);
paramQueue.context->glViewport(m.Int32[0], m.Int32[1], m.UInt32[2], m.UInt32[3]);
paramQueue.context->glViewport(m.Read<int>(0), m.Read<int>(1), m.Read<uint>(2), m.Read<uint>(3));
}
private void InternalMakeContexCurrent(Form form)
@@ -269,11 +260,6 @@ namespace StgSharp.Graphics
throw new NotImplementedException();
}
private void InternalSetValue(Uniform<float, float, float, float> uniform, float v0, float v1, float v2, float v3)
{
throw new NotImplementedException();
}
private void InternalSwitchContext()
{
throw new NotImplementedException();
@@ -1,4 +1,5 @@
using StgSharp;
using System;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
@@ -19,9 +20,10 @@ namespace StgSharp.Graphics
return new ShaderProgram(GL);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
protected Shader CreateShader(ShaderType type, int count)
{
return new Shader(this.gl, new glHandleSet(count), type);
return new Shader(this.gl, gl.CreateShaderSet(count, type), type);
}
}
@@ -38,18 +40,20 @@ namespace StgSharp.Graphics
type = usage;
}
/// <summary>
/// Compile the vertex shader to be attached to this shader.
/// </summary>
/// <param name="code">GLSL code of vertex shader.</param>
public unsafe void Compile(params string[] code)
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public unsafe void Compile(int index, string code)
{
glHandleSet.Copy(GL.CompileShader(type, code), handle);
if (code == null)
{
throw new ArgumentNullException("Must provide enough code");
}
GL.LoadShaderSource(handle[index], code + '\0');
GL.CompileShader(handle[index]);
}
//TODO:写链接着色器的文档注释
/// <summary>
///
///
/// </summary>
/// <param name="target"></param>
/// <param name="index"></param>
@@ -103,8 +107,8 @@ namespace StgSharp.Graphics
}
/// <summary>
/// Get a uniform form current shader,
/// the value type of the uniform should be provided.
/// Get a uniform form current shader,
/// the value type of the uniform should be provided.
/// </summary>
/// <param name="name">Name of the Uniform in shader code</param>
/// <returns></returns>
@@ -113,9 +117,10 @@ namespace StgSharp.Graphics
{
return new Uniform<T>(this, name, GL);
}
/// <summary>
/// Get a uniform form current shader,
/// the value type of the uniform should be provided.
/// Get a uniform form current shader,
/// the value type of the uniform should be provided.
/// </summary>
/// <param name="name">Name of the Uniform in shader code</param>
/// <returns></returns>
@@ -125,9 +130,10 @@ namespace StgSharp.Graphics
{
return new Uniform<T, U>(this, name, GL);
}
/// <summary>
/// Get a uniform form current shader,
/// the value type of the uniform should be provided.
/// Get a uniform form current shader,
/// the value type of the uniform should be provided.
/// </summary>
/// <param name="name">Name of the Uniform in shader code</param>
/// <returns></returns>
@@ -148,4 +154,4 @@ namespace StgSharp.Graphics
GL.UseProgram(handle);
}
}
}
}
@@ -0,0 +1,108 @@
using StgSharp.Graphics;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;
namespace StgSharpDebug.Graphics.GL.ShaderEdit
{
public class ShaderGenerator
{
private List<string> codeList;
private List<ShaderFunction> usedShaderFunctions;
public Uniform<T> DefineUniform<T>() where T : struct
{
throw new NotImplementedException();
}
}
public class ShaderFunction
{
private string name;
private List<string> codeList;
private List<ShaderParameter> inputList;
private ShaderParameter outPut;
public int ParameterCount
{
get { return inputList.Count; }
}
public void EmitCall(ShaderFunction function, ShaderParameter outPut, params ShaderParameter[] inputParams)
{
if (inputParams.Length != function.ParameterCount)
{
throw new ArgumentException("Provided parameters does not match function's parameter list.");
}
if (!ShaderParameter.IsSameType(outPut, function.outPut))
{
throw new Exception("Provided parameters does not match function's parameter list.");
}
for (int i = 0; i < inputParams.Length; i++)
{
if (!ShaderParameter.IsSameType(function.inputList[i], inputParams[i]))
{
throw new Exception("Provided parameters does not match function's parameter list.");
}
}
string codeLine = "";
if (outPut != ShaderParameter.Void)
{
codeLine += $"{outPut.name} = ";
}
codeLine += $"{function.name}(";
foreach (ShaderParameter inputParam in inputParams)
{
codeLine += inputParam.name;
}
codeLine += ");\n";
codeList.Add(codeLine);
}
}
public class ShaderParameter
{
internal readonly InternalShaderType type;
internal readonly string name;
internal readonly bool isReadOnly;
public ShaderParameter(string name, InternalShaderType type)
{
this.name = name;
this.type = type;
isReadOnly = false;
}
public static readonly ShaderParameter Void = new ShaderParameter("", InternalShaderType.Void);
public static bool IsSameType(ShaderParameter param1, ShaderParameter param2)
{
if (param1.type != InternalShaderType.Struct)
{
return param1.type == param2.type;
}
else
{
throw new Exception("Struct is currently not supported.");
}
}
}
public enum InternalShaderType
{
#pragma warning disable CS1591
Struct, Void,
Int, UInt,
Float, Double,
Vector2, Vector3, Vector4,
VectorD2, VectorD3, VectorD4,
Matrix2x2, Matrix2x3, Matrix2x4,
Matrix3x2, Matrix3x3, Matrix3x4,
Matrix4x2, Matrix4x3, Matrix4x4,
#pragma warning restore CS1591
}
}
@@ -1,4 +1,5 @@
using StgSharp.Math;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -8,7 +9,6 @@ using System.Text;
namespace StgSharp.Graphics
{
public class Uniform<T> where T : struct
{
internal glSHandle id;
@@ -25,10 +25,8 @@ namespace StgSharp.Graphics
{
this.id = id;
}
}
public class Uniform<T, U>
where T : struct
where U : struct
@@ -88,12 +86,10 @@ namespace StgSharp.Graphics
{
this.id = id;
}
}
internal partial class GLonRender : IglFunc
{
[MethodImpl(MethodImplOptions.AggressiveInlining)]
unsafe void IglFunc.SetValue(Uniform<float> uniform, float v0)
{
@@ -156,8 +152,9 @@ namespace StgSharp.Graphics
unsafe void IglFunc.SetValue(Uniform<float, float> uniform, float f0, float f1)
{
M128 m = default;
m.UInt64[0] = (ulong)uniform.id.valuePtr;
m.Single[2] = f0; m.Single[3] = f1;
m.Write<ulong>(0, (ulong)uniform.id.valuePtr);
m.Write<float>(2, f0);
m.Write<float>(3, f1);
paramQueue.Enqueue(m);
glActionQueue.Enqueue(UniformVal2fPtr);
}
@@ -179,8 +176,8 @@ namespace StgSharp.Graphics
unsafe void IglFunc.SetValue(Uniform<float> uniform, float f0)
{
M128 m = default;
m.UInt64[0] = (ulong)uniform.id.valuePtr;
m.Single[2] = f0;
m.Write<ulong>(0, (ulong)uniform.id.valuePtr);
m.Write<float>(2, f0);
paramQueue.Enqueue(m);
glActionQueue.Enqueue(UniformVal1fPtr);
}
@@ -188,8 +185,8 @@ namespace StgSharp.Graphics
unsafe void IglFunc.SetValue(Uniform<int> uniform, int i0)
{
M128 m = default;
m.UInt64[0] = (ulong)uniform.id.valuePtr;
m.Int32[2] = i0;
m.Write<ulong>(0, (ulong)uniform.id.valuePtr);
m.Write<int>(2, i0);
paramQueue.Enqueue(m);
glActionQueue.Enqueue(UniformVal1fPtr);
}
@@ -205,28 +202,28 @@ namespace StgSharp.Graphics
{
M128 m = default;
paramQueue.TryDequeue(out m);
paramQueue.context->glUniform1f(*(int*)m.UInt64[0], m.Single[2]);
paramQueue.context->glUniform1f(*(int*)m.Read<uint>(0), m.Read<uint>(2));
}
private static unsafe void UniformVal1fv()
{
M128 m = default;
paramQueue.TryDequeue(out m);
paramQueue.context->glUniform1fv(*(int*)m.UInt64[0], 4, (Vec4d*)m.UInt64[0]);
paramQueue.context->glUniform1fv(*(int*)m.Read<ulong>(0), 4, (Vec4d*)&m.vec);
}
private static void UniformVal1i()
{
M128 m = default;
paramQueue.TryDequeue(out m);
paramQueue.context->glUniform1i(*(int*)m.UInt64[0], m.Int32[2]);
paramQueue.context->glUniform1i(*(int*)m.Read<uint>(0), m.Read<int>(2));
}
private static void UniformVal2f()
{
M128 m = default;
paramQueue.TryDequeue(out m);
paramQueue.context->glUniform2f(*(int*)m.UInt64[0], m.Single[2], m.Single[3]);
paramQueue.context->glUniform2f(*(int*)m.Read<uint>(0), m.Read<float>(2), m.Read<float>(3));
}
private static void UniformVal3f()
@@ -235,16 +232,16 @@ namespace StgSharp.Graphics
M128 m = default;
paramQueue.TryDequeue(out handle);
paramQueue.TryDequeue(out m);
paramQueue.context->glUniform3f(*(int*)handle, m.Single[0], m.Single[1], m.Single[2]);
paramQueue.context->glUniform3f(*(int*)handle, m.Read<float>(0), m.Read<float>(1), m.Read<float>(2));
}
private static void UniformVal4f()
{
IntPtr handle = IntPtr.Zero;
M128 m = default;
paramQueue.TryDequeue(out handle);
paramQueue.TryDequeue(out m);
paramQueue.context->glUniform4f(*(int*)handle, m.Single[0], m.Single[1], m.Single[2], m.Single[2]);
paramQueue.context->glUniform4f(*(int*)handle, m.Read<float>(0), m.Read<float>(1), m.Read<float>(2), m.Read<float>(3));
}
}
}
}
@@ -1,4 +1,5 @@
using StgSharp.Math;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -746,7 +747,6 @@ namespace StgSharp.Graphics
{
if (!form.IsSingleThread)
{
Console.WriteLine("This context runs on two threads");
form.RenderThread.Start();
}
}
@@ -1001,7 +1001,7 @@ namespace StgSharp.Graphics
contextPtr->glBeginQuery = (delegate*<uint, uint, void>)load("glBeginQuery");
contextPtr->glBindBuffer = (delegate*<uint, uint, void>)load("glBindBuffer");
contextPtr->glBufferData = (delegate*<uint, IntPtr, void*, uint, void>)load("glBufferData");
contextPtr->glBufferData = (delegate*<uint, IntPtr, IntPtr, uint, void>)load("glBufferData");
contextPtr->glBufferSubData = (delegate*<uint, IntPtr, UIntPtr, void*, void>)load("glBufferSubData");
contextPtr->glDeleteBuffers = (delegate*<uint, uint*, void>)load("glDeleteBuffers");
contextPtr->glDeleteQueries = (delegate*<uint, uint*, void>)load("glDeleteQueries");
@@ -1065,7 +1065,7 @@ namespace StgSharp.Graphics
contextPtr->glIsProgram = (delegate*<uint, bool>)load("glIsProgram");
contextPtr->glIsShader = (delegate*<uint, bool>)load("glIsShader");
contextPtr->glLinkProgram = (delegate*<uint, void>)load("glLinkProgram");
contextPtr->glShaderSource = (delegate*<uint, uint, byte*, string, byte*, void>)load("glShaderSource");
contextPtr->glShaderSource = (delegate* unmanaged[Stdcall]<uint, uint, byte**, void*, void>)load("glShaderSource");
contextPtr->glStencilFuncSeparate = (delegate*<uint, uint, int, uint, void>)load("glStencilFuncSeparate");
contextPtr->glStencilMaskSeparate = (delegate*<uint, uint, void>)load("glStencilMaskSeparate");
contextPtr->glStencilOpSeparate = (delegate*<uint, uint, uint, uint, void>)load("glStencilOpSeparate");
+8 -9
View File
@@ -1,6 +1,8 @@
using StgSharp.Math;
using System;
using System.Collections.Concurrent;
using System.ComponentModel.Design;
namespace StgSharp.Graphics
{
@@ -84,21 +86,18 @@ namespace StgSharp.Graphics
void ClearGraphicError();
/// <summary>
/// Conpile the provided shader code in string form.
/// </summary>
/// <param name="shaderCodeArray">A string array contains all shaders' code</param>
/// <param name="shaderType">An <see cref="ShaderType"/> enum represent the type of the shader to
/// conpile, including vertex shader and fragment shader.</param>
/// <returns>An handle of conpiled shader</returns>
glHandleSet CompileShader(ShaderType shaderType, params string[] shaderCodeArray);
/// <summary>
/// Same function as OpenGL api, glCreateProgram
/// </summary>
/// <returns>A handle representing a single shader program</returns>
glHandle CreateProgram();
glHandleSet CreateShaderSet(int count, ShaderType type);
void LoadShaderSource(glHandle shaderHandle, string codeStream);
void CompileShader(glHandle shaderhandle);
/// <summary>
/// Same function as OpenGL api, glCreateProgram.
/// Used for creating multiple shader program.
+5 -11
View File
@@ -1,4 +1,5 @@
using StgSharp.Graphics;
using System;
using System.Collections;
using System.Collections.Generic;
@@ -10,8 +11,6 @@ using System.Threading.Tasks;
namespace StgSharp.Logic
{
[StructLayout(LayoutKind.Explicit, Size = 8)]
internal struct LogSeperator
{
@@ -31,8 +30,6 @@ namespace StgSharp.Logic
}
}
/// <summary>
/// A linear data structure with dynamic length.
/// It contains a <see cref="List{T}"/> of <see cref="Array"/>,
@@ -44,13 +41,16 @@ namespace StgSharp.Logic
private List<T[]> arrayIndexList;
private LogSeperator indexpair;
private int lastMain = 0;
// main index to the last used element
private int lastSub = 0;
private int length;
private int subLength = 1;
// sub index to the last used element
private Queue<int> unusedMainIndex;
private Queue<int> unusedSubIndex;
public DynamicArrayList()
@@ -105,7 +105,6 @@ namespace StgSharp.Logic
/// <param name="instace"></param>
public DynamicArrayList(int count, T instace)
{
arrayIndexList = new List<T[]>();
length = count;
unusedMainIndex = new();
@@ -162,7 +161,6 @@ namespace StgSharp.Logic
}
arrayIndexList[indexpair.high_s][indexpair.low_s] = value;
}
}
public void CopyTo(DynamicArrayList<T> target)
@@ -230,7 +228,6 @@ namespace StgSharp.Logic
public int Count => length;
/// <summary>
/// Length of this <see cref="DynamicArrayList{T}"/>
/// </summary>
@@ -256,7 +253,6 @@ namespace StgSharp.Logic
length++;
subLength = 1;
return length - 1;
}
length++;
@@ -357,8 +353,6 @@ namespace StgSharp.Logic
return false;
}
[Obsolete("This method is not same, you may read data form an empty index.", false)]
public void RemoveAt(int index)
{
@@ -424,4 +418,4 @@ namespace StgSharp.Logic
indexpair.low >>= (int)(32 - mainindex);
}
}
}
}
+171 -92
View File
@@ -1,9 +1,11 @@
using StgSharp.Graphics;
using StgSharp.Math;
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
using System.Numerics;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Text;
@@ -11,14 +13,23 @@ using System.Threading.Tasks;
namespace StgSharp.Logic
{
internal unsafe class GLparamQueue
{
private string _dequeueLog = "\n";
internal GLcontext* context;
private ConcurrentQueue<M128> paramQueue;
private ConcurrentQueue<glArrayHandle> streamQueue;
public GLparamQueue()
{
paramQueue = new ConcurrentQueue<M128>();
streamQueue = new ConcurrentQueue<glArrayHandle>();
}
internal void ShowDequeueLog()
{
Console.WriteLine(_dequeueLog);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
@@ -30,6 +41,7 @@ namespace StgSharp.Logic
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public void Enqueue(M128 m)
{
Console.WriteLine(m.ToString(10));
paramQueue.Enqueue(m);
}
@@ -37,134 +49,172 @@ namespace StgSharp.Logic
public void Enqueue(uint u0)
{
M128 m = default;
m.UInt32[0] = u0;
paramQueue.Enqueue(m);
m.Write<uint>(0, u0);
this.Enqueue(m);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public void Enqueue(uint u0, uint u1)
{
M128 m = default;
m.UInt32[0] = u0;
m.UInt32[1] = u1;
paramQueue.Enqueue(m);
m.Write<uint>(0, u0);
m.Write<uint>(1, u1);
this.Enqueue(m);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public void Enqueue(ulong u0, ulong u1)
{
M128 m = default;
m.Write<ulong>(0, u0);
m.Write<ulong>(1, u1);
this.Enqueue(m);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public void Enqueue(uint u0, uint u1, uint u2)
{
M128 m = default;
m.UInt32[0] = u0;
m.UInt32[1] = u1;
m.UInt32[2] = u2;
paramQueue.Enqueue(m);
m.Write<uint>(0, u0);
m.Write<uint>(1, u1);
m.Write<uint>(2, u2);
this.Enqueue(m);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public void Enqueue(float f0, float f1, float f2)
{
M128 m = default;
m.Single[0] = f0;
m.Single[1] = f1;
m.Single[2] = f2;
paramQueue.Enqueue(m);
m.Write<float>(0, f0);
m.Write<float>(1, f1);
this.Enqueue(m);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public void Enqueue(float f0, float f1, float f2, float f3)
{
M128 m = default;
m.Single[0] = f0;
m.Single[1] = f1;
m.Single[2] = f2;
m.Single[3] = f3;
paramQueue.Enqueue(m);
m.Write<float>(0, f0);
m.Write<float>(1, f1);
m.Write<float>(2, f2);
m.Write<float>(3, f3);
this.Enqueue(m);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public void Enqueue(IntPtr p0, IntPtr p1)
{
M128 m = default;
m.UInt64[0] = (ulong)p0;
m.UInt64[1] = (ulong)p1;
paramQueue.Enqueue(m);
m.Write<ulong>(0, (ulong)p0);
m.Write<ulong>(1, (ulong)p1);
this.Enqueue(m);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public void Enqueue(IntPtr p)
{
M128 m = default;
m.UInt64[0] = (ulong)p;
paramQueue.Enqueue(m);
m.Write<ulong>(0, (ulong)p);
this.Enqueue(m);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public void Enqueue(glHandle handle)
{
M128 m = default;
m.UInt64[0] = (ulong)handle.valuePtr;
paramQueue.Enqueue(m);
m.Write<ulong>(0, (ulong)handle.valuePtr);
this.Enqueue(m);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public void Enqueue(glHandle handle, glHandle handle1)
{
M128 m = default;
m.UInt64[0] = (ulong)handle.valuePtr;
m.UInt64[1] = (ulong)handle1.valuePtr;
paramQueue.Enqueue(m);
m.Write<ulong>(0, (ulong)handle.valuePtr);
m.Write<ulong>(1, (ulong)handle1.valuePtr);
this.Enqueue(m);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public void Enqueue(int i0)
{
M128 m = default;
m.Int32[0] = i0;
paramQueue.Enqueue(m);
m.Write<int>(0, i0);
this.Enqueue(m);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public void Enqueue(int i0, int i1)
{
M128 m = default;
m.Int32[0] = i0;
m.Int32[1] = i1;
paramQueue.Enqueue(m);
m.Write<int>(0, i0);
m.Write<int>(1, i1);
this.Enqueue(m);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public void Enqueue(int i0, int i1, int i2)
{
M128 m = default;
m.Int32[0] = i0;
m.Int32[1] = i1;
m.Int32[2] = i2;
paramQueue.Enqueue(m);
m.Write<int>(0, i0);
m.Write<int>(1, i1);
m.Write<int>(2, i2);
this.Enqueue(m);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public void Enqueue(int i0, int i1, int i2, int i3)
{
M128 m = default;
m.Int32[0] = i0;
m.Int32[1] = i1;
m.Int32[2] = i2;
m.Int32[3] = i3;
paramQueue.Enqueue(m);
m.Write<int>(0, i0);
m.Write<int>(1, i1);
m.Write<int>(2, i2);
m.Write<int>(3, i3);
this.Enqueue(m);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public void TryDequeue(out M128 m)
public void Enqueue(string str)
{
paramQueue.TryDequeue(out m);
byte[] code = Encoding.UTF8.GetBytes(str);
streamQueue.Enqueue(glArrayHandle.Alloc<byte>(code));
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public void Enqueue<T>(T[] array) where T : struct
{
streamQueue.Enqueue(glArrayHandle.Alloc<T>(array));
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public void TryDequeue(out glArrayHandle arrayHandle)
{
glArrayHandle handle = default;
if (streamQueue.TryDequeue(out handle))
{
arrayHandle = handle;
}
else
{
InternalIO.InternalWriteLog("No param in buffer when calling gl function.", LogType.Error);
throw new Exception();
}
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public bool TryDequeue(out M128 m)
{
bool ret = paramQueue.TryDequeue(out m);
_dequeueLog += $"{m.ToString(10)}\n";
return ret;
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public void TryDequeue(out Vec4d v)
{
M128 m;
if (paramQueue.TryDequeue(out m))
if (this.TryDequeue(out m))
{
v = *(Vec4d*)&m;
}
@@ -175,13 +225,28 @@ namespace StgSharp.Logic
}
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public void TryDequeue<T>(out T[] array)
{
glArrayHandle output = default;
if (streamQueue.TryDequeue(out output))
{
array = output.copy as T[];
}
else
{
InternalIO.InternalWriteLog("No param in buffer when calling gl function.", LogType.Error);
throw new Exception();
}
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public void TryDequeue(out int i0)
{
M128 ret;
if (paramQueue.TryDequeue(out ret))
if (this.TryDequeue(out ret))
{
i0 = ret.Int32[0];
i0 = ret.Read<int>(0);
}
else
{
@@ -194,10 +259,10 @@ namespace StgSharp.Logic
public void TryDequeue(out int i0, out int i1)
{
M128 ret;
if (paramQueue.TryDequeue(out ret))
if (this.TryDequeue(out ret))
{
i0 = ret.Int32[0];
i1 = ret.Int32[1];
i0 = ret.Read<int>(0);
i1 = ret.Read<int>(1);
}
else
{
@@ -205,15 +270,16 @@ namespace StgSharp.Logic
throw new Exception();
}
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public void TryDequeue(out int i0, out int i1, out int i2)
{
M128 ret;
if (paramQueue.TryDequeue(out ret))
if (this.TryDequeue(out ret))
{
i0 = ret.Int32[0];
i1 = ret.Int32[1];
i2 = ret.Int32[2];
i0 = ret.Read<int>(0);
i1 = ret.Read<int>(1);
i2 = ret.Read<int>(2);
}
else
{
@@ -221,16 +287,17 @@ namespace StgSharp.Logic
throw new Exception();
}
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public void TryDequeue(out int i0, out int i1, out int i2, out int i3)
{
M128 ret;
if (paramQueue.TryDequeue(out ret))
if (this.TryDequeue(out ret))
{
i0 = ret.Int32[0];
i1 = ret.Int32[1];
i2 = ret.Int32[2];
i3 = ret.Int32[3];
i0 = ret.Read<int>(0);
i1 = ret.Read<int>(1);
i2 = ret.Read<int>(2);
i3 = ret.Read<int>(3);
}
else
{
@@ -243,9 +310,9 @@ namespace StgSharp.Logic
public void TryDequeue(out IntPtr p)
{
M128 ret;
if (paramQueue.TryDequeue(out ret))
if (this.TryDequeue(out ret))
{
p = (IntPtr)ret.UInt64[0];
p = (IntPtr)ret.Read<ulong>(0);
}
else
{
@@ -257,12 +324,11 @@ namespace StgSharp.Logic
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public void TryDequeue(out IntPtr p0, out IntPtr p1)
{
M128 ret;
if (paramQueue.TryDequeue(out ret))
if (this.TryDequeue(out ret))
{
p0 = (IntPtr)ret.UInt64[0];
p1 = (IntPtr)ret.UInt64[1];
p0 = (IntPtr)ret.Read<ulong>(0);
p1 = (IntPtr)ret.Read<ulong>(1);
}
else
{
@@ -275,12 +341,12 @@ namespace StgSharp.Logic
public void TryDequeue(out float f0, out float f1, out float f2, out float f3)
{
M128 ret;
if (paramQueue.TryDequeue(out ret))
if (this.TryDequeue(out ret))
{
f0 = ret.UInt32[0];
f1 = ret.UInt32[1];
f2 = ret.UInt32[2];
f3 = ret.UInt32[3];
f0 = ret.Read<uint>(0);
f1 = ret.Read<uint>(1);
f2 = ret.Read<uint>(2);
f3 = ret.Read<uint>(3);
}
else
{
@@ -293,11 +359,11 @@ namespace StgSharp.Logic
public void TryDequeue(out float f0, out float f1, out float f2)
{
M128 ret;
if (paramQueue.TryDequeue(out ret))
if (this.TryDequeue(out ret))
{
f0 = ret.UInt32[0];
f1 = ret.UInt32[1];
f2 = ret.UInt32[2];
f0 = ret.Read<uint>(0);
f1 = ret.Read<uint>(1);
f2 = ret.Read<uint>(2);
}
else
{
@@ -310,9 +376,9 @@ namespace StgSharp.Logic
public void TryDequeue(out uint u0)
{
M128 ret;
if (paramQueue.TryDequeue(out ret))
if (this.TryDequeue(out ret))
{
u0 = ret.UInt32[0];
u0 = ret.Read<uint>(0);
}
else
{
@@ -325,10 +391,10 @@ namespace StgSharp.Logic
public void TryDequeue(out uint u0, out uint u1)
{
M128 ret;
if (paramQueue.TryDequeue(out ret))
if (this.TryDequeue(out ret))
{
u0 = ret.UInt32[0];
u1 = ret.UInt32[1];
u0 = ret.Read<uint>(0);
u1 = ret.Read<uint>(1);
}
else
{
@@ -341,11 +407,11 @@ namespace StgSharp.Logic
public void TryDequeue(out uint u0, out uint u1, out uint u2)
{
M128 ret;
if (paramQueue.TryDequeue(out ret))
if (this.TryDequeue(out ret))
{
u0 = ret.UInt32[0];
u1 = ret.UInt32[1];
u2 = ret.UInt32[2];
u0 = ret.Read<uint>(0);
u1 = ret.Read<uint>(1);
u2 = ret.Read<uint>(2);
}
else
{
@@ -358,12 +424,12 @@ namespace StgSharp.Logic
public void TryDequeue(out uint u0, out uint u1, out uint u2, out uint u3)
{
M128 ret;
if (paramQueue.TryDequeue(out ret))
if (this.TryDequeue(out ret))
{
u0 = ret.UInt32[0];
u1 = ret.UInt32[1];
u2 = ret.UInt32[2];
u3 = ret.UInt32[3];
u0 = ret.Read<uint>(0);
u1 = ret.Read<uint>(1);
u2 = ret.Read<uint>(2);
u3 = ret.Read<uint>(3);
}
else
{
@@ -376,6 +442,19 @@ namespace StgSharp.Logic
{
context = p;
}
}
}
internal void TryDequeue(out Array array)
{
glArrayHandle output = default;
if (streamQueue.TryDequeue(out output))
{
array = output.copy;
}
else
{
InternalIO.InternalWriteLog("No param in buffer when calling gl function.", LogType.Error);
throw new Exception();
}
}
}
}
+117
View File
@@ -0,0 +1,117 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Numerics;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
#if NET5_0_OR_GREATER
using System.Runtime.Intrinsics;
#endif
using System.Text;
using System.Threading.Tasks;
namespace StgSharp.Math
{
[StructLayout(LayoutKind.Explicit, Pack = 16)]
public unsafe struct M128
{
[FieldOffset(0)] internal Vector4 vec;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public T Read<T>(int index) where T : struct
{
fixed (Vector4* p = &vec)
return *((T*)(p) + index);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public void Write<T>(int index, T value) where T : struct
{
fixed (Vector4* p = &vec)
*((T*)(p) + index) = value;
}
public override string ToString()
{
return "";
}
public string ToString(int sample)
{
string str = "";
for (int i = 0; i < 16; i++)
{
str += $"{Convert.ToString(this.Read<byte>(i), sample)} ";
}
return str;
}
#if NET5_0_OR_GREATER
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static explicit operator Vector128<byte>(M128 m)
{
return Vector128.As<float, byte>(m.vec.AsVector128());
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static explicit operator Vector128<sbyte>(M128 m)
{
return Vector128.As<float, sbyte>(m.vec.AsVector128());
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static explicit operator Vector128<short>(M128 m)
{
return Vector128.As<float, short>(m.vec.AsVector128());
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static explicit operator Vector128<ushort>(M128 m)
{
return Vector128.As<float, ushort>(m.vec.AsVector128());
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static explicit operator Vector128<int>(M128 m)
{
return Vector128.As<float, int>(m.vec.AsVector128());
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static explicit operator Vector128<uint>(M128 m)
{
return Vector128.As<float, uint>(m.vec.AsVector128());
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static explicit operator Vector128<long>(M128 m)
{
return Vector128.As<float, long>(m.vec.AsVector128());
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static explicit operator Vector128<ulong>(M128 m)
{
return Vector128.As<float, ulong>(m.vec.AsVector128());
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static explicit operator Vector128<float>(M128 m)
{
return Vector128.As<float, float>(m.vec.AsVector128());
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static explicit operator Vector128<double>(M128 m)
{
return Vector128.As<float, double>(m.vec.AsVector128());
}
#endif
}
}
+11 -16
View File
@@ -6,13 +6,15 @@ using System.Runtime.InteropServices;
namespace StgSharp.Math
{
[StructLayout(LayoutKind.Explicit, Size = 7*4*sizeof(float)+ sizeof(bool),Pack =16 )]
[StructLayout(LayoutKind.Explicit, Size = 7 * 4 * sizeof(float) + sizeof(bool), Pack = 16)]
public struct Matrix4x3 : IEquatable<Matrix4x3>
{
[FieldOffset(0)]
internal Mat3 mat;
[FieldOffset(3 * 4 * sizeof(float))]
internal Mat4 transpose;
[FieldOffset(7 * 4 * sizeof(float))]
internal bool isTransposed;
@@ -62,7 +64,6 @@ namespace StgSharp.Math
}
set
{
if (rowNum > 3 || rowNum < 0)
{
throw new ArgumentOutOfRangeException(nameof(columNum));
@@ -92,7 +93,6 @@ namespace StgSharp.Math
fixed (Mat4* target = &this.transpose)
{
InternalIO.Transpose3to4_internal(source, target);
}
isTransposed = true;
}
@@ -108,7 +108,6 @@ namespace StgSharp.Math
return EqualityComparer<Mat3>.Default.Equals(mat, other.mat);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static Matrix4x3 operator +(Matrix4x3 left, Matrix4x3 right)
{
@@ -127,7 +126,6 @@ namespace StgSharp.Math
left.mat.colum1 - right.mat.colum1,
left.mat.colum2 - right.mat.colum2
);
}
public static bool operator ==(Matrix4x3 left, Matrix4x3 right)
@@ -159,7 +157,7 @@ namespace StgSharp.Math
mat.mat.colum2 / value
);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static Matrix4x2 operator *(Matrix4x3 left, Matrix3x2 right)
{
@@ -167,19 +165,19 @@ namespace StgSharp.Math
return new Matrix4x2(
Vector4.Dot(left.transpose.colum0, right.mat.colum0),
Vector4.Dot(left.transpose.colum0, right.mat.colum1),
Vector4.Dot(left.transpose.colum1, right.mat.colum0),
Vector4.Dot(left.transpose.colum1, right.mat.colum1),
Vector4.Dot(left.transpose.colum2, right.mat.colum0),
Vector4.Dot(left.transpose.colum2, right.mat.colum1),
Vector4.Dot(left.transpose.colum3, right.mat.colum0),
Vector4.Dot(left.transpose.colum3, right.mat.colum1)
);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static Matrix4x3 operator *(Matrix4x3 left, Matrix3x3 right)
{
@@ -223,7 +221,7 @@ namespace StgSharp.Math
Vector4.Dot(left.transpose.colum2, right.mat.colum1),
Vector4.Dot(left.transpose.colum2, right.mat.colum2),
Vector4.Dot(left.transpose.colum2, right.mat.colum3),
Vector4.Dot(left.transpose.colum3, right.mat.colum0),
Vector4.Dot(left.transpose.colum3, right.mat.colum1),
Vector4.Dot(left.transpose.colum3, right.mat.colum2),
@@ -240,8 +238,5 @@ namespace StgSharp.Math
mat.colum2.GetHashCode()
);
}
}
}
}
+2 -19
View File
@@ -1,5 +1,6 @@
using StgSharp.Controlling;
using StgSharp.Math;
using System;
using System.Data.Common;
using System.Numerics;
@@ -7,23 +8,6 @@ using System.Runtime.InteropServices;
namespace StgSharp.Math
{
[StructLayout(LayoutKind.Explicit)]
public unsafe struct M128
{
[FieldOffset(0)] internal fixed float Single[4];
[FieldOffset(0)] internal fixed double Double[2];
[FieldOffset(0)] internal fixed sbyte Int8[16];
[FieldOffset(0)] internal fixed short Int16[8];
[FieldOffset(0)] internal fixed int Int32[4];
[FieldOffset(0)] internal fixed long Int64[2];
[FieldOffset(0)] internal fixed byte UInt8[16];
[FieldOffset(0)] internal fixed ushort UInt16[8];
[FieldOffset(0)] internal fixed uint UInt32[4];
[FieldOffset(0)] internal fixed ulong UInt64[2];
}
[StructLayout(LayoutKind.Explicit, Size = 16, Pack = 16)]
public struct Vec4d
{
@@ -35,7 +19,6 @@ namespace StgSharp.Math
[FieldOffset(8)] public float Z;
[FieldOffset(12)] public float W;
public Vec4d(float x, float y, float z, float w)
{
vec = new Vector4(x, y, z, w);
@@ -46,4 +29,4 @@ namespace StgSharp.Math
return vec.reg;
}
}
}
}
@@ -204,7 +204,7 @@
<member name="T:StgSharp.Graphics.ElementBuffer">
<summary>
A collecion of handle to Element Buffer Object in OpenGL.
Each <see langword="int"/> value indexed from instance of this class this
Each <see langword="uint"/> value indexed from instance of this class this
is the only handle to one Element Buffer Object.
</summary>
</member>
@@ -234,9 +234,9 @@
<param name="usage">How OpenGL use these data, defined by <see cref="T:StgSharp.Graphics.BufferUsage"/></param>
</member>
<member name="M:StgSharp.Graphics.VertexBuffer.Unbind">
<summary>
<summary>
</summary>
</summary>
</member>
<member name="M:StgSharp.Graphics.glManager.LoadGLapi(StgSharp.Graphics.Form,StgSharp.Graphics.GLfuncLoader)">
<summary>
@@ -252,18 +252,37 @@
<param name="name">Name of the OpenGL api</param>
<returns>The funtion pointer of the api in form of <see cref="T:System.IntPtr"/></returns>
</member>
<member name="M:StgSharp.Graphics.Shader.Compile(System.String[])">
<member name="T:StgSharp.Graphics.glHandle">
<summary>
Compile the vertex shader to be attached to this shader.
A handle to an OpenGL object,
must be indexed from a <see cref="T:StgSharp.Graphics.glHandleSet"/>.
Direct call will cause <see langword="InvalidOperationException"/>
</summary>
</member>
<member name="T:StgSharp.Graphics.glHandleSet">
<summary>
A handle to an OpenGL object.
</summary>
</member>
<member name="M:StgSharp.Graphics.glHandleSet.Free">
<summary>
temporarily release the handle of GLhandle sets.
Please call <see cref="M:StgSharp.Graphics.glHandleSet.Pin"/> method before indexing.
</summary>
</member>
<member name="M:StgSharp.Graphics.glHandleSet.Release">
<summary>
Realse all resource in this handle.
This will release all resource in this <see cref="T:StgSharp.Graphics.glHandle"/>.
This <see langword="glHandle"/> will be not usable.
</summary>
<param name="code">GLSL code of vertex shader.</param>
</member>
<member name="M:StgSharp.Graphics.Shader.AttachTo(System.Int32,StgSharp.Graphics.ShaderProgram)">
<summary>
<summary>
</summary>
<param name="target"></param>
<param name="index"></param>
</summary>
<param name="target"></param>
<param name="index"></param>
</member>
<member name="M:StgSharp.Graphics.ShaderProgram.#ctor(StgSharp.Graphics.IglFunc)">
<summary>
@@ -277,24 +296,24 @@
</member>
<member name="M:StgSharp.Graphics.ShaderProgram.GetUniform``1(System.String)">
<summary>
Get a uniform form current shader,
the value type of the uniform should be provided.
Get a uniform form current shader,
the value type of the uniform should be provided.
</summary>
<param name="name">Name of the Uniform in shader code</param>
<returns></returns>
</member>
<member name="M:StgSharp.Graphics.ShaderProgram.GetUniform``2(System.String)">
<summary>
Get a uniform form current shader,
the value type of the uniform should be provided.
Get a uniform form current shader,
the value type of the uniform should be provided.
</summary>
<param name="name">Name of the Uniform in shader code</param>
<returns></returns>
</member>
<member name="M:StgSharp.Graphics.ShaderProgram.GetUniform``3(System.String)">
<summary>
Get a uniform form current shader,
the value type of the uniform should be provided.
Get a uniform form current shader,
the value type of the uniform should be provided.
</summary>
<param name="name">Name of the Uniform in shader code</param>
<returns></returns>
@@ -332,7 +351,7 @@
<param name="form">The form used as frame update benchmark.</param>
<exception cref="T:System.InvalidOperationException">More than one alingment attached to one form timer</exception>
</member>
<member name="M:StgSharp.Graphics.IglFunc.AttachShader(System.glHandle,System.glHandle)">
<member name="M:StgSharp.Graphics.IglFunc.AttachShader(StgSharp.Graphics.glHandle,StgSharp.Graphics.glHandle)">
<summary>
Same fucntion as OpenGL api glAttachShader.
Only the first <see href="shader"/> in handle
@@ -342,21 +361,21 @@
<param name="program">Shader program to be attachec</param>
<param name="shader">A shader part to attach</param>
</member>
<member name="M:StgSharp.Graphics.IglFunc.BindBuffer(StgSharp.Graphics.BufferType,System.glHandle)">
<member name="M:StgSharp.Graphics.IglFunc.BindBuffer(StgSharp.Graphics.BufferType,StgSharp.Graphics.glHandle)">
<summary>
Bind the indexed buffer object to certain type of buffer
</summary>
<param name="bufferType"></param>
<param name="handle"></param>
</member>
<member name="M:StgSharp.Graphics.IglFunc.BindTexture(System.UInt32,System.glHandle)">
<member name="M:StgSharp.Graphics.IglFunc.BindTexture(System.UInt32,StgSharp.Graphics.glHandle)">
<summary>
Same function as OpenGL api, glBindTexture.
</summary>
<param name="type">Type of texture to bind</param>
<param name="texture">Sign of texture</param>
</member>
<member name="M:StgSharp.Graphics.IglFunc.BindVertexArray(System.glHandle)">
<member name="M:StgSharp.Graphics.IglFunc.BindVertexArray(StgSharp.Graphics.glHandle)">
<summary>
Same function as OpenGL api, glBindVertexArray
</summary>
@@ -379,15 +398,6 @@
<param name="B">Specify the red values used when the color buffers are cleared.</param>
<param name="A">Specify the red values used when the color buffers are cleared.</param>
</member>
<member name="M:StgSharp.Graphics.IglFunc.CompileShader(StgSharp.Graphics.ShaderType,System.String[])">
<summary>
Conpile the provided shader code in string form.
</summary>
<param name="shaderCodeArray">A string array contains all shaders' code</param>
<param name="shaderType">An <see cref="T:StgSharp.Graphics.ShaderType"/> enum represent the type of the shader to
conpile, including vertex shader and fragment shader.</param>
<returns>An handle of conpiled shader</returns>
</member>
<member name="M:StgSharp.Graphics.IglFunc.CreateProgram">
<summary>
Same function as OpenGL api, glCreateProgram
@@ -412,19 +422,19 @@
<param name="share"></param>
<exception cref="T:System.Exception"></exception>
</member>
<member name="M:StgSharp.Graphics.IglFunc.DeleteBuffer(System.glHandle)">
<member name="M:StgSharp.Graphics.IglFunc.DeleteBuffer(StgSharp.Graphics.glHandle)">
<summary>
Same function as OpenGL api, glDeleteBuffer. This method can delete one buffer in one call
</summary>
<param name="handle">a handle representing the buffer to be deleted</param>
</member>
<member name="M:StgSharp.Graphics.IglFunc.DeleteBuffers(System.glHandleSet)">
<member name="M:StgSharp.Graphics.IglFunc.DeleteBuffers(StgSharp.Graphics.glHandleSet)">
<summary>
Same function as OpenGL api, glDeleteBuffer. This method can delete a sets of buffers in one call.
</summary>
<param name="handleSet">Array of buffers to be deleted</param>
</member>
<member name="M:StgSharp.Graphics.IglFunc.DeleteVertexArrays(System.glHandleSet)">
<member name="M:StgSharp.Graphics.IglFunc.DeleteVertexArrays(StgSharp.Graphics.glHandleSet)">
<summary>
Same function as OpenGL api, glDeleteVertexArrays
</summary>
@@ -458,7 +468,7 @@
</summary>
<param name="count">Amount of vao to be generated</param>
</member>
<member name="M:StgSharp.Graphics.IglFunc.GetUniformLocation(System.glHandle,System.String)">
<member name="M:StgSharp.Graphics.IglFunc.GetUniformLocation(StgSharp.Graphics.glHandle,System.String)">
<summary>
Same fucntion as OpenGL api, glGetUniformLocation
</summary>
@@ -545,7 +555,7 @@
<param name="stride">Pixels stride of each sets of data</param>
<param name="pointer"></param>
</member>
<member name="M:StgSharp.Graphics.IglFunc.TextureImage2d``1(System.Int32,System.Int32,System.UInt32,System.UInt32,System.UInt32,System.UInt32,System.UInt32,System.glHandle)">
<member name="M:StgSharp.Graphics.IglFunc.TextureImage2d``1(System.Int32,System.Int32,System.UInt32,System.UInt32,System.UInt32,System.UInt32,System.UInt32,StgSharp.Graphics.glHandle)">
<summary>
Same function as OpenGL api glTexImage2d
</summary>
@@ -566,7 +576,7 @@
<param name="pname">name of parameter</param>
<param name="param">value of parameter</param>
</member>
<member name="M:StgSharp.Graphics.IglFunc.UseProgram(System.glHandle)">
<member name="M:StgSharp.Graphics.IglFunc.UseProgram(StgSharp.Graphics.glHandle)">
<summary>
Same fucntion as OpenGL api glUseShader.
</summary>
@@ -905,31 +915,6 @@
</summary>
<returns></returns>
</member>
<member name="T:System.glHandle">
<summary>
A handle to an OpenGL object,
must be indexed from a <see cref="T:System.glHandleSet"/>.
Direct call will cause <see langword="InvalidOperationException"/>
</summary>
</member>
<member name="T:System.glHandleSet">
<summary>
A handle to an OpenGL object.
</summary>
</member>
<member name="M:System.glHandleSet.Free">
<summary>
temporarily release the handle of GLhandle sets.
Please call <see cref="M:System.glHandleSet.Pin"/> method before indexing.
</summary>
</member>
<member name="M:System.glHandleSet.Release">
<summary>
Realse all resource in this handle.
This will release all resource in this <see cref="T:System.glHandle"/>.
This <see langword="glHandle"/> will be not usable.
</summary>
</member>
<member name="T:Windows.Win32.Foundation.COLORREF">
<summary>The COLORREF value is used to specify an RGB color.</summary>
<remarks>
@@ -14,7 +14,7 @@ using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("StgSharp")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+a2241a5a5816a9438c63e3ca3c69313e6f2e8f56")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+1f2fca4c8fe323daf9751677ccfdf0f7b04a9be8")]
[assembly: System.Reflection.AssemblyProductAttribute("StgSharp")]
[assembly: System.Reflection.AssemblyTitleAttribute("StgSharp")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
@@ -1 +1 @@
457b2788dd58b1c0006f9a671fa39abf8ac3de9589c64a4bb867c6c39b05c04c
acdc10c0e1b1a3f1b82b38920dec1e26dd82a6bdfd91a17620bc677a983bc21d
@@ -1 +1 @@
0437f6196a65a1b8aa683720932b3cb8cb17e7d708c883c23def372b98154e31
1a8e1802d5a508dcd983ae4f5d79408adb0743ed41648884055a8a411bac563f
@@ -1,12 +1,12 @@
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharp\bin\x64\Debug\netstandard2.1\StgSharp.deps.json
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharp\bin\x64\Debug\netstandard2.1\StgSharp.dll
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharp\bin\x64\Debug\netstandard2.1\StgSharp.xml
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharp\obj\x64\Debug\netstandard2.1\StgSharp.csproj.AssemblyReference.cache
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharp\obj\x64\Debug\netstandard2.1\StgSharp.GeneratedMSBuildEditorConfig.editorconfig
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharp\obj\x64\Debug\netstandard2.1\StgSharp.AssemblyInfoInputs.cache
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharp\obj\x64\Debug\netstandard2.1\StgSharp.AssemblyInfo.cs
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharp\obj\x64\Debug\netstandard2.1\StgSharp.csproj.CoreCompileInputs.cache
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharp\obj\x64\Debug\netstandard2.1\StgSharp.sourcelink.json
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharp\bin\x64\Debug\netstandard2.1\StgSharp.deps.json
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharp\bin\x64\Debug\netstandard2.1\StgSharp.dll
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharp\bin\x64\Debug\netstandard2.1\StgSharp.xml
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharp\obj\x64\Debug\netstandard2.1\StgSharp.dll
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharp\obj\x64\Debug\netstandard2.1\refint\StgSharp.dll
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharp\obj\x64\Debug\netstandard2.1\StgSharp.xml
@@ -1 +1 @@
{"documents":{"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\*":"https://raw.githubusercontent.com/Nitload-NSI/CCD_Github/a2241a5a5816a9438c63e3ca3c69313e6f2e8f56/*"}}
{"documents":{"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\*":"https://raw.githubusercontent.com/Nitload-NSI/CCD_Github/1f2fca4c8fe323daf9751677ccfdf0f7b04a9be8/*"}}
@@ -204,7 +204,7 @@
<member name="T:StgSharp.Graphics.ElementBuffer">
<summary>
A collecion of handle to Element Buffer Object in OpenGL.
Each <see langword="int"/> value indexed from instance of this class this
Each <see langword="uint"/> value indexed from instance of this class this
is the only handle to one Element Buffer Object.
</summary>
</member>
@@ -234,9 +234,9 @@
<param name="usage">How OpenGL use these data, defined by <see cref="T:StgSharp.Graphics.BufferUsage"/></param>
</member>
<member name="M:StgSharp.Graphics.VertexBuffer.Unbind">
<summary>
<summary>
</summary>
</summary>
</member>
<member name="M:StgSharp.Graphics.glManager.LoadGLapi(StgSharp.Graphics.Form,StgSharp.Graphics.GLfuncLoader)">
<summary>
@@ -252,18 +252,37 @@
<param name="name">Name of the OpenGL api</param>
<returns>The funtion pointer of the api in form of <see cref="T:System.IntPtr"/></returns>
</member>
<member name="M:StgSharp.Graphics.Shader.Compile(System.String[])">
<member name="T:StgSharp.Graphics.glHandle">
<summary>
Compile the vertex shader to be attached to this shader.
A handle to an OpenGL object,
must be indexed from a <see cref="T:StgSharp.Graphics.glHandleSet"/>.
Direct call will cause <see langword="InvalidOperationException"/>
</summary>
</member>
<member name="T:StgSharp.Graphics.glHandleSet">
<summary>
A handle to an OpenGL object.
</summary>
</member>
<member name="M:StgSharp.Graphics.glHandleSet.Free">
<summary>
temporarily release the handle of GLhandle sets.
Please call <see cref="M:StgSharp.Graphics.glHandleSet.Pin"/> method before indexing.
</summary>
</member>
<member name="M:StgSharp.Graphics.glHandleSet.Release">
<summary>
Realse all resource in this handle.
This will release all resource in this <see cref="T:StgSharp.Graphics.glHandle"/>.
This <see langword="glHandle"/> will be not usable.
</summary>
<param name="code">GLSL code of vertex shader.</param>
</member>
<member name="M:StgSharp.Graphics.Shader.AttachTo(System.Int32,StgSharp.Graphics.ShaderProgram)">
<summary>
<summary>
</summary>
<param name="target"></param>
<param name="index"></param>
</summary>
<param name="target"></param>
<param name="index"></param>
</member>
<member name="M:StgSharp.Graphics.ShaderProgram.#ctor(StgSharp.Graphics.IglFunc)">
<summary>
@@ -277,24 +296,24 @@
</member>
<member name="M:StgSharp.Graphics.ShaderProgram.GetUniform``1(System.String)">
<summary>
Get a uniform form current shader,
the value type of the uniform should be provided.
Get a uniform form current shader,
the value type of the uniform should be provided.
</summary>
<param name="name">Name of the Uniform in shader code</param>
<returns></returns>
</member>
<member name="M:StgSharp.Graphics.ShaderProgram.GetUniform``2(System.String)">
<summary>
Get a uniform form current shader,
the value type of the uniform should be provided.
Get a uniform form current shader,
the value type of the uniform should be provided.
</summary>
<param name="name">Name of the Uniform in shader code</param>
<returns></returns>
</member>
<member name="M:StgSharp.Graphics.ShaderProgram.GetUniform``3(System.String)">
<summary>
Get a uniform form current shader,
the value type of the uniform should be provided.
Get a uniform form current shader,
the value type of the uniform should be provided.
</summary>
<param name="name">Name of the Uniform in shader code</param>
<returns></returns>
@@ -332,7 +351,7 @@
<param name="form">The form used as frame update benchmark.</param>
<exception cref="T:System.InvalidOperationException">More than one alingment attached to one form timer</exception>
</member>
<member name="M:StgSharp.Graphics.IglFunc.AttachShader(System.glHandle,System.glHandle)">
<member name="M:StgSharp.Graphics.IglFunc.AttachShader(StgSharp.Graphics.glHandle,StgSharp.Graphics.glHandle)">
<summary>
Same fucntion as OpenGL api glAttachShader.
Only the first <see href="shader"/> in handle
@@ -342,21 +361,21 @@
<param name="program">Shader program to be attachec</param>
<param name="shader">A shader part to attach</param>
</member>
<member name="M:StgSharp.Graphics.IglFunc.BindBuffer(StgSharp.Graphics.BufferType,System.glHandle)">
<member name="M:StgSharp.Graphics.IglFunc.BindBuffer(StgSharp.Graphics.BufferType,StgSharp.Graphics.glHandle)">
<summary>
Bind the indexed buffer object to certain type of buffer
</summary>
<param name="bufferType"></param>
<param name="handle"></param>
</member>
<member name="M:StgSharp.Graphics.IglFunc.BindTexture(System.UInt32,System.glHandle)">
<member name="M:StgSharp.Graphics.IglFunc.BindTexture(System.UInt32,StgSharp.Graphics.glHandle)">
<summary>
Same function as OpenGL api, glBindTexture.
</summary>
<param name="type">Type of texture to bind</param>
<param name="texture">Sign of texture</param>
</member>
<member name="M:StgSharp.Graphics.IglFunc.BindVertexArray(System.glHandle)">
<member name="M:StgSharp.Graphics.IglFunc.BindVertexArray(StgSharp.Graphics.glHandle)">
<summary>
Same function as OpenGL api, glBindVertexArray
</summary>
@@ -379,15 +398,6 @@
<param name="B">Specify the red values used when the color buffers are cleared.</param>
<param name="A">Specify the red values used when the color buffers are cleared.</param>
</member>
<member name="M:StgSharp.Graphics.IglFunc.CompileShader(StgSharp.Graphics.ShaderType,System.String[])">
<summary>
Conpile the provided shader code in string form.
</summary>
<param name="shaderCodeArray">A string array contains all shaders' code</param>
<param name="shaderType">An <see cref="T:StgSharp.Graphics.ShaderType"/> enum represent the type of the shader to
conpile, including vertex shader and fragment shader.</param>
<returns>An handle of conpiled shader</returns>
</member>
<member name="M:StgSharp.Graphics.IglFunc.CreateProgram">
<summary>
Same function as OpenGL api, glCreateProgram
@@ -412,19 +422,19 @@
<param name="share"></param>
<exception cref="T:System.Exception"></exception>
</member>
<member name="M:StgSharp.Graphics.IglFunc.DeleteBuffer(System.glHandle)">
<member name="M:StgSharp.Graphics.IglFunc.DeleteBuffer(StgSharp.Graphics.glHandle)">
<summary>
Same function as OpenGL api, glDeleteBuffer. This method can delete one buffer in one call
</summary>
<param name="handle">a handle representing the buffer to be deleted</param>
</member>
<member name="M:StgSharp.Graphics.IglFunc.DeleteBuffers(System.glHandleSet)">
<member name="M:StgSharp.Graphics.IglFunc.DeleteBuffers(StgSharp.Graphics.glHandleSet)">
<summary>
Same function as OpenGL api, glDeleteBuffer. This method can delete a sets of buffers in one call.
</summary>
<param name="handleSet">Array of buffers to be deleted</param>
</member>
<member name="M:StgSharp.Graphics.IglFunc.DeleteVertexArrays(System.glHandleSet)">
<member name="M:StgSharp.Graphics.IglFunc.DeleteVertexArrays(StgSharp.Graphics.glHandleSet)">
<summary>
Same function as OpenGL api, glDeleteVertexArrays
</summary>
@@ -458,7 +468,7 @@
</summary>
<param name="count">Amount of vao to be generated</param>
</member>
<member name="M:StgSharp.Graphics.IglFunc.GetUniformLocation(System.glHandle,System.String)">
<member name="M:StgSharp.Graphics.IglFunc.GetUniformLocation(StgSharp.Graphics.glHandle,System.String)">
<summary>
Same fucntion as OpenGL api, glGetUniformLocation
</summary>
@@ -545,7 +555,7 @@
<param name="stride">Pixels stride of each sets of data</param>
<param name="pointer"></param>
</member>
<member name="M:StgSharp.Graphics.IglFunc.TextureImage2d``1(System.Int32,System.Int32,System.UInt32,System.UInt32,System.UInt32,System.UInt32,System.UInt32,System.glHandle)">
<member name="M:StgSharp.Graphics.IglFunc.TextureImage2d``1(System.Int32,System.Int32,System.UInt32,System.UInt32,System.UInt32,System.UInt32,System.UInt32,StgSharp.Graphics.glHandle)">
<summary>
Same function as OpenGL api glTexImage2d
</summary>
@@ -566,7 +576,7 @@
<param name="pname">name of parameter</param>
<param name="param">value of parameter</param>
</member>
<member name="M:StgSharp.Graphics.IglFunc.UseProgram(System.glHandle)">
<member name="M:StgSharp.Graphics.IglFunc.UseProgram(StgSharp.Graphics.glHandle)">
<summary>
Same fucntion as OpenGL api glUseShader.
</summary>
@@ -905,31 +915,6 @@
</summary>
<returns></returns>
</member>
<member name="T:System.glHandle">
<summary>
A handle to an OpenGL object,
must be indexed from a <see cref="T:System.glHandleSet"/>.
Direct call will cause <see langword="InvalidOperationException"/>
</summary>
</member>
<member name="T:System.glHandleSet">
<summary>
A handle to an OpenGL object.
</summary>
</member>
<member name="M:System.glHandleSet.Free">
<summary>
temporarily release the handle of GLhandle sets.
Please call <see cref="M:System.glHandleSet.Pin"/> method before indexing.
</summary>
</member>
<member name="M:System.glHandleSet.Release">
<summary>
Realse all resource in this handle.
This will release all resource in this <see cref="T:System.glHandle"/>.
This <see langword="glHandle"/> will be not usable.
</summary>
</member>
<member name="T:Windows.Win32.Foundation.COLORREF">
<summary>The COLORREF value is used to specify an RGB color.</summary>
<remarks>
Binary file not shown.
Binary file not shown.
Binary file not shown.
+172
View File
@@ -0,0 +1,172 @@
Info @ 2024-02-28T02:20:13.4489276+08:00
Program start
Info @ 2024-02-28T02:20:13.4685956+08:00
Successfully create a context binded to current form. Its ID is 2625888933568
Info @ 2024-02-28T02:20:13.5600371+08:00
Find core OpenGL version.
Successfully load all OpenGL 1.0 APIs
Successfully load all OpenGL 1.1 APIs
Successfully load all OpenGL 1.2 APIs
Successfully load all OpenGL 1.3 APIs
Successfully load all OpenGL 1.4 APIs
Successfully load all OpenGL 1.5 APIs
Successfully load all OpenGL 2.0 APIs
Successfully load all OpenGL 2.1 APIs
Successfully load all OpenGL 3.0 APIs
Successfully load all OpenGL 3.1 APIs
Successfully load all OpenGL 3.2 APIs
Successfully load all OpenGL 3.3 APIs
Successfully load all OpenGL 4.0 APIs
Successfully load all OpenGL 4.1 APIs
Successfully load all OpenGL 4.2 APIs
Successfully load all OpenGL 4.3 APIs
Successfully load all OpenGL 4.4 APIs
Successfully load all OpenGL 4.5 APIs
Successfully load all OpenGL 4.6 APIs
Info @ 2024-02-28T02:20:13.5697233+08:00
No supported OpenGL extensions are found.
Error @ 2024-02-28T02:20:13.5899504+08:00
Could not find a part of the path 'D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpC\Shader\vertex.vert'.
at Microsoft.Win32.SafeHandles.SafeFileHandle.CreateFile(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options)
at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)
at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)
at System.IO.Strategies.FileStreamHelpers.ChooseStrategyCore(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)
at System.IO.Strategies.FileStreamHelpers.ChooseStrategy(FileStream fileStream, String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, Int64 preallocationSize)
at System.IO.StreamReader.ValidateArgsAndOpenPath(String path, Encoding encoding, Int32 bufferSize)
at System.IO.File.InternalReadAllText(String path, Encoding encoding)
at System.IO.File.ReadAllText(String path)
at StgSharp.StgSharpDemoForm.Init(Object[] args) in D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpDebug\Program.cs:line 74
at StgSharp.Program.Main(String[] args) in D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpDebug\Program.cs:line 195
Info @ 2024-02-28T02:34:05.2611141+08:00
Program start
Info @ 2024-02-28T02:34:07.5537999+08:00
Successfully create a context binded to current form. Its ID is 2125629822832
Info @ 2024-02-28T02:34:07.8568692+08:00
Find core OpenGL version.
Successfully load all OpenGL 1.0 APIs
Successfully load all OpenGL 1.1 APIs
Successfully load all OpenGL 1.2 APIs
Successfully load all OpenGL 1.3 APIs
Successfully load all OpenGL 1.4 APIs
Successfully load all OpenGL 1.5 APIs
Successfully load all OpenGL 2.0 APIs
Successfully load all OpenGL 2.1 APIs
Successfully load all OpenGL 3.0 APIs
Successfully load all OpenGL 3.1 APIs
Successfully load all OpenGL 3.2 APIs
Successfully load all OpenGL 3.3 APIs
Successfully load all OpenGL 4.0 APIs
Successfully load all OpenGL 4.1 APIs
Successfully load all OpenGL 4.2 APIs
Successfully load all OpenGL 4.3 APIs
Successfully load all OpenGL 4.4 APIs
Successfully load all OpenGL 4.5 APIs
Successfully load all OpenGL 4.6 APIs
Info @ 2024-02-28T02:34:07.8680130+08:00
No supported OpenGL extensions are found.
Error @ 2024-02-28T02:34:10.9188775+08:00
Could not find a part of the path 'D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpC\Shader\vertex.vert'.
at Microsoft.Win32.SafeHandles.SafeFileHandle.CreateFile(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options)
at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)
at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)
at System.IO.Strategies.FileStreamHelpers.ChooseStrategyCore(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)
at System.IO.Strategies.FileStreamHelpers.ChooseStrategy(FileStream fileStream, String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, Int64 preallocationSize)
at System.IO.StreamReader.ValidateArgsAndOpenPath(String path, Encoding encoding, Int32 bufferSize)
at System.IO.File.InternalReadAllText(String path, Encoding encoding)
at System.IO.File.ReadAllText(String path)
at StgSharp.StgSharpDemoForm.Init(Object[] args) in D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpDebug\Program.cs:line 74
at StgSharp.Program.Main(String[] args) in D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpDebug\Program.cs:line 195
Info @ 2024-02-29T08:57:53.0662711+08:00
Program start
Info @ 2024-02-29T08:57:53.5645131+08:00
Successfully create a context binded to current form. Its ID is 2791335327184
Info @ 2024-02-29T08:57:54.1988863+08:00
Find core OpenGL version.
Successfully load all OpenGL 1.0 APIs
Successfully load all OpenGL 1.1 APIs
Successfully load all OpenGL 1.2 APIs
Successfully load all OpenGL 1.3 APIs
Successfully load all OpenGL 1.4 APIs
Successfully load all OpenGL 1.5 APIs
Successfully load all OpenGL 2.0 APIs
Successfully load all OpenGL 2.1 APIs
Successfully load all OpenGL 3.0 APIs
Successfully load all OpenGL 3.1 APIs
Successfully load all OpenGL 3.2 APIs
Successfully load all OpenGL 3.3 APIs
Successfully load all OpenGL 4.0 APIs
Successfully load all OpenGL 4.1 APIs
Successfully load all OpenGL 4.2 APIs
Successfully load all OpenGL 4.3 APIs
Successfully load all OpenGL 4.4 APIs
Successfully load all OpenGL 4.5 APIs
Successfully load all OpenGL 4.6 APIs
Info @ 2024-02-29T08:57:54.2300139+08:00
No supported OpenGL extensions are found.
Error @ 2024-02-29T08:57:54.3474832+08:00
Could not find a part of the path 'D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpC\Shader\vertex.vert'.
at Microsoft.Win32.SafeHandles.SafeFileHandle.CreateFile(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options)
at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)
at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)
at System.IO.Strategies.FileStreamHelpers.ChooseStrategyCore(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)
at System.IO.Strategies.FileStreamHelpers.ChooseStrategy(FileStream fileStream, String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, Int64 preallocationSize)
at System.IO.StreamReader.ValidateArgsAndOpenPath(String path, Encoding encoding, Int32 bufferSize)
at System.IO.File.InternalReadAllText(String path, Encoding encoding)
at System.IO.File.ReadAllText(String path)
at StgSharp.StgSharpDemoForm.Init(Object[] args) in D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpDebug\Program.cs:line 74
at StgSharp.Program.Main(String[] args) in D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpDebug\Program.cs:line 195
Info @ 2024-02-29T09:45:26.1651662+08:00
Program start
Info @ 2024-02-29T09:45:26.4662730+08:00
Successfully create a context binded to current form. Its ID is 2327120380800
Info @ 2024-02-29T09:45:27.1073683+08:00
Find core OpenGL version.
Successfully load all OpenGL 1.0 APIs
Successfully load all OpenGL 1.1 APIs
Successfully load all OpenGL 1.2 APIs
Successfully load all OpenGL 1.3 APIs
Successfully load all OpenGL 1.4 APIs
Successfully load all OpenGL 1.5 APIs
Successfully load all OpenGL 2.0 APIs
Successfully load all OpenGL 2.1 APIs
Successfully load all OpenGL 3.0 APIs
Successfully load all OpenGL 3.1 APIs
Successfully load all OpenGL 3.2 APIs
Successfully load all OpenGL 3.3 APIs
Successfully load all OpenGL 4.0 APIs
Successfully load all OpenGL 4.1 APIs
Successfully load all OpenGL 4.2 APIs
Successfully load all OpenGL 4.3 APIs
Successfully load all OpenGL 4.4 APIs
Successfully load all OpenGL 4.5 APIs
Successfully load all OpenGL 4.6 APIs
Info @ 2024-02-29T09:45:27.1384410+08:00
No supported OpenGL extensions are found.
Error @ 2024-02-29T09:45:27.2872803+08:00
Could not find a part of the path 'D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpC\Shader\vertex.vert'.
at Microsoft.Win32.SafeHandles.SafeFileHandle.CreateFile(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options)
at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)
at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)
at System.IO.Strategies.FileStreamHelpers.ChooseStrategyCore(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)
at System.IO.Strategies.FileStreamHelpers.ChooseStrategy(FileStream fileStream, String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, Int64 preallocationSize)
at System.IO.StreamReader.ValidateArgsAndOpenPath(String path, Encoding encoding, Int32 bufferSize)
at System.IO.File.InternalReadAllText(String path, Encoding encoding)
at System.IO.File.ReadAllText(String path)
at StgSharp.StgSharpDemoForm.Init(Object[] args) in D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpDebug\Program.cs:line 74
at StgSharp.Program.Main(String[] args) in D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpDebug\Program.cs:line 195
+10 -4
View File
@@ -7,7 +7,7 @@
GladGLContext* currentContext;
extern char infolog[512] = { 0 };
SSCAPI void _cdecl initGL(int majorVersion, int minorVersion)
SSCAPI void SSCDECL initGL(int majorVersion, int minorVersion)
{
glfwInit();
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, majorVersion);
@@ -15,10 +15,16 @@ SSCAPI void _cdecl initGL(int majorVersion, int minorVersion)
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
}
SSCAPI unsigned int loadShaderCode(GladGLContext* context, char* const shaderCode, GLint shadertype)
SSCAPI unsigned int SSCDECL loadShaderCode(GladGLContext* context, char* const shaderCode, GLint shadertype)
{
unsigned int shader = context->CreateShader(shadertype);
context->ShaderSource(shader, 1, &shaderCode, NULL);
unsigned int shader = context->CreateShader(GL_VERTEX_SHADER);
if (!shader)
{
return 0xffffffff;
}
printf("%s\n", shaderCode);
context->ShaderSource(shader, 1, shaderCode, NULL);
printf("%s\n", shaderCode);
context->CompileShader(shader);
int success;
context->GetShaderiv(shader, GL_COMPILE_STATUS, &success);
-1
View File
@@ -22,7 +22,6 @@ extern "C"
#pragma region Internal
extern __m128* defaultVecPtr;
#define ALIGN(simdVec) _mm_loadu_ps(&simdVec)
typedef struct Image {
@@ -1,37 +0,0 @@
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\源代码\stgsharpc.bsc
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\源代码\stgsharpc\x64\debug\vc143.pdb
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\源代码\stgsharpc\x64\debug\vc143.idb
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\源代码\stgsharpc\x64\debug\mat4.obj
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\源代码\stgsharpc\x64\debug\mat4.cod
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\源代码\stgsharpc\x64\debug\mat3.obj
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\源代码\stgsharpc\x64\debug\mat3.cod
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\源代码\stgsharpc\x64\debug\mat2.obj
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\源代码\stgsharpc\x64\debug\mat2.cod
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\源代码\stgsharpc\x64\debug\dllmain.obj
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\源代码\stgsharpc\x64\debug\dllmain.cod
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\源代码\stgsharpc\x64\debug\stgsharpc.obj
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\源代码\stgsharpc\x64\debug\stgsharpc.cod
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\源代码\stgsharpc\x64\debug\dllmain.sbr
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\源代码\stgsharpc\x64\debug\mat2.sbr
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\源代码\stgsharpc\x64\debug\mat3.sbr
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\源代码\stgsharpc\x64\debug\mat4.sbr
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\源代码\stgsharpc\x64\debug\stb_image.sbr
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\源代码\stgsharpc\x64\debug\stgsharpc.sbr
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\源代码\stgsharpc\x64\debug\stb_image.obj
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\源代码\stgsharpc\x64\debug\stb_image.cod
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\源代码\stgsharpc.dll
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\源代码\stgsharpc.pdb
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\源代码\stgsharpc.lib
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\源代码\stgsharpc.exp
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\源代码\stgsharpc\x64\debug\stgsharpc.ilk
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\源代码\stgsharpc\x64\debug\stgsharpc.tlog\bscmake.command.1.tlog
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\源代码\stgsharpc\x64\debug\stgsharpc.tlog\bscmake.read.1.tlog
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\源代码\stgsharpc\x64\debug\stgsharpc.tlog\bscmake.write.1.tlog
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\源代码\stgsharpc\x64\debug\stgsharpc.tlog\cl.command.1.tlog
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\源代码\stgsharpc\x64\debug\stgsharpc.tlog\cl.items.tlog
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\源代码\stgsharpc\x64\debug\stgsharpc.tlog\cl.read.1.tlog
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\源代码\stgsharpc\x64\debug\stgsharpc.tlog\cl.write.1.tlog
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\源代码\stgsharpc\x64\debug\stgsharpc.tlog\link.command.1.tlog
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\源代码\stgsharpc\x64\debug\stgsharpc.tlog\link.read.1.tlog
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\源代码\stgsharpc\x64\debug\stgsharpc.tlog\link.secondary.1.tlog
d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\源代码\stgsharpc\x64\debug\stgsharpc.tlog\link.write.1.tlog
+179 -151
View File
@@ -150,9 +150,9 @@ PUBLIC loadGlfuncDefault
PUBLIC unloadImageData
PUBLIC readLog
PUBLIC __JustMyCode_Default
PUBLIC ??_C@_03OFAPEBGM@?$CFs?6@ ; `string'
PUBLIC ??_C@_05JMLLFKBP@?$CFllu?6@ ; `string'
PUBLIC ??_C@_0BL@MOJGOJJP@Failed?5to?5load?5OpenGL?5api?3@ ; `string'
PUBLIC ??_C@_03OFAPEBGM@?$CFs?6@ ; `string'
EXTRN __report_rangecheckfailure:PROC
EXTRN __imp_free:PROC
EXTRN glfwInit:PROC
@@ -197,8 +197,8 @@ $pdata$initGL DD imagerel $LN3
pdata ENDS
; COMDAT pdata
pdata SEGMENT
$pdata$loadShaderCode DD imagerel $LN7
DD imagerel $LN7+327
$pdata$loadShaderCode DD imagerel $LN8
DD imagerel $LN8+380
DD imagerel $unwind$loadShaderCode
pdata ENDS
; COMDAT pdata
@@ -239,10 +239,6 @@ rtc$TMZ ENDS
rtc$IMZ SEGMENT
_RTC_InitBase.rtc$IMZ DQ FLAT:_RTC_InitBase
rtc$IMZ ENDS
; COMDAT ??_C@_03OFAPEBGM@?$CFs?6@
CONST SEGMENT
??_C@_03OFAPEBGM@?$CFs?6@ DB '%s', 0aH, 00H ; `string'
CONST ENDS
; COMDAT ??_C@_0BL@MOJGOJJP@Failed?5to?5load?5OpenGL?5api?3@
CONST SEGMENT
??_C@_0BL@MOJGOJJP@Failed?5to?5load?5OpenGL?5api?3@ DB 'Failed to load Op'
@@ -252,6 +248,10 @@ CONST ENDS
CONST SEGMENT
??_C@_05JMLLFKBP@?$CFllu?6@ DB '%llu', 0aH, 00H ; `string'
CONST ENDS
; COMDAT ??_C@_03OFAPEBGM@?$CFs?6@
CONST SEGMENT
??_C@_03OFAPEBGM@?$CFs?6@ DB '%s', 0aH, 00H ; `string'
CONST ENDS
; COMDAT xdata
xdata SEGMENT
$unwind$readLog DD 025050f01H
@@ -316,7 +316,7 @@ CONST ENDS
; COMDAT voltbl
voltbl SEGMENT
_volmd DW 040H
DW 012eH
DW 0163H
voltbl ENDS
; COMDAT xdata
xdata SEGMENT
@@ -415,7 +415,7 @@ _TEXT SEGMENT
$T1 = 200
readLog PROC ; COMDAT
; 85 : {
; 91 : {
$LN5:
00000 40 55 push rbp
@@ -427,7 +427,7 @@ $LN5:
00 00 lea rcx, OFFSET FLAT:__59F96598_StgSharpC@c
00016 e8 00 00 00 00 call __CheckForDebuggerJustMyCode
; 86 : infolog[511] = '\0';
; 92 : infolog[511] = '\0';
0001b b8 01 00 00 00 mov eax, 1
00020 48 69 c0 ff 01
@@ -448,13 +448,13 @@ $LN4@readLog:
00 00 mov rcx, QWORD PTR $T1[rbp]
00050 c6 04 08 00 mov BYTE PTR [rax+rcx], 0
; 87 : return &infolog;
; 93 : return &infolog;
00054 48 8d 05 00 00
00 00 lea rax, OFFSET FLAT:infolog
$LN2@readLog:
; 88 : }
; 94 : }
0005b 48 8d a5 e8 00
00 00 lea rsp, QWORD PTR [rbp+232]
@@ -470,7 +470,7 @@ _TEXT SEGMENT
out$ = 224
unloadImageData PROC ; COMDAT
; 80 : {
; 86 : {
$LN3:
00000 48 89 4c 24 08 mov QWORD PTR [rsp+8], rcx
@@ -483,7 +483,7 @@ $LN3:
00 00 lea rcx, OFFSET FLAT:__59F96598_StgSharpC@c
0001a e8 00 00 00 00 call __CheckForDebuggerJustMyCode
; 81 : free(out->pixelPtr);
; 87 : free(out->pixelPtr);
0001f 48 8b 85 e0 00
00 00 mov rax, QWORD PTR out$[rbp]
@@ -491,7 +491,7 @@ $LN3:
0002a ff 15 00 00 00
00 call QWORD PTR __imp_free
; 82 : }
; 88 : }
00030 48 8d a5 c8 00
00 00 lea rsp, QWORD PTR [rbp+200]
@@ -509,7 +509,7 @@ i$1 = 40
procName$ = 288
loadGlfuncDefault PROC ; COMDAT
; 38 : {
; 44 : {
$LN7:
00000 48 89 4c 24 08 mov QWORD PTR [rsp+8], rcx
@@ -522,29 +522,29 @@ $LN7:
00 00 lea rcx, OFFSET FLAT:__59F96598_StgSharpC@c
0001a e8 00 00 00 00 call __CheckForDebuggerJustMyCode
; 39 : void* ret = glfwGetProcAddress(procName);
; 45 : void* ret = glfwGetProcAddress(procName);
0001f 48 8b 8d 20 01
00 00 mov rcx, QWORD PTR procName$[rbp]
00026 e8 00 00 00 00 call glfwGetProcAddress
0002b 48 89 45 08 mov QWORD PTR ret$[rbp], rax
; 40 : printf("%llu\n", (uint64_t)ret);
; 46 : printf("%llu\n", (uint64_t)ret);
0002f 48 8b 55 08 mov rdx, QWORD PTR ret$[rbp]
00033 48 8d 0d 00 00
00 00 lea rcx, OFFSET FLAT:??_C@_05JMLLFKBP@?$CFllu?6@
0003a e8 00 00 00 00 call printf
; 41 : if (ret = NULL)
; 47 : if (ret = NULL)
0003f 48 c7 45 08 00
00 00 00 mov QWORD PTR ret$[rbp], 0
00047 48 83 7d 08 00 cmp QWORD PTR ret$[rbp], 0
0004c 74 6e je SHORT $LN5@loadGlfunc
; 42 : {
; 43 : *infolog = "Failed to load OpenGL api:";
; 48 : {
; 49 : *infolog = "Failed to load OpenGL api:";
0004e b8 01 00 00 00 mov eax, 1
00053 48 6b c0 00 imul rax, rax, 0
@@ -554,7 +554,7 @@ $LN7:
00 00 lea rdx, OFFSET FLAT:??_C@_0BL@MOJGOJJP@Failed?5to?5load?5OpenGL?5api?3@
00065 88 14 01 mov BYTE PTR [rcx+rax], dl
; 44 : for (size_t i = 0; i < sizeof(procName); i++)
; 50 : for (size_t i = 0; i < sizeof(procName); i++)
00068 48 c7 45 28 00
00 00 00 mov QWORD PTR i$1[rbp], 0
@@ -567,8 +567,8 @@ $LN4@loadGlfunc:
0007d 48 83 7d 28 08 cmp QWORD PTR i$1[rbp], 8
00082 73 25 jae SHORT $LN3@loadGlfunc
; 45 : {
; 46 : infolog[30 + i] = procName[i];
; 51 : {
; 52 : infolog[30 + i] = procName[i];
00084 48 8d 05 00 00
00 00 lea rax, OFFSET FLAT:infolog
@@ -581,12 +581,12 @@ $LN4@loadGlfunc:
000a0 0f b6 09 movzx ecx, BYTE PTR [rcx]
000a3 88 4c 10 1e mov BYTE PTR [rax+rdx+30], cl
; 47 : }
; 53 : }
000a7 eb c9 jmp SHORT $LN2@loadGlfunc
$LN3@loadGlfunc:
; 48 : printf("%s\n", infolog);
; 54 : printf("%s\n", infolog);
000a9 48 8d 15 00 00
00 00 lea rdx, OFFSET FLAT:infolog
@@ -595,12 +595,12 @@ $LN3@loadGlfunc:
000b7 e8 00 00 00 00 call printf
$LN5@loadGlfunc:
; 49 : }
; 50 : return (GLFWglproc)ret;
; 55 : }
; 56 : return (GLFWglproc)ret;
000bc 48 8b 45 08 mov rax, QWORD PTR ret$[rbp]
; 51 : }
; 57 : }
000c0 48 8d a5 08 01
00 00 lea rsp, QWORD PTR [rbp+264]
@@ -618,7 +618,7 @@ out$ = 232
loader$ = 240
loadImageData PROC ; COMDAT
; 71 : {
; 77 : {
$LN4:
00000 4c 89 44 24 18 mov QWORD PTR [rsp+24], r8
@@ -633,14 +633,14 @@ $LN4:
00 00 lea rcx, OFFSET FLAT:__59F96598_StgSharpC@c
00024 e8 00 00 00 00 call __CheckForDebuggerJustMyCode
; 72 : if (loader == NULL)
; 78 : if (loader == NULL)
00029 48 83 bd f0 00
00 00 00 cmp QWORD PTR loader$[rbp], 0
00031 75 0e jne SHORT $LN2@loadImageD
; 73 : {
; 74 : loader = stbi_load;
; 79 : {
; 80 : loader = stbi_load;
00033 48 8d 05 00 00
00 00 lea rax, OFFSET FLAT:stbi_load
@@ -648,8 +648,8 @@ $LN4:
00 00 mov QWORD PTR loader$[rbp], rax
$LN2@loadImageD:
; 75 : }
; 76 : out->pixelPtr = loader(location, &(out->width), &(out->height), &(out->channel), 0);
; 81 : }
; 82 : out->pixelPtr = loader(location, &(out->width), &(out->height), &(out->channel), 0);
00041 48 8b 85 e8 00
00 00 mov rax, QWORD PTR out$[rbp]
@@ -671,7 +671,7 @@ $LN2@loadImageD:
00 00 mov rcx, QWORD PTR out$[rbp]
00080 48 89 41 10 mov QWORD PTR [rcx+16], rax
; 77 : }
; 83 : }
00084 48 8d a5 c8 00
00 00 lea rsp, QWORD PTR [rbp+200]
@@ -690,7 +690,7 @@ context$ = 256
shaderProgram$ = 264
linkShaderProgram PROC ; COMDAT
; 54 : {
; 60 : {
$LN5:
00000 89 54 24 10 mov DWORD PTR [rsp+16], edx
@@ -715,7 +715,7 @@ $LN5:
00 00 lea rcx, OFFSET FLAT:__59F96598_StgSharpC@c
00048 e8 00 00 00 00 call __CheckForDebuggerJustMyCode
; 55 : context->LinkProgram(shaderProgram);
; 61 : context->LinkProgram(shaderProgram);
0004d 8b 8d 08 01 00
00 mov ecx, DWORD PTR shaderProgram$[rbp]
@@ -724,9 +724,9 @@ $LN5:
0005a ff 90 80 22 00
00 call QWORD PTR [rax+8832]
; 56 :
; 57 : int success;
; 58 : context->GetProgramiv(shaderProgram, GL_LINK_STATUS, &success);
; 62 :
; 63 : int success;
; 64 : context->GetProgramiv(shaderProgram, GL_LINK_STATUS, &success);
00060 4c 8d 45 04 lea r8, QWORD PTR success$[rbp]
00064 ba 82 8b 00 00 mov edx, 35714 ; 00008b82H
@@ -737,13 +737,13 @@ $LN5:
00076 ff 90 48 1a 00
00 call QWORD PTR [rax+6728]
; 59 : if (!success)
; 65 : if (!success)
0007c 83 7d 04 00 cmp DWORD PTR success$[rbp], 0
00080 75 28 jne SHORT $LN2@linkShader
; 60 : {
; 61 : context->GetProgramInfoLog(shaderProgram, 512, NULL, infolog);
; 66 : {
; 67 : context->GetProgramInfoLog(shaderProgram, 512, NULL, infolog);
00082 4c 8d 0d 00 00
00 00 lea r9, OFFSET FLAT:infolog
@@ -756,27 +756,27 @@ $LN5:
0009e ff 90 98 19 00
00 call QWORD PTR [rax+6552]
; 62 : return 0;
; 68 : return 0;
000a4 33 c0 xor eax, eax
000a6 eb 08 jmp SHORT $LN1@linkShader
; 63 : }
; 69 : }
000a8 eb 06 jmp SHORT $LN3@linkShader
$LN2@linkShader:
; 64 : else
; 65 : {
; 66 : return shaderProgram;
; 70 : else
; 71 : {
; 72 : return shaderProgram;
000aa 8b 85 08 01 00
00 mov eax, DWORD PTR shaderProgram$[rbp]
$LN3@linkShader:
$LN1@linkShader:
; 67 : }
; 68 : }
; 73 : }
; 74 : }
000b0 48 8b f8 mov rdi, rax
000b3 48 8d 4d e0 lea rcx, QWORD PTR [rbp-32]
@@ -810,7 +810,7 @@ loadShaderCode PROC ; COMDAT
; 19 : {
$LN7:
$LN8:
00000 44 89 44 24 18 mov DWORD PTR [rsp+24], r8d
00005 48 89 54 24 10 mov QWORD PTR [rsp+16], rdx
0000a 48 89 4c 24 08 mov QWORD PTR [rsp+8], rcx
@@ -834,123 +834,151 @@ $LN7:
00 00 lea rcx, OFFSET FLAT:__59F96598_StgSharpC@c
0004e e8 00 00 00 00 call __CheckForDebuggerJustMyCode
; 20 : unsigned int shader = context->CreateShader(shadertype);
; 20 : unsigned int shader = context->CreateShader(GL_VERTEX_SHADER);
00053 8b 8d 50 01 00
00 mov ecx, DWORD PTR shadertype$[rbp]
00059 48 8b 85 40 01
00053 b9 31 8b 00 00 mov ecx, 35633 ; 00008b31H
00058 48 8b 85 40 01
00 00 mov rax, QWORD PTR context$[rbp]
00060 ff 90 f0 09 00
0005f ff 90 f0 09 00
00 call QWORD PTR [rax+2544]
00066 89 45 04 mov DWORD PTR shader$[rbp], eax
00065 89 45 04 mov DWORD PTR shader$[rbp], eax
; 21 : context->ShaderSource(shader, 1, &shaderCode, NULL);
; 21 : if (!shader)
00069 45 33 c9 xor r9d, r9d
0006c 4c 8d 85 48 01
00 00 lea r8, QWORD PTR shaderCode$[rbp]
00073 ba 01 00 00 00 mov edx, 1
00078 8b 4d 04 mov ecx, DWORD PTR shader$[rbp]
0007b 48 8b 85 40 01
00 00 mov rax, QWORD PTR context$[rbp]
00082 ff 90 50 37 00
00 call QWORD PTR [rax+14160]
00068 83 7d 04 00 cmp DWORD PTR shader$[rbp], 0
0006c 75 0a jne SHORT $LN2@loadShader
; 22 : context->CompileShader(shader);
; 22 : {
; 23 : return 0xffffffff;
00088 8b 4d 04 mov ecx, DWORD PTR shader$[rbp]
0008b 48 8b 85 40 01
00 00 mov rax, QWORD PTR context$[rbp]
00092 ff 90 18 07 00
00 call QWORD PTR [rax+1816]
; 23 : int success;
; 24 : context->GetShaderiv(shader, GL_COMPILE_STATUS, &success);
00098 4c 8d 45 24 lea r8, QWORD PTR success$[rbp]
0009c ba 81 8b 00 00 mov edx, 35713 ; 00008b81H
000a1 8b 4d 04 mov ecx, DWORD PTR shader$[rbp]
000a4 48 8b 85 40 01
00 00 mov rax, QWORD PTR context$[rbp]
000ab ff 90 40 1b 00
00 call QWORD PTR [rax+6976]
; 25 : if (!success)
000b1 83 7d 24 00 cmp DWORD PTR success$[rbp], 0
000b5 75 5e jne SHORT $LN2@loadShader
; 26 : {
; 27 : context->GetShaderInfoLog(shader, 512, NULL, infolog);
000b7 4c 8d 0d 00 00
00 00 lea r9, OFFSET FLAT:infolog
000be 45 33 c0 xor r8d, r8d
000c1 ba 00 02 00 00 mov edx, 512 ; 00000200H
000c6 8b 4d 04 mov ecx, DWORD PTR shader$[rbp]
000c9 48 8b 85 40 01
00 00 mov rax, QWORD PTR context$[rbp]
000d0 ff 90 20 1b 00
00 call QWORD PTR [rax+6944]
; 28 : infolog[511] = '\0';
000d6 b8 01 00 00 00 mov eax, 1
000db 48 69 c0 ff 01
00 00 imul rax, rax, 511 ; 000001ffH
000e2 48 89 85 08 01
00 00 mov QWORD PTR $T4[rbp], rax
000e9 48 81 bd 08 01
00 00 00 02 00
00 cmp QWORD PTR $T4[rbp], 512 ; 00000200H
000f4 73 02 jae SHORT $LN5@loadShader
000f6 eb 05 jmp SHORT $LN6@loadShader
$LN5@loadShader:
000f8 e8 00 00 00 00 call __report_rangecheckfailure
$LN6@loadShader:
000fd 48 8d 05 00 00
00 00 lea rax, OFFSET FLAT:infolog
00104 48 8b 8d 08 01
00 00 mov rcx, QWORD PTR $T4[rbp]
0010b c6 04 08 00 mov BYTE PTR [rax+rcx], 0
; 29 : return 0;
0010f 33 c0 xor eax, eax
00111 eb 05 jmp SHORT $LN1@loadShader
; 30 : }
00113 eb 03 jmp SHORT $LN3@loadShader
0006e b8 ff ff ff ff mov eax, -1 ; ffffffffH
00073 e9 d5 00 00 00 jmp $LN1@loadShader
$LN2@loadShader:
; 31 : else
; 24 : }
; 25 : printf("%s\n", shaderCode);
00078 48 8b 95 48 01
00 00 mov rdx, QWORD PTR shaderCode$[rbp]
0007f 48 8d 0d 00 00
00 00 lea rcx, OFFSET FLAT:??_C@_03OFAPEBGM@?$CFs?6@
00086 e8 00 00 00 00 call printf
; 26 : context->ShaderSource(shader, 1, shaderCode, NULL);
0008b 45 33 c9 xor r9d, r9d
0008e 4c 8b 85 48 01
00 00 mov r8, QWORD PTR shaderCode$[rbp]
00095 ba 01 00 00 00 mov edx, 1
0009a 8b 4d 04 mov ecx, DWORD PTR shader$[rbp]
0009d 48 8b 85 40 01
00 00 mov rax, QWORD PTR context$[rbp]
000a4 ff 90 50 37 00
00 call QWORD PTR [rax+14160]
; 27 : printf("%s\n", shaderCode);
000aa 48 8b 95 48 01
00 00 mov rdx, QWORD PTR shaderCode$[rbp]
000b1 48 8d 0d 00 00
00 00 lea rcx, OFFSET FLAT:??_C@_03OFAPEBGM@?$CFs?6@
000b8 e8 00 00 00 00 call printf
; 28 : context->CompileShader(shader);
000bd 8b 4d 04 mov ecx, DWORD PTR shader$[rbp]
000c0 48 8b 85 40 01
00 00 mov rax, QWORD PTR context$[rbp]
000c7 ff 90 18 07 00
00 call QWORD PTR [rax+1816]
; 29 : int success;
; 30 : context->GetShaderiv(shader, GL_COMPILE_STATUS, &success);
000cd 4c 8d 45 24 lea r8, QWORD PTR success$[rbp]
000d1 ba 81 8b 00 00 mov edx, 35713 ; 00008b81H
000d6 8b 4d 04 mov ecx, DWORD PTR shader$[rbp]
000d9 48 8b 85 40 01
00 00 mov rax, QWORD PTR context$[rbp]
000e0 ff 90 40 1b 00
00 call QWORD PTR [rax+6976]
; 31 : if (!success)
000e6 83 7d 24 00 cmp DWORD PTR success$[rbp], 0
000ea 75 5e jne SHORT $LN3@loadShader
; 32 : {
; 33 : return shader;
; 33 : context->GetShaderInfoLog(shader, 512, NULL, infolog);
00115 8b 45 04 mov eax, DWORD PTR shader$[rbp]
000ec 4c 8d 0d 00 00
00 00 lea r9, OFFSET FLAT:infolog
000f3 45 33 c0 xor r8d, r8d
000f6 ba 00 02 00 00 mov edx, 512 ; 00000200H
000fb 8b 4d 04 mov ecx, DWORD PTR shader$[rbp]
000fe 48 8b 85 40 01
00 00 mov rax, QWORD PTR context$[rbp]
00105 ff 90 20 1b 00
00 call QWORD PTR [rax+6944]
; 34 : infolog[511] = '\0';
0010b b8 01 00 00 00 mov eax, 1
00110 48 69 c0 ff 01
00 00 imul rax, rax, 511 ; 000001ffH
00117 48 89 85 08 01
00 00 mov QWORD PTR $T4[rbp], rax
0011e 48 81 bd 08 01
00 00 00 02 00
00 cmp QWORD PTR $T4[rbp], 512 ; 00000200H
00129 73 02 jae SHORT $LN6@loadShader
0012b eb 05 jmp SHORT $LN7@loadShader
$LN6@loadShader:
0012d e8 00 00 00 00 call __report_rangecheckfailure
$LN7@loadShader:
00132 48 8d 05 00 00
00 00 lea rax, OFFSET FLAT:infolog
00139 48 8b 8d 08 01
00 00 mov rcx, QWORD PTR $T4[rbp]
00140 c6 04 08 00 mov BYTE PTR [rax+rcx], 0
; 35 : return 0;
00144 33 c0 xor eax, eax
00146 eb 05 jmp SHORT $LN1@loadShader
; 36 : }
00148 eb 03 jmp SHORT $LN4@loadShader
$LN3@loadShader:
$LN1@loadShader:
; 37 : else
; 38 : {
; 39 : return shader;
0014a 8b 45 04 mov eax, DWORD PTR shader$[rbp]
$LN4@loadShader:
$LN1@loadShader:
$LN5@loadShader:
; 34 : }
; 35 : }
; 40 : }
; 41 : }
00118 48 8b f8 mov rdi, rax
0011b 48 8d 4d e0 lea rcx, QWORD PTR [rbp-32]
0011f 48 8d 15 00 00
0014d 48 8b f8 mov rdi, rax
00150 48 8d 4d e0 lea rcx, QWORD PTR [rbp-32]
00154 48 8d 15 00 00
00 00 lea rdx, OFFSET FLAT:loadShaderCode$rtcFrameData
00126 e8 00 00 00 00 call _RTC_CheckStackVars
0012b 48 8b c7 mov rax, rdi
0012e 48 8b 8d 18 01
0015b e8 00 00 00 00 call _RTC_CheckStackVars
00160 48 8b c7 mov rax, rdi
00163 48 8b 8d 18 01
00 00 mov rcx, QWORD PTR __$ArrayPad$[rbp]
00135 48 33 cd xor rcx, rbp
00138 e8 00 00 00 00 call __security_check_cookie
0013d 48 8d a5 28 01
0016a 48 33 cd xor rcx, rbp
0016d e8 00 00 00 00 call __security_check_cookie
00172 48 8d a5 28 01
00 00 lea rsp, QWORD PTR [rbp+296]
00144 5f pop rdi
00145 5d pop rbp
00146 c3 ret 0
00179 5f pop rdi
0017a 5d pop rbp
0017b c3 ret 0
loadShaderCode ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu /ZI
Binary file not shown.
+6 -2
View File
@@ -1,4 +1,8 @@
StgSharpC.c
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpC\StgSharpC.c(43,18): warning C4047: “=”:“char”与“char [27]”的间接级别不同
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpC\StgSharpC.c(87,5): warning C4047: “return”:“char *”与“char (*)[512]”的间接级别不同
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpC\StgSharpC.c(26,38): warning C4047: “函数”:“const GLchar *const *”与“char *const ”的间接级别不同
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpC\StgSharpC.c(26,38): warning C4024: “通过指针的函数”: 形参和实参 3 的类型不同
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpC\StgSharpC.c(49,18): warning C4047: “=”:“char”与“char [27]”的间接级别不同
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpC\StgSharpC.c(93,5): warning C4047: “return”:“char *”与“char (*)[512]”的间接级别不同
glfw3.lib(init.obj) : warning LNK4099: 未找到 PDB“”(使用“glfw3.lib(init.obj)”或在“”中寻找);正在链接对象,如同没有调试信息一样
glfw3.lib(win32_joystick.obj) : warning LNK4099: 未找到 PDB“”(使用“glfw3.lib(win32_joystick.obj)”或在“”中寻找);正在链接对象,如同没有调试信息一样
StgSharpC.vcxproj -> D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpC.dll
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.
+36 -5
View File
@@ -6,6 +6,7 @@ using StgSharp.Math;
using StgSharp.Math.Linear;
using System;
using System.Collections.Concurrent;
using System.Diagnostics;
using System.IO;
using System.Numerics;
@@ -60,20 +61,19 @@ namespace StgSharp
SetMetadata(800, 600, "Hello, STG#!", IntPtr.Zero, null);
MakeAsCurrentContext();
SetSizeLimit(800, 600, 800, 600);
this.LoadGLapi(null);
FrameBufferSizeCallback =
(IntPtr id, uint width, uint height)
=>
(IntPtr id, uint width, uint height) =>
{
gl.Viewport(0, 0, width, height);
};
this.LoadGLapi(null);
shader = CreateShaderProgram();
var vertex = CreateShader(ShaderType.Vertex, 1);
var fragment = CreateShader(ShaderType.Fragment, 1);
vertex.Compile(File.ReadAllText("Shader\\vertex.vert"));
vertex.Compile(0, File.ReadAllText("Shader\\vertex.vert"));
vertex.AttachTo(0, shader);
fragment.Compile(File.ReadAllText("Shader\\fragment.frag"));
fragment.Compile(0, File.ReadAllText("Shader\\fragment.frag"));
fragment.AttachTo(0, shader);
shader.Link();
@@ -195,6 +195,37 @@ namespace StgSharp
demoForm.Init();
demoForm.Show();
/**/
/*
GLparamQueue queue = new GLparamQueue();
Thread t = default;
for (int i = 0; i < 100; i++)
{
M128 m = new M128();
m.Write<int>(0, 1 + i);
m.Write<int>(1, 10 - i);
m.Write<Int64>(1, 511L * i);
queue.Enqueue(m);
if (i == 10)
{
t = new Thread(new ThreadStart(
() =>
{
for (int i = 0; i < 100; i++)
{
M128 m = default;
queue.TryDequeue(out m);
Console.WriteLine(m.ToString(10));
}
}
));
t.Start();
}
}
t.Join();
/**/
}
catch (Exception ex)
{
@@ -14,7 +14,7 @@ using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("StgSharpDebug")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+a2241a5a5816a9438c63e3ca3c69313e6f2e8f56")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+1f2fca4c8fe323daf9751677ccfdf0f7b04a9be8")]
[assembly: System.Reflection.AssemblyProductAttribute("StgSharpDebug")]
[assembly: System.Reflection.AssemblyTitleAttribute("StgSharpDebug")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
@@ -1 +1 @@
2dfd7b0369d09bcc69dec88772b4d57803801aa4bccd89b3fbe73b3142b0ec2d
f39354df32cff1f4b7029d115507a26a5d509f597c83e7563a9e711f413fd48a
@@ -1 +1 @@
d3950cf43a4621e23b9ef30b3a756b05673c0e97f9577997adebeaad64313512
c55fdcf5347f885d1031021c599a5f342bcfdf8d8bb3a34371e4f37879f74d7d
@@ -7,11 +7,7 @@ D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharp
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpDebug\bin\x64\Debug\net6.0\StgSharpDebug.dll
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpDebug\bin\x64\Debug\net6.0\StgSharpDebug.pdb
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpDebug\bin\x64\Debug\net6.0\StgSharpDebug.xml
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpDebug\obj\x64\Debug\net6.0\StgSharpDebug.GeneratedMSBuildEditorConfig.editorconfig
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpDebug\obj\x64\Debug\net6.0\StgSharpDebug.AssemblyInfoInputs.cache
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpDebug\obj\x64\Debug\net6.0\StgSharpDebug.AssemblyInfo.cs
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpDebug\obj\x64\Debug\net6.0\StgSharpDebug.csproj.CoreCompileInputs.cache
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpDebug\obj\x64\Debug\net6.0\StgSharpDebug.sourcelink.json
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\Output\x64\Debug\net6.0\StgSharpDebug.dll
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\Output\x64\Debug\net6.0\StgSharpDebug.exe
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\Output\x64\Debug\net6.0\Shader\awesomeface.png
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\Output\x64\Debug\net6.0\Shader\fragment.frag
@@ -19,9 +15,13 @@ D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\Output\x
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\Output\x64\Debug\net6.0\Shader\vertex.vert
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\Output\x64\Debug\net6.0\StgSharpDebug.deps.json
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\Output\x64\Debug\net6.0\StgSharpDebug.runtimeconfig.json
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\Output\x64\Debug\net6.0\StgSharpDebug.dll
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\Output\x64\Debug\net6.0\StgSharpDebug.pdb
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\Output\x64\Debug\net6.0\StgSharpDebug.xml
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpDebug\obj\x64\Debug\net6.0\StgSharpDebug.GeneratedMSBuildEditorConfig.editorconfig
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpDebug\obj\x64\Debug\net6.0\StgSharpDebug.AssemblyInfoInputs.cache
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpDebug\obj\x64\Debug\net6.0\StgSharpDebug.AssemblyInfo.cs
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpDebug\obj\x64\Debug\net6.0\StgSharpDebug.csproj.CoreCompileInputs.cache
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpDebug\obj\x64\Debug\net6.0\StgSharpDebug.sourcelink.json
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpDebug\obj\x64\Debug\net6.0\StgSharpDebug.dll
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpDebug\obj\x64\Debug\net6.0\StgSharpDebug.xml
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpDebug\obj\x64\Debug\net6.0\StgSharpDebug.pdb

Some files were not shown because too many files have changed in this diff Show More