daily update on 20231217 by nitload youmu
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,9 @@
|
||||
Error @ 2023-12-18T00:27:50.8218872+08:00
|
||||
Index was outside the bounds of the array.
|
||||
at StgSharp.Logic.DynamicArrayList`1.get_Item(Int32 index) in D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpDebug\Logic\ArrayList.cs:line 101
|
||||
at StgSharp.Program.Main(String[] args) in D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpDebug\Program.cs:line 209
|
||||
Error @ 2023-12-18T00:50:06.7905891+08:00
|
||||
Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')
|
||||
at System.Collections.Generic.List`1.get_Item(Int32 index)
|
||||
at StgSharp.Logic.DynamicArrayList`1.get_Item(Int32 index) in D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpDebug\Logic\ArrayList.cs:line 101
|
||||
at StgSharp.Program.Main(String[] args) in D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpDebug\Program.cs:line 209
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -29,22 +29,43 @@
|
||||
Height of this form, represent in <see cref="T:System.Int32"/>
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:StgSharp.Graphics.Form.IsDoubleRendering">
|
||||
<summary>
|
||||
Representing
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:StgSharp.Graphics.Form.Size">
|
||||
<summary>
|
||||
Width of this form, represent in <see cref="T:System.Int32"/>
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:StgSharp.Graphics.Form.GL">
|
||||
<member name="M:StgSharp.Graphics.Form.Init(System.Object[])">
|
||||
<summary>
|
||||
A set of methods providing support for all OpenGL
|
||||
APIs and other methods depend on OpenGL.
|
||||
Necessary operation to init this form.
|
||||
</summary>
|
||||
<param name="args"></param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.Form.Main(System.Object[])">
|
||||
<summary>
|
||||
Behaviour of current form when in a render cycle.
|
||||
When this form
|
||||
</summary>
|
||||
<param name="args"></param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.Form.Show(System.Object[])">
|
||||
<summary>
|
||||
Init this form and render it on screen, and respond with operation
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.Form.SetRenderThreads(System.Boolean)">
|
||||
<summary>
|
||||
Define how current form render in one frame.
|
||||
</summary>
|
||||
<param name="totalThread">
|
||||
|
||||
Please define
|
||||
</param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.Form.InitForm(System.Int32,System.Int32,System.String,System.IntPtr,StgSharp.Graphics.Form)">
|
||||
<summary>
|
||||
Constructor of a Form, creats an instance of a form and
|
||||
@@ -94,11 +115,6 @@
|
||||
Maximum size of current form. In form of a <see cref="T:StgSharp.Math.Vec2d"/> of (width,height)
|
||||
</param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.Form.BindToPlatform">
|
||||
<summary>
|
||||
Bind this form to StgSharp platform.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.Form.Texture.LoadTexture(System.Int32,System.String,StgSharp.Graphics.ImageLoader)">
|
||||
<summary>
|
||||
|
||||
@@ -107,29 +123,6 @@
|
||||
<param name="index"></param>
|
||||
<param name="loader"></param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.Form.VertexBuffer.Unbind">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.Form.VertexBuffer.SetValue``1(System.Int32,``0,StgSharp.Graphics.BufferUsage)">
|
||||
<summary>
|
||||
Set data to current vertex buffer object
|
||||
</summary>
|
||||
<typeparam name="T">Type of bufferData</typeparam>
|
||||
<param name="index">Index to find certain VBO in this instance</param>
|
||||
<param name="bufferData">Data to write in</param>
|
||||
<param name="usage">How OpenGL use these data, defined by <see cref="T:StgSharp.Graphics.BufferUsage"/></param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.Form.VertexBuffer.SetValueArray``1(System.Int32,``0[],StgSharp.Graphics.BufferUsage)">
|
||||
<summary>
|
||||
Set data to current vertex buffer object
|
||||
</summary>
|
||||
<typeparam name="T">Type of bufferData</typeparam>
|
||||
<param name="index">Index to find certain VBO in this instance</param>
|
||||
<param name="bufferArray">A array of data to write in</param>
|
||||
<param name="usage">How OpenGL use these data, defined by <see cref="T:StgSharp.Graphics.BufferUsage"/></param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.Form.CreateShader">
|
||||
<summary>
|
||||
Create an instance of <see cref="T:StgSharp.Graphics.Form.Shader"/> program
|
||||
@@ -193,6 +186,34 @@
|
||||
</summary>
|
||||
<param name="timer"><see cref="T:StgSharp.Graphics.FrameTimer"/> to be converted</param>
|
||||
</member>
|
||||
<member name="T:StgSharp.Graphics.IBufferObject">
|
||||
<summary>
|
||||
Interface of all kinds OpenGL buffer onjects
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.VertexBuffer.Unbind">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.VertexBuffer.SetValue``1(System.Int32,``0,StgSharp.Graphics.BufferUsage)">
|
||||
<summary>
|
||||
Set data to current vertex buffer object
|
||||
</summary>
|
||||
<typeparam name="T">Type of bufferData</typeparam>
|
||||
<param name="index">Index to find certain VBO in this instance</param>
|
||||
<param name="bufferData">Data to write in</param>
|
||||
<param name="usage">How OpenGL use these data, defined by <see cref="T:StgSharp.Graphics.BufferUsage"/></param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.VertexBuffer.SetValueArray``1(System.Int32,``0[],StgSharp.Graphics.BufferUsage)">
|
||||
<summary>
|
||||
Set data to current vertex buffer object
|
||||
</summary>
|
||||
<typeparam name="T">Type of bufferData</typeparam>
|
||||
<param name="index">Index to find certain VBO in this instance</param>
|
||||
<param name="bufferArray">A array of data to write in</param>
|
||||
<param name="usage">How OpenGL use these data, defined by <see cref="T:StgSharp.Graphics.BufferUsage"/></param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.glManager.LoadGLapi(StgSharp.Graphics.Form,StgSharp.Graphics.GLfuncLoader)">
|
||||
<summary>
|
||||
Load all aupportable OpenGL APIs and bind them to given <see cref="T:StgSharp.Graphics.Form"/> context.
|
||||
@@ -269,6 +290,34 @@
|
||||
<param name="uniform">The <see cref="T:StgSharp.Graphics.Uniform`1"/> target</param>
|
||||
<param name="vec">A <see cref="T:StgSharp.Math.Vec4d"/> value of the uniform </param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.IglFunc.AlignFrame(StgSharp.Graphics.Form)">
|
||||
<summary>
|
||||
Align a sets of code to frame update of a <see cref="T:StgSharp.Graphics.Form"/>.
|
||||
Usually, a call of <see cref="M:StgSharp.Graphics.IglFunc.AfterAlign(StgSharp.Graphics.Form,System.Action)"/> is required.
|
||||
This method is used as sigle thread method. If more than one
|
||||
alignment is requested, a <see cref="T:System.InvalidOperationException"/> will throw.
|
||||
</summary>
|
||||
<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.AfterAlign(StgSharp.Graphics.Form,System.Action)">
|
||||
<summary>
|
||||
Operation after alignment by calling <see cref="M:StgSharp.Graphics.IglFunc.AlignFrame(StgSharp.Graphics.Form)"/>.
|
||||
No calling of this method is acceptable, but it will bring the risk
|
||||
of that relevant code will not run if it is interrupted by frame overtime.
|
||||
Please call this method immediately after calling <see cref="M:StgSharp.Graphics.IglFunc.AlignFrame(StgSharp.Graphics.Form)"/>,
|
||||
too early or sonner may cause <see cref="T:System.InvalidOperationException"/>.
|
||||
</summary>
|
||||
<param name="form">The form used as frame update benchmark.</param>
|
||||
<param name="action">Operation after frame update alignment.</param>
|
||||
<exception cref="T:System.InvalidOperationException">The action binded to a wrong alignment.</exception>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.IglFunc.ActiveTexture(System.UInt32)">
|
||||
<summary>
|
||||
Same function as OpenGL api glActiveTexture
|
||||
</summary>
|
||||
<param name="type">type of texture to activate</param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.IglFunc.AttachShader(System.UInt32,System.UInt32)">
|
||||
<summary>
|
||||
Same fucntion as OpenGL api glAttachShader
|
||||
@@ -283,6 +332,13 @@
|
||||
<param name="bufferType"></param>
|
||||
<param name="index"></param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.IglFunc.BindTexture(System.UInt32,System.UInt32)">
|
||||
<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.UInt32)">
|
||||
<summary>
|
||||
Same function as OpenGL api, glBindVertexArray
|
||||
@@ -354,6 +410,13 @@
|
||||
<param name="count"></param>
|
||||
<param name="ptr"></param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.IglFunc.GenTextures(System.Int32,System.UInt32*)">
|
||||
<summary>
|
||||
Same fucnction as OpenGL api glGenTextures.
|
||||
</summary>
|
||||
<param name="count">amount of textures to generate</param>
|
||||
<param name="ptr">pointer to texture signs' array</param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.IglFunc.GenVertexArrays(System.Int32,System.UInt32*)">
|
||||
<summary>
|
||||
Same fucntion as OpenGL api, glGenVertexArray
|
||||
@@ -369,6 +432,12 @@
|
||||
<param name="ptr">Pointer to byte array of name <see cref="T:System.String"/> of the uniform </param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.IglFunc.MakeContexCurrent(StgSharp.Graphics.Form)">
|
||||
<summary>
|
||||
Make the OpenGL context of a vertain <see cref="T:StgSharp.Graphics.Form"/> as the activated OpenGL context.
|
||||
</summary>
|
||||
<param name="form"></param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.IglFunc.SetFrameBufferSizeCallback(System.IntPtr,StgSharp.Graphics.FrameBufferSizeHandler)">
|
||||
<summary>
|
||||
sets the framebuffer resize callback of the specified <see cref="T:StgSharp.Graphics.Form"/>,
|
||||
@@ -415,26 +484,6 @@
|
||||
</summary>
|
||||
<param name="program">Sign of program to be used</param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.IglFunc.GenTextures(System.Int32,System.UInt32*)">
|
||||
<summary>
|
||||
Same fucnction as OpenGL api glGenTextures.
|
||||
</summary>
|
||||
<param name="count">amount of textures to generate</param>
|
||||
<param name="ptr">pointer to texture signs' array</param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.IglFunc.BindTexture(System.UInt32,System.UInt32)">
|
||||
<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.ActiveTexture(System.UInt32)">
|
||||
<summary>
|
||||
Same function as OpenGL api glActiveTexture
|
||||
</summary>
|
||||
<param name="type">type of texture to activate</param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.IglFunc.Viewport(System.Int32,System.Int32,System.Int32,System.Int32)">
|
||||
<summary>
|
||||
Same function as the OpenGL api, glViewPort
|
||||
@@ -599,6 +648,47 @@
|
||||
A square
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:StgSharp.Logic.DynamicArrayList`1">
|
||||
<summary>
|
||||
A linear data structure with dynamic length.
|
||||
It contains a <see cref="T:System.Collections.Generic.List`1"/> of <see cref="T:System.Array"/>,
|
||||
each <see cref="T:System.Array"/> is twice longer than the former one.
|
||||
</summary>
|
||||
<typeparam name="T"></typeparam>
|
||||
</member>
|
||||
<member name="M:StgSharp.Logic.DynamicArrayList`1.#ctor(System.Int32)">
|
||||
<summary>
|
||||
Init a <see cref="T:StgSharp.Logic.DynamicArrayList`1"/> with a certain amount of elements prepared.
|
||||
</summary>
|
||||
<param name="count">Amount of elements to be prepared.</param>
|
||||
</member>
|
||||
<member name="P:StgSharp.Logic.DynamicArrayList`1.Length">
|
||||
<summary>
|
||||
Length of this <see cref="T:StgSharp.Logic.DynamicArrayList`1"/>
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:StgSharp.Logic.Bool2">
|
||||
<summary>
|
||||
A pair of <see cref="T:System.Boolean"/> value
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:StgSharp.Logic.Bool2.Value">
|
||||
<summary>
|
||||
A <see cref="T:System.UInt16"/> value.
|
||||
The lower byte is <see cref="F:StgSharp.Logic.Bool2.bool0"/>,
|
||||
and higher byte is <see cref="F:StgSharp.Logic.Bool2.bool1"/>.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:StgSharp.Logic.Bool2.bool0">
|
||||
<summary>
|
||||
The first <see cref="T:System.Boolean"/> value.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:StgSharp.Logic.Bool2.bool1">
|
||||
<summary>
|
||||
The second <see cref="T:System.Boolean"/> value.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:StgSharp.LinkedList`1.IsEmpty">
|
||||
<summary>
|
||||
Whether this linked list has no members or not.
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using StgSharp.Entities;
|
||||
using StgSharp.Graphics;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Threading;
|
||||
|
||||
|
||||
@@ -24,31 +24,29 @@ namespace StgSharp.Graphics
|
||||
internal LinkedList<Control> allControl;
|
||||
internal Vector4 color;
|
||||
internal Thread formThread;
|
||||
internal IglFunc GL;
|
||||
internal int height;
|
||||
internal IntPtr monitor;
|
||||
internal string name;
|
||||
internal FormRenderBuffer RenderBuffer;
|
||||
internal Form sharedForm;
|
||||
internal FrameUpdateTimer timer = new FrameUpdateTimer();
|
||||
internal FormUpdateBuffer UpdateBuffer;
|
||||
internal int width;
|
||||
internal IntPtr windowID;
|
||||
|
||||
internal IglFunc GL;
|
||||
internal FormUpdateBuffer UpdateBuffer;
|
||||
internal FormRenderBuffer RenderBuffer;
|
||||
private bool alignAtRender;
|
||||
private bool alignAtUpdate;
|
||||
private bool isSingleThread;
|
||||
|
||||
internal FrameUpdateTimer timer = new FrameUpdateTimer();
|
||||
private Action OnRender;
|
||||
private Action OnUpdate;
|
||||
|
||||
#region thread sync
|
||||
internal readonly SemaphoreSlim ouetrPong = new SemaphoreSlim(0, 1);
|
||||
private SemaphoreSlim ping = new SemaphoreSlim(1, 1);
|
||||
private SemaphoreSlim pong = new SemaphoreSlim(0, 1);
|
||||
internal readonly SemaphoreSlim ouetrPong = new SemaphoreSlim(0, 1);
|
||||
|
||||
/// <summary>
|
||||
/// Height of this form, represent in <see cref="int"/>
|
||||
/// </summary>
|
||||
public int Height
|
||||
{
|
||||
get => height;
|
||||
set => height = value;
|
||||
}
|
||||
#endregion
|
||||
|
||||
private Form()
|
||||
{
|
||||
@@ -59,6 +57,22 @@ namespace StgSharp.Graphics
|
||||
#endif
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Height of this form, represent in <see cref="int"/>
|
||||
/// </summary>
|
||||
public int Height
|
||||
{
|
||||
get => height;
|
||||
set => height = value;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Representing
|
||||
/// </summary>
|
||||
public bool IsDoubleRendering
|
||||
{
|
||||
get { return isSingleThread; }
|
||||
}
|
||||
/// <summary>
|
||||
/// Width of this form, represent in <see cref="int"/>
|
||||
/// </summary>
|
||||
@@ -94,9 +108,13 @@ namespace StgSharp.Graphics
|
||||
/// <param name="args"></param>
|
||||
public abstract void Init(object[] args);
|
||||
|
||||
public abstract void OnRenderFrame(object[] args);
|
||||
/// <summary>
|
||||
/// Behaviour of current form when in a render cycle.
|
||||
/// When this form
|
||||
/// </summary>
|
||||
/// <param name="args"></param>
|
||||
public abstract void Main(object[] args);
|
||||
|
||||
public abstract void OnUpdateFrame(object[] args);
|
||||
|
||||
/// <summary>
|
||||
/// Init this form and render it on screen, and respond with operation
|
||||
@@ -145,17 +163,15 @@ namespace StgSharp.Graphics
|
||||
Init((object[])args);
|
||||
}
|
||||
|
||||
|
||||
internal void InternalRenderFrame(object args)
|
||||
internal void InternalRenderFrame()
|
||||
{
|
||||
while (InternalIO.glfw.WindowShouldClose(windowID) != 0)
|
||||
{
|
||||
ping.Wait();
|
||||
try
|
||||
{
|
||||
OnRenderFrame((object[])args);
|
||||
OnRender();
|
||||
timer.WaitNextFrame();
|
||||
|
||||
pong.Release();
|
||||
}
|
||||
catch (NullReferenceException)
|
||||
@@ -166,16 +182,15 @@ namespace StgSharp.Graphics
|
||||
}
|
||||
}
|
||||
|
||||
internal void InternalUpdateFrame(object args)
|
||||
internal void InternalUpdateFrame()
|
||||
{
|
||||
while (InternalIO.glfw.WindowShouldClose(windowID) != 0)
|
||||
{
|
||||
pong.Wait();
|
||||
try
|
||||
{
|
||||
OnUpdateFrame((object[])args);
|
||||
OnUpdate();
|
||||
timer.WaitNextFrame();
|
||||
throw new Exception("Forget to reload GL apis");
|
||||
ping.Release();
|
||||
}
|
||||
catch (NullReferenceException)
|
||||
@@ -186,6 +201,26 @@ namespace StgSharp.Graphics
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Define how current form render in one frame.
|
||||
/// </summary>
|
||||
/// <param name="totalThread">
|
||||
///
|
||||
/// Please define
|
||||
/// </param>
|
||||
protected void SetRenderThreads(bool requireDoubleRendering)
|
||||
{
|
||||
switch (requireDoubleRendering)
|
||||
{
|
||||
case true:
|
||||
isSingleThread = false;
|
||||
OnUpdate = new Action(() => { });
|
||||
break;
|
||||
case false:
|
||||
isSingleThread = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
@@ -232,13 +267,14 @@ namespace StgSharp.Graphics
|
||||
{
|
||||
windowID = windowPtr;
|
||||
}
|
||||
GLonRender glRender = new GLonRender();
|
||||
GLcontext glContext = new GLcontext();
|
||||
IntPtr ptr = Marshal.AllocHGlobal(sizeof(GLcontextIO));
|
||||
contextID = (GLcontextIO*)ptr;
|
||||
*contextID = new GLcontextIO();
|
||||
InternalIO.InternalWriteLog("Successfully create a context binded to current form. " +
|
||||
$"Its ID is {(ulong)ptr}", LogType.Info);
|
||||
GLonRender glRender = new GLonRender(glContext);
|
||||
GLonUpdate glUpdate = new GLonUpdate(glContext);
|
||||
}
|
||||
InternalIO.InternalSetCurrentGLContext(windowID, (IntPtr)contextID);
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace StgSharp.Graphics
|
||||
internal VertexArray(int n)
|
||||
{
|
||||
_bufferID = new uint[n];
|
||||
GL = glFunc;
|
||||
//GL = glFunc;
|
||||
fixed (uint* id = _bufferID)
|
||||
{
|
||||
GL.GenVertexArrays(n, id);
|
||||
|
||||
@@ -17,11 +17,6 @@ namespace StgSharp.Graphics
|
||||
internal GLcontext glContext
|
||||
{
|
||||
get { return RenderBuffer.GL.api; }
|
||||
set
|
||||
{
|
||||
UpdateBuffer.GL.api = value;
|
||||
RenderBuffer.GL.api = value;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using StgSharp.Math;
|
||||
using StgSharp.Logic;
|
||||
using StgSharp.Math;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.CompilerServices;
|
||||
@@ -10,6 +11,8 @@ namespace StgSharp.Graphics
|
||||
|
||||
internal unsafe partial class GLonRender : IglFunc
|
||||
{
|
||||
FrameTimeoutException refreshSIgnal = new FrameTimeoutException();
|
||||
|
||||
internal GLonRender(GLcontext context)
|
||||
{
|
||||
api = context;
|
||||
@@ -34,12 +37,9 @@ namespace StgSharp.Graphics
|
||||
{
|
||||
throw new InvalidOperationException();
|
||||
}
|
||||
form.timer.WaitNextFrame();
|
||||
form.timer.alignSign.byte0++;
|
||||
if (form.timer.)
|
||||
{
|
||||
|
||||
}
|
||||
form.timer.WaitNextFrame();
|
||||
throw refreshSIgnal;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
|
||||
@@ -10,6 +10,9 @@ namespace StgSharp.Graphics
|
||||
{
|
||||
internal class GLonTimeout : IglFunc
|
||||
{
|
||||
FrameTimeoutException refreshSIgnal = new FrameTimeoutException();
|
||||
FrameTimeoutException signal = new FrameTimeoutException("This frame is timeout");
|
||||
|
||||
private static readonly GLonTimeout singleInstance
|
||||
= new GLonTimeout();
|
||||
|
||||
@@ -22,202 +25,202 @@ namespace StgSharp.Graphics
|
||||
|
||||
void IglFunc.ActiveTexture(uint type)
|
||||
{
|
||||
throw new FrameTimeoutException();
|
||||
throw signal;
|
||||
}
|
||||
|
||||
void IglFunc.AfterAlign(Form form, Action action)
|
||||
{
|
||||
throw new FrameTimeoutException();
|
||||
throw signal;
|
||||
}
|
||||
|
||||
void IglFunc.AlignFrame(Form form)
|
||||
{
|
||||
throw new FrameTimeoutException();
|
||||
throw signal;
|
||||
}
|
||||
|
||||
void IglFunc.AttachShader(uint program, uint shader)
|
||||
{
|
||||
throw new FrameTimeoutException();
|
||||
throw signal;
|
||||
}
|
||||
|
||||
void IglFunc.BindBuffer(BufferType bufferType, uint index)
|
||||
{
|
||||
throw new FrameTimeoutException();
|
||||
throw signal;
|
||||
}
|
||||
|
||||
void IglFunc.BindTexture(uint type, uint texture)
|
||||
{
|
||||
throw new FrameTimeoutException();
|
||||
throw signal;
|
||||
}
|
||||
|
||||
void IglFunc.BindVertexArray(uint index)
|
||||
{
|
||||
throw new FrameTimeoutException();
|
||||
throw signal;
|
||||
}
|
||||
|
||||
void IglFunc.Clear(MaskBufferBit mask)
|
||||
{
|
||||
throw new FrameTimeoutException();
|
||||
throw signal;
|
||||
}
|
||||
|
||||
void IglFunc.ClearColor(float R, float G, float B, float A)
|
||||
{
|
||||
throw new FrameTimeoutException();
|
||||
throw signal;
|
||||
}
|
||||
|
||||
void IglFunc.ClearGraphicError()
|
||||
{
|
||||
throw new FrameTimeoutException();
|
||||
throw signal;
|
||||
}
|
||||
|
||||
uint IglFunc.CompileShader(string shaderCode, ShaderType shaderType)
|
||||
{
|
||||
throw new FrameTimeoutException();
|
||||
throw signal;
|
||||
}
|
||||
|
||||
uint IglFunc.CreateProgram()
|
||||
{
|
||||
throw new FrameTimeoutException();
|
||||
throw signal;
|
||||
}
|
||||
|
||||
IntPtr IglFunc.CreateWindowHandle(int width, int height, string tittle, IntPtr monitor, Form share)
|
||||
{
|
||||
throw new FrameTimeoutException();
|
||||
throw signal;
|
||||
}
|
||||
|
||||
uint IglFunc.CreatGraphicProgram()
|
||||
{
|
||||
throw new FrameTimeoutException();
|
||||
throw signal;
|
||||
}
|
||||
|
||||
unsafe void IglFunc.DeleteBuffers(int count, uint* ptr)
|
||||
{
|
||||
throw new FrameTimeoutException();
|
||||
throw signal;
|
||||
}
|
||||
|
||||
unsafe void IglFunc.DeleteVertexArrays(int count, uint* ptr)
|
||||
{
|
||||
throw new FrameTimeoutException();
|
||||
throw signal;
|
||||
}
|
||||
|
||||
void IglFunc.DrawElements(GepmetryType mode, int count, Type type, IntPtr ptr)
|
||||
{
|
||||
throw new FrameTimeoutException();
|
||||
throw signal;
|
||||
}
|
||||
|
||||
unsafe void IglFunc.GenBuffers(int count, uint* ptr)
|
||||
{
|
||||
throw new FrameTimeoutException();
|
||||
throw signal;
|
||||
}
|
||||
|
||||
unsafe void IglFunc.GenTextures(int count, uint* ptr)
|
||||
{
|
||||
throw new FrameTimeoutException();
|
||||
throw signal;
|
||||
}
|
||||
|
||||
unsafe void IglFunc.GenVertexArrays(int count, uint* ptr)
|
||||
{
|
||||
throw new FrameTimeoutException();
|
||||
throw signal;
|
||||
}
|
||||
|
||||
void IglFunc.GetGraphicError()
|
||||
{
|
||||
throw new FrameTimeoutException();
|
||||
throw signal;
|
||||
}
|
||||
|
||||
unsafe int IglFunc.GetUniformLocation(uint program, byte* ptr)
|
||||
{
|
||||
throw new FrameTimeoutException();
|
||||
throw signal;
|
||||
}
|
||||
|
||||
bool IglFunc.GetWindowShouldClose(Form form)
|
||||
{
|
||||
throw new FrameTimeoutException();
|
||||
throw signal;
|
||||
}
|
||||
|
||||
void IglFunc.MakeContexCurrent(Form form)
|
||||
{
|
||||
throw new FrameTimeoutException();
|
||||
throw signal;
|
||||
}
|
||||
|
||||
void IglFunc.SetBufferData<T>(BufferType bufferType, T bufferData, BufferUsage usage)
|
||||
{
|
||||
throw new FrameTimeoutException();
|
||||
throw signal;
|
||||
}
|
||||
|
||||
void IglFunc.SetBufferData<T>(BufferType bufferType, T[] bufferArray, BufferUsage usage)
|
||||
{
|
||||
throw new FrameTimeoutException();
|
||||
throw signal;
|
||||
}
|
||||
|
||||
void IglFunc.SetFrameBufferSizeCallback(IntPtr id, FrameBufferSizeHandler handler)
|
||||
{
|
||||
throw new FrameTimeoutException();
|
||||
throw signal;
|
||||
}
|
||||
|
||||
void IglFunc.SetValue(Uniform<float, float, float, float> uniform, float v0, float v1, float v2, float v3)
|
||||
{
|
||||
throw new FrameTimeoutException();
|
||||
throw signal;
|
||||
}
|
||||
|
||||
void IglFunc.SetValue(Uniform<float, float, float, float> uniform, Vec4d vec)
|
||||
{
|
||||
throw new FrameTimeoutException();
|
||||
throw signal;
|
||||
}
|
||||
|
||||
void IglFunc.SetValue(Uniform<float, float, float> uniform, float v0, float v1, float v2)
|
||||
{
|
||||
throw new FrameTimeoutException();
|
||||
throw signal;
|
||||
}
|
||||
|
||||
void IglFunc.SetValue(Uniform<float, float> uniform, float v0, float v1)
|
||||
{
|
||||
throw new FrameTimeoutException();
|
||||
throw signal;
|
||||
}
|
||||
|
||||
void IglFunc.SetValue(Uniform<float> uniform, float v0)
|
||||
{
|
||||
throw new FrameTimeoutException();
|
||||
throw signal;
|
||||
}
|
||||
|
||||
void IglFunc.SetValue(Uniform<int> uniform, int i0)
|
||||
{
|
||||
throw new FrameTimeoutException();
|
||||
throw signal;
|
||||
}
|
||||
|
||||
void IglFunc.SetValue(Uniform<Vec4d> uniform, Vec4d vec)
|
||||
{
|
||||
throw new FrameTimeoutException();
|
||||
throw signal;
|
||||
}
|
||||
|
||||
void IglFunc.SetVertexAttribute(uint index, int size, Type t, bool normalized, int stride, int pointer)
|
||||
{
|
||||
throw new FrameTimeoutException();
|
||||
throw signal;
|
||||
}
|
||||
|
||||
void IglFunc.SwapBuffers(Form form)
|
||||
{
|
||||
throw new FrameTimeoutException();
|
||||
throw signal;
|
||||
}
|
||||
|
||||
unsafe void IglFunc.TextureImage2d(uint target, int level, uint internalformat, int width, int height, uint format, uint type, void* pixels)
|
||||
{
|
||||
throw new FrameTimeoutException();
|
||||
throw signal;
|
||||
}
|
||||
|
||||
void IglFunc.TextureParameter(uint target, uint pname, int param)
|
||||
{
|
||||
throw new FrameTimeoutException();
|
||||
throw signal;
|
||||
}
|
||||
|
||||
void IglFunc.UseProgram(uint program)
|
||||
{
|
||||
throw new FrameTimeoutException();
|
||||
throw signal;
|
||||
}
|
||||
|
||||
void IglFunc.Viewport(int x, int y, int width, int height)
|
||||
{
|
||||
throw new FrameTimeoutException();
|
||||
throw signal;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using StgSharp.Math;
|
||||
using StgSharp.Logic;
|
||||
using StgSharp.Math;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
@@ -11,8 +12,13 @@ namespace StgSharp.Graphics
|
||||
{
|
||||
internal partial class GLonUpdate : IglFunc
|
||||
{
|
||||
internal GLcontext api;
|
||||
private FrameTimeoutException refreshSignal = new();
|
||||
internal readonly GLcontext api;
|
||||
|
||||
internal GLonUpdate(GLcontext context)
|
||||
{
|
||||
api = context;
|
||||
}
|
||||
|
||||
void IglFunc.ActiveTexture(uint type)
|
||||
{
|
||||
@@ -20,6 +26,22 @@ namespace StgSharp.Graphics
|
||||
}
|
||||
|
||||
|
||||
void IglFunc.AfterAlign(Form form, Action action)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
void IglFunc.AlignFrame(Form form)
|
||||
{
|
||||
if (form.timer.alignSign.byte0 > 0)
|
||||
{
|
||||
throw new InvalidOperationException();
|
||||
}
|
||||
form.timer.alignSign.byte0++;
|
||||
form.timer.WaitNextFrame();
|
||||
throw refreshSignal;
|
||||
}
|
||||
|
||||
void IglFunc.AttachShader(uint program, uint shader)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
|
||||
@@ -0,0 +1,357 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StgSharp.Logic
|
||||
{
|
||||
[StructLayout(LayoutKind.Explicit, Size = 8)]
|
||||
internal struct LogSeperator
|
||||
{
|
||||
[FieldOffset(0)] public ulong all;
|
||||
[FieldOffset(0)] public long all_s;
|
||||
|
||||
[FieldOffset(0)] public uint low;
|
||||
[FieldOffset(4)] public uint high;
|
||||
|
||||
[FieldOffset(0)] public int low_s;
|
||||
[FieldOffset(4)] public int high_s;
|
||||
|
||||
public LogSeperator(uint high, uint low)
|
||||
{
|
||||
this.high = high;
|
||||
this.low = low;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A linear data structure with dynamic length.
|
||||
/// It contains a <see cref="List{T}"/> of <see cref="Array"/>,
|
||||
/// each <see cref="Array"/> is twice longer than the former one.
|
||||
/// </summary>
|
||||
/// <typeparam name="T"></typeparam>
|
||||
public class DynamicArrayList<T>
|
||||
{
|
||||
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()
|
||||
{
|
||||
arrayIndexList = [new T[1]];
|
||||
length = 0;
|
||||
unusedMainIndex = new Queue<int>();
|
||||
unusedSubIndex = new Queue<int>();
|
||||
unusedMainIndex.Enqueue(0);
|
||||
unusedSubIndex.Enqueue(0);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Init a <see cref="DynamicArrayList{T}"/> with a certain amount of elements prepared.
|
||||
/// </summary>
|
||||
/// <param name="count">Amount of elements to be prepared.</param>
|
||||
public DynamicArrayList(int count)
|
||||
{
|
||||
arrayIndexList = new List<T[]>();
|
||||
length = count;
|
||||
unusedMainIndex = new();
|
||||
unusedSubIndex = new();
|
||||
|
||||
SeprateIndex(count);
|
||||
int subcount = 1;
|
||||
for (int i = 0; i < indexpair.high_s; i++)
|
||||
{
|
||||
arrayIndexList.Add(new T[count]);
|
||||
for (int j = 0; j < subcount; j++)
|
||||
{
|
||||
unusedMainIndex.Enqueue(i);
|
||||
unusedSubIndex.Enqueue(j);
|
||||
}
|
||||
count >>= 1;
|
||||
}
|
||||
if (indexpair.low_s != 0)
|
||||
{
|
||||
arrayIndexList.Add(new T[1 >> indexpair.high_s]);
|
||||
for (int j = 0; j < indexpair.high_s; j++)
|
||||
{
|
||||
unusedMainIndex.Enqueue(indexpair.high_s);
|
||||
unusedSubIndex.Enqueue(j);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
internal T this[long index]
|
||||
{
|
||||
get
|
||||
{
|
||||
indexpair.all_s = index;
|
||||
if (
|
||||
indexpair.low_s > lastSub ||
|
||||
indexpair.high_s > lastMain ||
|
||||
indexpair.low_s < 0 ||
|
||||
indexpair.high_s < 0)
|
||||
{
|
||||
throw new IndexOutOfRangeException();
|
||||
}
|
||||
return arrayIndexList[indexpair.high_s][indexpair.low_s];
|
||||
}
|
||||
set
|
||||
{
|
||||
indexpair.all_s = index;
|
||||
if (
|
||||
indexpair.low_s > lastSub ||
|
||||
indexpair.high_s > lastMain ||
|
||||
indexpair.low_s < 0 ||
|
||||
indexpair.high_s < 0)
|
||||
{
|
||||
throw new IndexOutOfRangeException();
|
||||
}
|
||||
arrayIndexList[indexpair.high_s][indexpair.low_s] = value;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public T this[int index]
|
||||
{
|
||||
get
|
||||
{
|
||||
if (index + 1 > length || index < 0)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException("index");
|
||||
}
|
||||
SeprateIndex(index);
|
||||
return arrayIndexList[indexpair.high_s][indexpair.low_s];
|
||||
}
|
||||
set
|
||||
{
|
||||
if (index + 1 > length || index < 0)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException("index");
|
||||
}
|
||||
SeprateIndex(index);
|
||||
arrayIndexList[indexpair.high_s][indexpair.low_s] = value;
|
||||
}
|
||||
}
|
||||
|
||||
public T this[uint index]
|
||||
{
|
||||
get
|
||||
{
|
||||
if (index + 1 > length || index < 0)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException("index");
|
||||
}
|
||||
SeprateIndex(index);
|
||||
return arrayIndexList[indexpair.high_s][indexpair.low_s];
|
||||
}
|
||||
set
|
||||
{
|
||||
if (index + 1 > length || index < 0)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException("index");
|
||||
}
|
||||
SeprateIndex(index);
|
||||
arrayIndexList[indexpair.high_s][indexpair.low_s] = value;
|
||||
}
|
||||
}
|
||||
|
||||
public int Count => length;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Length of this <see cref="DynamicArrayList{T}"/>
|
||||
/// </summary>
|
||||
public int Length
|
||||
{
|
||||
get { return length; }
|
||||
}
|
||||
|
||||
public int Add(T item)
|
||||
{
|
||||
// this list is tite, all item is side by side
|
||||
if (unusedMainIndex.Count == 0)
|
||||
{
|
||||
// no extra space, a new sub array is needed
|
||||
if (lastSub + 1 == 1 << lastMain)
|
||||
{
|
||||
subLength <<= 1;
|
||||
arrayIndexList.Add(new T[subLength]);
|
||||
lastMain++;
|
||||
lastSub = 0;
|
||||
arrayIndexList[lastMain][0] = item;
|
||||
|
||||
length++;
|
||||
return length - 1;
|
||||
|
||||
}
|
||||
|
||||
length++;
|
||||
lastSub++;
|
||||
arrayIndexList[lastMain][lastSub] = item;
|
||||
return length - 1;
|
||||
}
|
||||
|
||||
length++;
|
||||
int main = unusedMainIndex.Dequeue();
|
||||
int sub = unusedSubIndex.Dequeue();
|
||||
arrayIndexList[main][sub] = item;
|
||||
|
||||
return sub + (1 << main);
|
||||
}
|
||||
|
||||
public void Clear()
|
||||
{
|
||||
arrayIndexList.Clear();
|
||||
unusedMainIndex.Clear();
|
||||
unusedSubIndex.Clear();
|
||||
length = 0;
|
||||
}
|
||||
|
||||
public bool Contains(T item)
|
||||
{
|
||||
foreach (T[] list in arrayIndexList)
|
||||
{
|
||||
foreach (T i in list)
|
||||
{
|
||||
if (i.Equals(item))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public int IndexOf(T item)
|
||||
{
|
||||
int index = 1;
|
||||
foreach (T[] list in arrayIndexList)
|
||||
{
|
||||
int subindex = 0;
|
||||
foreach (T i in list)
|
||||
{
|
||||
if (i.Equals(item))
|
||||
{
|
||||
return index + subindex - 1;
|
||||
}
|
||||
subindex++;
|
||||
}
|
||||
index <<= 1;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
public bool Remove(T item)
|
||||
{
|
||||
int index = 0;
|
||||
foreach (T[] list in arrayIndexList)
|
||||
{
|
||||
int subindex = 0;
|
||||
foreach (T i in list)
|
||||
{
|
||||
if (i.Equals(item))
|
||||
{
|
||||
list[subindex] = default;
|
||||
if (subindex == lastSub && index == lastMain)
|
||||
{
|
||||
if (lastSub == 0)
|
||||
{
|
||||
lastMain = lastMain == 0 ? 0 : lastMain - 1;
|
||||
lastSub = arrayIndexList[lastMain].Length - 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
lastSub--;
|
||||
}
|
||||
length--;
|
||||
return true;
|
||||
}
|
||||
unusedMainIndex.Enqueue(index);
|
||||
unusedSubIndex.Enqueue(subindex);
|
||||
return true;
|
||||
}
|
||||
subindex++;
|
||||
}
|
||||
index++;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public void RemoveAt(int index)
|
||||
{
|
||||
if (index > length || index < 0)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException(nameof(index));
|
||||
}
|
||||
SeprateIndex(index);
|
||||
arrayIndexList[indexpair.high_s][indexpair.low] = default;
|
||||
|
||||
//the last element was removed.
|
||||
if (index + 1 == length)
|
||||
{
|
||||
//the last array can be disposed
|
||||
if (lastSub == 0)
|
||||
{
|
||||
arrayIndexList.RemoveAt(lastMain);
|
||||
lastMain--;
|
||||
lastSub = (length / 2) - 1;
|
||||
}
|
||||
length--;
|
||||
return;
|
||||
}
|
||||
|
||||
unusedMainIndex.Enqueue(indexpair.high_s);
|
||||
unusedSubIndex.Enqueue(indexpair.low_s);
|
||||
|
||||
}
|
||||
|
||||
public void ShowStructure()
|
||||
{
|
||||
foreach (T[] l in arrayIndexList)
|
||||
{
|
||||
foreach (T item in l)
|
||||
{
|
||||
Console.Write($"{item}\t");
|
||||
}
|
||||
Console.Write("\n\n");
|
||||
}
|
||||
}
|
||||
|
||||
private void SeprateIndex(uint ulongIndex)
|
||||
{
|
||||
indexpair.high = ulongIndex;
|
||||
int mainindex = 0;
|
||||
while (indexpair.high > 1)
|
||||
{
|
||||
indexpair.all >>= 1;
|
||||
mainindex++;
|
||||
}
|
||||
indexpair.high_s = mainindex;
|
||||
indexpair.low >>= (int)(32 - mainindex);
|
||||
}
|
||||
|
||||
private void SeprateIndex(int longIndex)
|
||||
{
|
||||
indexpair.high_s = longIndex;
|
||||
int mainindex = 0;
|
||||
while (indexpair.high > 1)
|
||||
{
|
||||
indexpair.all >>= 1;
|
||||
mainindex++;
|
||||
}
|
||||
indexpair.high_s = mainindex;
|
||||
indexpair.low >>= (int)(32 - mainindex);
|
||||
}
|
||||
}
|
||||
}
|
||||
Binary file not shown.
@@ -29,22 +29,43 @@
|
||||
Height of this form, represent in <see cref="T:System.Int32"/>
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:StgSharp.Graphics.Form.IsDoubleRendering">
|
||||
<summary>
|
||||
Representing
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:StgSharp.Graphics.Form.Size">
|
||||
<summary>
|
||||
Width of this form, represent in <see cref="T:System.Int32"/>
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:StgSharp.Graphics.Form.GL">
|
||||
<member name="M:StgSharp.Graphics.Form.Init(System.Object[])">
|
||||
<summary>
|
||||
A set of methods providing support for all OpenGL
|
||||
APIs and other methods depend on OpenGL.
|
||||
Necessary operation to init this form.
|
||||
</summary>
|
||||
<param name="args"></param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.Form.Main(System.Object[])">
|
||||
<summary>
|
||||
Behaviour of current form when in a render cycle.
|
||||
When this form
|
||||
</summary>
|
||||
<param name="args"></param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.Form.Show(System.Object[])">
|
||||
<summary>
|
||||
Init this form and render it on screen, and respond with operation
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.Form.SetRenderThreads(System.Boolean)">
|
||||
<summary>
|
||||
Define how current form render in one frame.
|
||||
</summary>
|
||||
<param name="totalThread">
|
||||
|
||||
Please define
|
||||
</param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.Form.InitForm(System.Int32,System.Int32,System.String,System.IntPtr,StgSharp.Graphics.Form)">
|
||||
<summary>
|
||||
Constructor of a Form, creats an instance of a form and
|
||||
@@ -94,11 +115,6 @@
|
||||
Maximum size of current form. In form of a <see cref="T:StgSharp.Math.Vec2d"/> of (width,height)
|
||||
</param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.Form.BindToPlatform">
|
||||
<summary>
|
||||
Bind this form to StgSharp platform.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.Form.Texture.LoadTexture(System.Int32,System.String,StgSharp.Graphics.ImageLoader)">
|
||||
<summary>
|
||||
|
||||
@@ -107,29 +123,6 @@
|
||||
<param name="index"></param>
|
||||
<param name="loader"></param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.Form.VertexBuffer.Unbind">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.Form.VertexBuffer.SetValue``1(System.Int32,``0,StgSharp.Graphics.BufferUsage)">
|
||||
<summary>
|
||||
Set data to current vertex buffer object
|
||||
</summary>
|
||||
<typeparam name="T">Type of bufferData</typeparam>
|
||||
<param name="index">Index to find certain VBO in this instance</param>
|
||||
<param name="bufferData">Data to write in</param>
|
||||
<param name="usage">How OpenGL use these data, defined by <see cref="T:StgSharp.Graphics.BufferUsage"/></param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.Form.VertexBuffer.SetValueArray``1(System.Int32,``0[],StgSharp.Graphics.BufferUsage)">
|
||||
<summary>
|
||||
Set data to current vertex buffer object
|
||||
</summary>
|
||||
<typeparam name="T">Type of bufferData</typeparam>
|
||||
<param name="index">Index to find certain VBO in this instance</param>
|
||||
<param name="bufferArray">A array of data to write in</param>
|
||||
<param name="usage">How OpenGL use these data, defined by <see cref="T:StgSharp.Graphics.BufferUsage"/></param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.Form.CreateShader">
|
||||
<summary>
|
||||
Create an instance of <see cref="T:StgSharp.Graphics.Form.Shader"/> program
|
||||
@@ -193,6 +186,34 @@
|
||||
</summary>
|
||||
<param name="timer"><see cref="T:StgSharp.Graphics.FrameTimer"/> to be converted</param>
|
||||
</member>
|
||||
<member name="T:StgSharp.Graphics.IBufferObject">
|
||||
<summary>
|
||||
Interface of all kinds OpenGL buffer onjects
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.VertexBuffer.Unbind">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.VertexBuffer.SetValue``1(System.Int32,``0,StgSharp.Graphics.BufferUsage)">
|
||||
<summary>
|
||||
Set data to current vertex buffer object
|
||||
</summary>
|
||||
<typeparam name="T">Type of bufferData</typeparam>
|
||||
<param name="index">Index to find certain VBO in this instance</param>
|
||||
<param name="bufferData">Data to write in</param>
|
||||
<param name="usage">How OpenGL use these data, defined by <see cref="T:StgSharp.Graphics.BufferUsage"/></param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.VertexBuffer.SetValueArray``1(System.Int32,``0[],StgSharp.Graphics.BufferUsage)">
|
||||
<summary>
|
||||
Set data to current vertex buffer object
|
||||
</summary>
|
||||
<typeparam name="T">Type of bufferData</typeparam>
|
||||
<param name="index">Index to find certain VBO in this instance</param>
|
||||
<param name="bufferArray">A array of data to write in</param>
|
||||
<param name="usage">How OpenGL use these data, defined by <see cref="T:StgSharp.Graphics.BufferUsage"/></param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.glManager.LoadGLapi(StgSharp.Graphics.Form,StgSharp.Graphics.GLfuncLoader)">
|
||||
<summary>
|
||||
Load all aupportable OpenGL APIs and bind them to given <see cref="T:StgSharp.Graphics.Form"/> context.
|
||||
@@ -269,6 +290,34 @@
|
||||
<param name="uniform">The <see cref="T:StgSharp.Graphics.Uniform`1"/> target</param>
|
||||
<param name="vec">A <see cref="T:StgSharp.Math.Vec4d"/> value of the uniform </param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.IglFunc.AlignFrame(StgSharp.Graphics.Form)">
|
||||
<summary>
|
||||
Align a sets of code to frame update of a <see cref="T:StgSharp.Graphics.Form"/>.
|
||||
Usually, a call of <see cref="M:StgSharp.Graphics.IglFunc.AfterAlign(StgSharp.Graphics.Form,System.Action)"/> is required.
|
||||
This method is used as sigle thread method. If more than one
|
||||
alignment is requested, a <see cref="T:System.InvalidOperationException"/> will throw.
|
||||
</summary>
|
||||
<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.AfterAlign(StgSharp.Graphics.Form,System.Action)">
|
||||
<summary>
|
||||
Operation after alignment by calling <see cref="M:StgSharp.Graphics.IglFunc.AlignFrame(StgSharp.Graphics.Form)"/>.
|
||||
No calling of this method is acceptable, but it will bring the risk
|
||||
of that relevant code will not run if it is interrupted by frame overtime.
|
||||
Please call this method immediately after calling <see cref="M:StgSharp.Graphics.IglFunc.AlignFrame(StgSharp.Graphics.Form)"/>,
|
||||
too early or sonner may cause <see cref="T:System.InvalidOperationException"/>.
|
||||
</summary>
|
||||
<param name="form">The form used as frame update benchmark.</param>
|
||||
<param name="action">Operation after frame update alignment.</param>
|
||||
<exception cref="T:System.InvalidOperationException">The action binded to a wrong alignment.</exception>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.IglFunc.ActiveTexture(System.UInt32)">
|
||||
<summary>
|
||||
Same function as OpenGL api glActiveTexture
|
||||
</summary>
|
||||
<param name="type">type of texture to activate</param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.IglFunc.AttachShader(System.UInt32,System.UInt32)">
|
||||
<summary>
|
||||
Same fucntion as OpenGL api glAttachShader
|
||||
@@ -283,6 +332,13 @@
|
||||
<param name="bufferType"></param>
|
||||
<param name="index"></param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.IglFunc.BindTexture(System.UInt32,System.UInt32)">
|
||||
<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.UInt32)">
|
||||
<summary>
|
||||
Same function as OpenGL api, glBindVertexArray
|
||||
@@ -354,6 +410,13 @@
|
||||
<param name="count"></param>
|
||||
<param name="ptr"></param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.IglFunc.GenTextures(System.Int32,System.UInt32*)">
|
||||
<summary>
|
||||
Same fucnction as OpenGL api glGenTextures.
|
||||
</summary>
|
||||
<param name="count">amount of textures to generate</param>
|
||||
<param name="ptr">pointer to texture signs' array</param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.IglFunc.GenVertexArrays(System.Int32,System.UInt32*)">
|
||||
<summary>
|
||||
Same fucntion as OpenGL api, glGenVertexArray
|
||||
@@ -369,6 +432,12 @@
|
||||
<param name="ptr">Pointer to byte array of name <see cref="T:System.String"/> of the uniform </param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.IglFunc.MakeContexCurrent(StgSharp.Graphics.Form)">
|
||||
<summary>
|
||||
Make the OpenGL context of a vertain <see cref="T:StgSharp.Graphics.Form"/> as the activated OpenGL context.
|
||||
</summary>
|
||||
<param name="form"></param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.IglFunc.SetFrameBufferSizeCallback(System.IntPtr,StgSharp.Graphics.FrameBufferSizeHandler)">
|
||||
<summary>
|
||||
sets the framebuffer resize callback of the specified <see cref="T:StgSharp.Graphics.Form"/>,
|
||||
@@ -415,26 +484,6 @@
|
||||
</summary>
|
||||
<param name="program">Sign of program to be used</param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.IglFunc.GenTextures(System.Int32,System.UInt32*)">
|
||||
<summary>
|
||||
Same fucnction as OpenGL api glGenTextures.
|
||||
</summary>
|
||||
<param name="count">amount of textures to generate</param>
|
||||
<param name="ptr">pointer to texture signs' array</param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.IglFunc.BindTexture(System.UInt32,System.UInt32)">
|
||||
<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.ActiveTexture(System.UInt32)">
|
||||
<summary>
|
||||
Same function as OpenGL api glActiveTexture
|
||||
</summary>
|
||||
<param name="type">type of texture to activate</param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.IglFunc.Viewport(System.Int32,System.Int32,System.Int32,System.Int32)">
|
||||
<summary>
|
||||
Same function as the OpenGL api, glViewPort
|
||||
@@ -578,6 +627,47 @@
|
||||
A square
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:StgSharp.Logic.DynamicArrayList`1">
|
||||
<summary>
|
||||
A linear data structure with dynamic length.
|
||||
It contains a <see cref="T:System.Collections.Generic.List`1"/> of <see cref="T:System.Array"/>,
|
||||
each <see cref="T:System.Array"/> is twice longer than the former one.
|
||||
</summary>
|
||||
<typeparam name="T"></typeparam>
|
||||
</member>
|
||||
<member name="M:StgSharp.Logic.DynamicArrayList`1.#ctor(System.Int32)">
|
||||
<summary>
|
||||
Init a <see cref="T:StgSharp.Logic.DynamicArrayList`1"/> with a certain amount of elements prepared.
|
||||
</summary>
|
||||
<param name="count">Amount of elements to be prepared.</param>
|
||||
</member>
|
||||
<member name="P:StgSharp.Logic.DynamicArrayList`1.Length">
|
||||
<summary>
|
||||
Length of this <see cref="T:StgSharp.Logic.DynamicArrayList`1"/>
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:StgSharp.Logic.Bool2">
|
||||
<summary>
|
||||
A pair of <see cref="T:System.Boolean"/> value
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:StgSharp.Logic.Bool2.Value">
|
||||
<summary>
|
||||
A <see cref="T:System.UInt16"/> value.
|
||||
The lower byte is <see cref="F:StgSharp.Logic.Bool2.bool0"/>,
|
||||
and higher byte is <see cref="F:StgSharp.Logic.Bool2.bool1"/>.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:StgSharp.Logic.Bool2.bool0">
|
||||
<summary>
|
||||
The first <see cref="T:System.Boolean"/> value.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:StgSharp.Logic.Bool2.bool1">
|
||||
<summary>
|
||||
The second <see cref="T:System.Boolean"/> value.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:StgSharp.LinkedList`1.IsEmpty">
|
||||
<summary>
|
||||
Whether this linked list has no members or not.
|
||||
|
||||
@@ -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+8b14599233aebdea7b06c2073fd92aa31800164d")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+659420aa6c98d2cef990b65d1c5999c6968f3699")]
|
||||
[assembly: System.Reflection.AssemblyProductAttribute("StgSharp")]
|
||||
[assembly: System.Reflection.AssemblyTitleAttribute("StgSharp")]
|
||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||
|
||||
@@ -1 +1 @@
|
||||
d5b3ffe3df8161f7f0a9fcb263e3044aa5365c6f966b40447a4af1ba4b298326
|
||||
bcf13fcec07855c69d564591ac032f02d17b49be8f336cc2ec1ec87e480fffe2
|
||||
|
||||
@@ -1 +1 @@
|
||||
7facd19ab2824e9daa978ab4f59ebc7715a7a95082411bf4260d938ff9ce36fd
|
||||
702ac4d4fbaabeae74bc8b3fa2292445ac720207ccc73052ea62c69d2a449e40
|
||||
|
||||
Binary file not shown.
@@ -1 +1 @@
|
||||
{"documents":{"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\*":"https://raw.githubusercontent.com/Nitload-NSI/CCD_Github/8b14599233aebdea7b06c2073fd92aa31800164d/*"}}
|
||||
{"documents":{"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\*":"https://raw.githubusercontent.com/Nitload-NSI/CCD_Github/659420aa6c98d2cef990b65d1c5999c6968f3699/*"}}
|
||||
@@ -29,22 +29,43 @@
|
||||
Height of this form, represent in <see cref="T:System.Int32"/>
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:StgSharp.Graphics.Form.IsDoubleRendering">
|
||||
<summary>
|
||||
Representing
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:StgSharp.Graphics.Form.Size">
|
||||
<summary>
|
||||
Width of this form, represent in <see cref="T:System.Int32"/>
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:StgSharp.Graphics.Form.GL">
|
||||
<member name="M:StgSharp.Graphics.Form.Init(System.Object[])">
|
||||
<summary>
|
||||
A set of methods providing support for all OpenGL
|
||||
APIs and other methods depend on OpenGL.
|
||||
Necessary operation to init this form.
|
||||
</summary>
|
||||
<param name="args"></param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.Form.Main(System.Object[])">
|
||||
<summary>
|
||||
Behaviour of current form when in a render cycle.
|
||||
When this form
|
||||
</summary>
|
||||
<param name="args"></param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.Form.Show(System.Object[])">
|
||||
<summary>
|
||||
Init this form and render it on screen, and respond with operation
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.Form.SetRenderThreads(System.Boolean)">
|
||||
<summary>
|
||||
Define how current form render in one frame.
|
||||
</summary>
|
||||
<param name="totalThread">
|
||||
|
||||
Please define
|
||||
</param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.Form.InitForm(System.Int32,System.Int32,System.String,System.IntPtr,StgSharp.Graphics.Form)">
|
||||
<summary>
|
||||
Constructor of a Form, creats an instance of a form and
|
||||
@@ -94,11 +115,6 @@
|
||||
Maximum size of current form. In form of a <see cref="T:StgSharp.Math.Vec2d"/> of (width,height)
|
||||
</param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.Form.BindToPlatform">
|
||||
<summary>
|
||||
Bind this form to StgSharp platform.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.Form.Texture.LoadTexture(System.Int32,System.String,StgSharp.Graphics.ImageLoader)">
|
||||
<summary>
|
||||
|
||||
@@ -107,29 +123,6 @@
|
||||
<param name="index"></param>
|
||||
<param name="loader"></param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.Form.VertexBuffer.Unbind">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.Form.VertexBuffer.SetValue``1(System.Int32,``0,StgSharp.Graphics.BufferUsage)">
|
||||
<summary>
|
||||
Set data to current vertex buffer object
|
||||
</summary>
|
||||
<typeparam name="T">Type of bufferData</typeparam>
|
||||
<param name="index">Index to find certain VBO in this instance</param>
|
||||
<param name="bufferData">Data to write in</param>
|
||||
<param name="usage">How OpenGL use these data, defined by <see cref="T:StgSharp.Graphics.BufferUsage"/></param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.Form.VertexBuffer.SetValueArray``1(System.Int32,``0[],StgSharp.Graphics.BufferUsage)">
|
||||
<summary>
|
||||
Set data to current vertex buffer object
|
||||
</summary>
|
||||
<typeparam name="T">Type of bufferData</typeparam>
|
||||
<param name="index">Index to find certain VBO in this instance</param>
|
||||
<param name="bufferArray">A array of data to write in</param>
|
||||
<param name="usage">How OpenGL use these data, defined by <see cref="T:StgSharp.Graphics.BufferUsage"/></param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.Form.CreateShader">
|
||||
<summary>
|
||||
Create an instance of <see cref="T:StgSharp.Graphics.Form.Shader"/> program
|
||||
@@ -193,6 +186,34 @@
|
||||
</summary>
|
||||
<param name="timer"><see cref="T:StgSharp.Graphics.FrameTimer"/> to be converted</param>
|
||||
</member>
|
||||
<member name="T:StgSharp.Graphics.IBufferObject">
|
||||
<summary>
|
||||
Interface of all kinds OpenGL buffer onjects
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.VertexBuffer.Unbind">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.VertexBuffer.SetValue``1(System.Int32,``0,StgSharp.Graphics.BufferUsage)">
|
||||
<summary>
|
||||
Set data to current vertex buffer object
|
||||
</summary>
|
||||
<typeparam name="T">Type of bufferData</typeparam>
|
||||
<param name="index">Index to find certain VBO in this instance</param>
|
||||
<param name="bufferData">Data to write in</param>
|
||||
<param name="usage">How OpenGL use these data, defined by <see cref="T:StgSharp.Graphics.BufferUsage"/></param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.VertexBuffer.SetValueArray``1(System.Int32,``0[],StgSharp.Graphics.BufferUsage)">
|
||||
<summary>
|
||||
Set data to current vertex buffer object
|
||||
</summary>
|
||||
<typeparam name="T">Type of bufferData</typeparam>
|
||||
<param name="index">Index to find certain VBO in this instance</param>
|
||||
<param name="bufferArray">A array of data to write in</param>
|
||||
<param name="usage">How OpenGL use these data, defined by <see cref="T:StgSharp.Graphics.BufferUsage"/></param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.glManager.LoadGLapi(StgSharp.Graphics.Form,StgSharp.Graphics.GLfuncLoader)">
|
||||
<summary>
|
||||
Load all aupportable OpenGL APIs and bind them to given <see cref="T:StgSharp.Graphics.Form"/> context.
|
||||
@@ -269,6 +290,34 @@
|
||||
<param name="uniform">The <see cref="T:StgSharp.Graphics.Uniform`1"/> target</param>
|
||||
<param name="vec">A <see cref="T:StgSharp.Math.Vec4d"/> value of the uniform </param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.IglFunc.AlignFrame(StgSharp.Graphics.Form)">
|
||||
<summary>
|
||||
Align a sets of code to frame update of a <see cref="T:StgSharp.Graphics.Form"/>.
|
||||
Usually, a call of <see cref="M:StgSharp.Graphics.IglFunc.AfterAlign(StgSharp.Graphics.Form,System.Action)"/> is required.
|
||||
This method is used as sigle thread method. If more than one
|
||||
alignment is requested, a <see cref="T:System.InvalidOperationException"/> will throw.
|
||||
</summary>
|
||||
<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.AfterAlign(StgSharp.Graphics.Form,System.Action)">
|
||||
<summary>
|
||||
Operation after alignment by calling <see cref="M:StgSharp.Graphics.IglFunc.AlignFrame(StgSharp.Graphics.Form)"/>.
|
||||
No calling of this method is acceptable, but it will bring the risk
|
||||
of that relevant code will not run if it is interrupted by frame overtime.
|
||||
Please call this method immediately after calling <see cref="M:StgSharp.Graphics.IglFunc.AlignFrame(StgSharp.Graphics.Form)"/>,
|
||||
too early or sonner may cause <see cref="T:System.InvalidOperationException"/>.
|
||||
</summary>
|
||||
<param name="form">The form used as frame update benchmark.</param>
|
||||
<param name="action">Operation after frame update alignment.</param>
|
||||
<exception cref="T:System.InvalidOperationException">The action binded to a wrong alignment.</exception>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.IglFunc.ActiveTexture(System.UInt32)">
|
||||
<summary>
|
||||
Same function as OpenGL api glActiveTexture
|
||||
</summary>
|
||||
<param name="type">type of texture to activate</param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.IglFunc.AttachShader(System.UInt32,System.UInt32)">
|
||||
<summary>
|
||||
Same fucntion as OpenGL api glAttachShader
|
||||
@@ -283,6 +332,13 @@
|
||||
<param name="bufferType"></param>
|
||||
<param name="index"></param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.IglFunc.BindTexture(System.UInt32,System.UInt32)">
|
||||
<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.UInt32)">
|
||||
<summary>
|
||||
Same function as OpenGL api, glBindVertexArray
|
||||
@@ -354,6 +410,13 @@
|
||||
<param name="count"></param>
|
||||
<param name="ptr"></param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.IglFunc.GenTextures(System.Int32,System.UInt32*)">
|
||||
<summary>
|
||||
Same fucnction as OpenGL api glGenTextures.
|
||||
</summary>
|
||||
<param name="count">amount of textures to generate</param>
|
||||
<param name="ptr">pointer to texture signs' array</param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.IglFunc.GenVertexArrays(System.Int32,System.UInt32*)">
|
||||
<summary>
|
||||
Same fucntion as OpenGL api, glGenVertexArray
|
||||
@@ -369,6 +432,12 @@
|
||||
<param name="ptr">Pointer to byte array of name <see cref="T:System.String"/> of the uniform </param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.IglFunc.MakeContexCurrent(StgSharp.Graphics.Form)">
|
||||
<summary>
|
||||
Make the OpenGL context of a vertain <see cref="T:StgSharp.Graphics.Form"/> as the activated OpenGL context.
|
||||
</summary>
|
||||
<param name="form"></param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.IglFunc.SetFrameBufferSizeCallback(System.IntPtr,StgSharp.Graphics.FrameBufferSizeHandler)">
|
||||
<summary>
|
||||
sets the framebuffer resize callback of the specified <see cref="T:StgSharp.Graphics.Form"/>,
|
||||
@@ -415,26 +484,6 @@
|
||||
</summary>
|
||||
<param name="program">Sign of program to be used</param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.IglFunc.GenTextures(System.Int32,System.UInt32*)">
|
||||
<summary>
|
||||
Same fucnction as OpenGL api glGenTextures.
|
||||
</summary>
|
||||
<param name="count">amount of textures to generate</param>
|
||||
<param name="ptr">pointer to texture signs' array</param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.IglFunc.BindTexture(System.UInt32,System.UInt32)">
|
||||
<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.ActiveTexture(System.UInt32)">
|
||||
<summary>
|
||||
Same function as OpenGL api glActiveTexture
|
||||
</summary>
|
||||
<param name="type">type of texture to activate</param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.IglFunc.Viewport(System.Int32,System.Int32,System.Int32,System.Int32)">
|
||||
<summary>
|
||||
Same function as the OpenGL api, glViewPort
|
||||
@@ -578,6 +627,47 @@
|
||||
A square
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:StgSharp.Logic.DynamicArrayList`1">
|
||||
<summary>
|
||||
A linear data structure with dynamic length.
|
||||
It contains a <see cref="T:System.Collections.Generic.List`1"/> of <see cref="T:System.Array"/>,
|
||||
each <see cref="T:System.Array"/> is twice longer than the former one.
|
||||
</summary>
|
||||
<typeparam name="T"></typeparam>
|
||||
</member>
|
||||
<member name="M:StgSharp.Logic.DynamicArrayList`1.#ctor(System.Int32)">
|
||||
<summary>
|
||||
Init a <see cref="T:StgSharp.Logic.DynamicArrayList`1"/> with a certain amount of elements prepared.
|
||||
</summary>
|
||||
<param name="count">Amount of elements to be prepared.</param>
|
||||
</member>
|
||||
<member name="P:StgSharp.Logic.DynamicArrayList`1.Length">
|
||||
<summary>
|
||||
Length of this <see cref="T:StgSharp.Logic.DynamicArrayList`1"/>
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:StgSharp.Logic.Bool2">
|
||||
<summary>
|
||||
A pair of <see cref="T:System.Boolean"/> value
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:StgSharp.Logic.Bool2.Value">
|
||||
<summary>
|
||||
A <see cref="T:System.UInt16"/> value.
|
||||
The lower byte is <see cref="F:StgSharp.Logic.Bool2.bool0"/>,
|
||||
and higher byte is <see cref="F:StgSharp.Logic.Bool2.bool1"/>.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:StgSharp.Logic.Bool2.bool0">
|
||||
<summary>
|
||||
The first <see cref="T:System.Boolean"/> value.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:StgSharp.Logic.Bool2.bool1">
|
||||
<summary>
|
||||
The second <see cref="T:System.Boolean"/> value.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:StgSharp.LinkedList`1.IsEmpty">
|
||||
<summary>
|
||||
Whether this linked list has no members or not.
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
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.
+195
-178
@@ -1,5 +1,6 @@
|
||||
using StgSharp.Geometries;
|
||||
using StgSharp.Graphics;
|
||||
using StgSharp.Logic;
|
||||
using StgSharp.Math;
|
||||
using StgSharp.Math.Linear;
|
||||
using System;
|
||||
@@ -12,182 +13,182 @@ using System.Text;
|
||||
namespace StgSharp
|
||||
{
|
||||
|
||||
public class StgSharpDemoForm : Form
|
||||
{
|
||||
Uniform<float, float, float> color;
|
||||
ElementBuffer ebo;
|
||||
Uniform<int> ourTexture;
|
||||
Uniform<int> ourTexture2;
|
||||
Shader shader;
|
||||
Texture texture;
|
||||
VertexArray vao;
|
||||
VertexBuffer vbo;
|
||||
|
||||
public static unsafe void ProcessInput(IntPtr windowPtr)
|
||||
{
|
||||
if (InternalIO.glfw.GetKey(windowPtr, (int)Operation.Key.ESCAPE)
|
||||
== KeyStatus.PRESS)
|
||||
{
|
||||
InternalIO.glfw.SetWindowShouldClose(windowPtr, 1);
|
||||
}
|
||||
}
|
||||
|
||||
public override void Deinit(object[] args, IglFunc GL)
|
||||
{
|
||||
/**/
|
||||
vao.Dispose();
|
||||
vbo.Dispose();
|
||||
ebo.Dispose();
|
||||
/**/
|
||||
|
||||
InternalIO.glfw.Terminate();
|
||||
}
|
||||
|
||||
public unsafe void FormSizeCallback(IntPtr window, int width, int height)
|
||||
{
|
||||
GL.Viewport(0, 0, width, height);
|
||||
}
|
||||
|
||||
public override void Init(object[] args)
|
||||
{
|
||||
|
||||
InternalIO.InternalWriteLog("\n\n\n", "Program start", LogType.Info);
|
||||
|
||||
Platform.InitGL(4, 6);
|
||||
|
||||
InitForm(800, 600, "Hello, STG#!", IntPtr.Zero, null);
|
||||
MakeAsCurrentContext();
|
||||
SetSizeLimit(800, 600, 800, 600);
|
||||
GL.SetFrameBufferSizeCallback(windowID, FormSizeCallback);
|
||||
|
||||
this.LoadGLapi(null);
|
||||
|
||||
shader = CreateShader();
|
||||
shader.CompileVertexShader(
|
||||
File.ReadAllText("Shader\\vertex.vert")
|
||||
);
|
||||
shader.CompileFragmentShader(
|
||||
File.ReadAllText("Shader\\fragment.frag")
|
||||
);
|
||||
shader.Link();
|
||||
|
||||
Triangle tri = new Triangle(
|
||||
-0.5f, -0.3f, 0.0f,
|
||||
0.5f, -0.5f, 0.0f,
|
||||
0.0f, 0.5f, 0.0f
|
||||
);
|
||||
|
||||
Rectangle rec = new Rectangle(
|
||||
-0.5f, 0.5f, 0.0f,
|
||||
0.5f, 0.5f, 0.0f,
|
||||
0.5f, -0.5f, 0.0f,
|
||||
-0.5f, -0.5f, 0.0f
|
||||
);
|
||||
|
||||
Polygon5 polygon = new Polygon5(
|
||||
-0.4f, 0.5f, 0.0f,
|
||||
0.5f, 0.5f, 0.0f,
|
||||
0.6f, -0.5f, 0.0f,
|
||||
0, -1, 0,
|
||||
-0.7f, -0.5f, 0.0f
|
||||
);
|
||||
|
||||
|
||||
vao = new VertexArray(1);
|
||||
vbo = new VertexBuffer(2);
|
||||
ebo = new ElementBuffer(1);
|
||||
texture = CreateTexture(2);
|
||||
|
||||
|
||||
float[] texCoord = {
|
||||
0.0f, 0.0f,
|
||||
1.0f, 0.0f,
|
||||
1.0f, 1.0f,
|
||||
0.0f, 1.0f };
|
||||
|
||||
GL.BindVertexArray(vao[0]);
|
||||
|
||||
ebo.SetValue(0, rec.Indices, BufferUsage.STATIC_DRAW);
|
||||
|
||||
vbo.SetValue(0, rec.VertexBuffer, BufferUsage.STATIC_DRAW);
|
||||
GL.SetVertexAttribute(0, 3, typeof(float), false, 4 * sizeof(float), 0);
|
||||
|
||||
vbo.SetValueArray(1, texCoord, BufferUsage.STATIC_DRAW);
|
||||
GL.SetVertexAttribute(2, 2, typeof(float), false, 2 * sizeof(float), 0);
|
||||
|
||||
/**/
|
||||
GL.BindBuffer(BufferType.ARRAY_BUFFER, 0);
|
||||
vao.BindNull();
|
||||
/**/
|
||||
|
||||
texture.Bind2D(0);
|
||||
texture.Set2dWrapProperty(Wrap.Repeat, Wrap.Repeat);
|
||||
texture.Set2dFilterProperty(Filter.Nearest, Filter.Nearest);
|
||||
texture.LoadTexture(0, "Shader\\Image1.png", null);
|
||||
|
||||
texture.Bind2D(1);
|
||||
texture.Set2dWrapProperty(Wrap.Repeat, Wrap.Repeat);
|
||||
texture.Set2dFilterProperty(Filter.Nearest, Filter.Nearest);
|
||||
texture.LoadTexture(1, "Shader\\awesomeface.png", null);
|
||||
|
||||
|
||||
//color = GetUniform<float, float, float>(shader, "color");
|
||||
|
||||
shader.Use();
|
||||
/**/
|
||||
//ourTexture = GetUniform<int>(shader, "ourTexture");
|
||||
GL.SetValue(ourTexture, 0);
|
||||
//ourTexture2 = GetUniform<int>(shader, "ourTexture2");
|
||||
GL.SetValue(ourTexture2, 1);
|
||||
/**/
|
||||
|
||||
}
|
||||
|
||||
public override void OnRenderFrame(object[] args, IglFunc GL)
|
||||
{
|
||||
}
|
||||
|
||||
public override void OnUpdateFrame(object[] args, IglFunc GL)
|
||||
{
|
||||
|
||||
ProcessInput(windowID);
|
||||
|
||||
GL.ClearColor(0.333f, 0.555f, 0.555f, 1.0f);
|
||||
//GL.api.Clear(GLconst.COLOR_BUFFER_BIT);
|
||||
GL.Clear(MaskBufferBit.COLOR);
|
||||
|
||||
vao.Bind(0);
|
||||
shader.Use();
|
||||
|
||||
/**/
|
||||
texture.Activate(TextureUnit.Unit0);
|
||||
texture.Bind2D(0);
|
||||
texture.Activate(TextureUnit.Unit1);
|
||||
texture.Bind2D(1);
|
||||
/**/
|
||||
|
||||
float time = (float)InternalIO.glfw.GetTime();
|
||||
GL.SetValue(color,
|
||||
0.5f + MathF.Sin(time),
|
||||
0.5f + MathF.Sin(time/* + 0.667f * 3.14f/**/),
|
||||
0.5f + MathF.Sin(time/* - 0.667f * 3.14f/**/)
|
||||
);
|
||||
|
||||
vao.Bind(0);
|
||||
|
||||
|
||||
AlignFrame(this, () =>
|
||||
{
|
||||
GL.DrawElements(GepmetryType.TRIANGLES, 6, typeof(uint), IntPtr.Zero);
|
||||
|
||||
vao.BindNull();
|
||||
|
||||
InternalIO.glfw.SwapBuffers(windowID);
|
||||
InternalIO.glfw.PollEvents();
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
// public class StgSharpDemoForm : Form
|
||||
// {
|
||||
// Uniform<float, float, float> color;
|
||||
// ElementBuffer ebo;
|
||||
// Uniform<int> ourTexture;
|
||||
// Uniform<int> ourTexture2;
|
||||
// Shader shader;
|
||||
// Texture texture;
|
||||
// VertexArray vao;
|
||||
// VertexBuffer vbo;
|
||||
//
|
||||
// public static unsafe void ProcessInput(IntPtr windowPtr)
|
||||
// {
|
||||
// if (InternalIO.glfw.GetKey(windowPtr, (int)Operation.Key.ESCAPE)
|
||||
// == KeyStatus.PRESS)
|
||||
// {
|
||||
// InternalIO.glfw.SetWindowShouldClose(windowPtr, 1);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// public override void Deinit(object[] args, IglFunc GL)
|
||||
// {
|
||||
// /**/
|
||||
// vao.Dispose();
|
||||
// vbo.Dispose();
|
||||
// ebo.Dispose();
|
||||
// /**/
|
||||
//
|
||||
// InternalIO.glfw.Terminate();
|
||||
// }
|
||||
//
|
||||
// public unsafe void FormSizeCallback(IntPtr window, int width, int height)
|
||||
// {
|
||||
// GL.Viewport(0, 0, width, height);
|
||||
// }
|
||||
//
|
||||
// public override void Init(object[] args)
|
||||
// {
|
||||
//
|
||||
// InternalIO.InternalWriteLog("\n\n\n", "Program start", LogType.Info);
|
||||
//
|
||||
// Platform.InitGL(4, 6);
|
||||
//
|
||||
// InitForm(800, 600, "Hello, STG#!", IntPtr.Zero, null);
|
||||
// MakeAsCurrentContext();
|
||||
// SetSizeLimit(800, 600, 800, 600);
|
||||
// GL.SetFrameBufferSizeCallback(windowID, FormSizeCallback);
|
||||
//
|
||||
// this.LoadGLapi(null);
|
||||
//
|
||||
// shader = CreateShader();
|
||||
// shader.CompileVertexShader(
|
||||
// File.ReadAllText("Shader\\vertex.vert")
|
||||
// );
|
||||
// shader.CompileFragmentShader(
|
||||
// File.ReadAllText("Shader\\fragment.frag")
|
||||
// );
|
||||
// shader.Link();
|
||||
//
|
||||
// Triangle tri = new Triangle(
|
||||
// -0.5f, -0.3f, 0.0f,
|
||||
// 0.5f, -0.5f, 0.0f,
|
||||
// 0.0f, 0.5f, 0.0f
|
||||
// );
|
||||
//
|
||||
// Rectangle rec = new Rectangle(
|
||||
// -0.5f, 0.5f, 0.0f,
|
||||
// 0.5f, 0.5f, 0.0f,
|
||||
// 0.5f, -0.5f, 0.0f,
|
||||
// -0.5f, -0.5f, 0.0f
|
||||
// );
|
||||
//
|
||||
// Polygon5 polygon = new Polygon5(
|
||||
// -0.4f, 0.5f, 0.0f,
|
||||
// 0.5f, 0.5f, 0.0f,
|
||||
// 0.6f, -0.5f, 0.0f,
|
||||
// 0, -1, 0,
|
||||
// -0.7f, -0.5f, 0.0f
|
||||
// );
|
||||
//
|
||||
//
|
||||
// vao = new VertexArray(1);
|
||||
// vbo = new VertexBuffer(2);
|
||||
// ebo = new ElementBuffer(1);
|
||||
// texture = CreateTexture(2);
|
||||
//
|
||||
//
|
||||
// float[] texCoord = {
|
||||
// 0.0f, 0.0f,
|
||||
// 1.0f, 0.0f,
|
||||
// 1.0f, 1.0f,
|
||||
// 0.0f, 1.0f };
|
||||
//
|
||||
// GL.BindVertexArray(vao[0]);
|
||||
//
|
||||
// ebo.SetValue(0, rec.Indices, BufferUsage.STATIC_DRAW);
|
||||
//
|
||||
// vbo.SetValue(0, rec.VertexBuffer, BufferUsage.STATIC_DRAW);
|
||||
// GL.SetVertexAttribute(0, 3, typeof(float), false, 4 * sizeof(float), 0);
|
||||
//
|
||||
// vbo.SetValueArray(1, texCoord, BufferUsage.STATIC_DRAW);
|
||||
// GL.SetVertexAttribute(2, 2, typeof(float), false, 2 * sizeof(float), 0);
|
||||
//
|
||||
// /**/
|
||||
// GL.BindBuffer(BufferType.ARRAY_BUFFER, 0);
|
||||
// vao.BindNull();
|
||||
// /**/
|
||||
//
|
||||
// texture.Bind2D(0);
|
||||
// texture.Set2dWrapProperty(Wrap.Repeat, Wrap.Repeat);
|
||||
// texture.Set2dFilterProperty(Filter.Nearest, Filter.Nearest);
|
||||
// texture.LoadTexture(0, "Shader\\Image1.png", null);
|
||||
//
|
||||
// texture.Bind2D(1);
|
||||
// texture.Set2dWrapProperty(Wrap.Repeat, Wrap.Repeat);
|
||||
// texture.Set2dFilterProperty(Filter.Nearest, Filter.Nearest);
|
||||
// texture.LoadTexture(1, "Shader\\awesomeface.png", null);
|
||||
//
|
||||
//
|
||||
// //color = GetUniform<float, float, float>(shader, "color");
|
||||
//
|
||||
// shader.Use();
|
||||
// /**/
|
||||
// //ourTexture = GetUniform<int>(shader, "ourTexture");
|
||||
// GL.SetValue(ourTexture, 0);
|
||||
// //ourTexture2 = GetUniform<int>(shader, "ourTexture2");
|
||||
// GL.SetValue(ourTexture2, 1);
|
||||
// /**/
|
||||
//
|
||||
// }
|
||||
//
|
||||
// public override void OnRenderFrame(object[] args, IglFunc GL)
|
||||
// {
|
||||
// }
|
||||
//
|
||||
// public override void OnUpdateFrame(object[] args, IglFunc GL)
|
||||
// {
|
||||
//
|
||||
// ProcessInput(windowID);
|
||||
//
|
||||
// GL.ClearColor(0.333f, 0.555f, 0.555f, 1.0f);
|
||||
// //GL.api.Clear(GLconst.COLOR_BUFFER_BIT);
|
||||
// GL.Clear(MaskBufferBit.COLOR);
|
||||
//
|
||||
// vao.Bind(0);
|
||||
// shader.Use();
|
||||
//
|
||||
// /**/
|
||||
// texture.Activate(TextureUnit.Unit0);
|
||||
// texture.Bind2D(0);
|
||||
// texture.Activate(TextureUnit.Unit1);
|
||||
// texture.Bind2D(1);
|
||||
// /**/
|
||||
//
|
||||
// float time = (float)InternalIO.glfw.GetTime();
|
||||
// GL.SetValue(color,
|
||||
// 0.5f + MathF.Sin(time),
|
||||
// 0.5f + MathF.Sin(time/* + 0.667f * 3.14f/**/),
|
||||
// 0.5f + MathF.Sin(time/* - 0.667f * 3.14f/**/)
|
||||
// );
|
||||
//
|
||||
// vao.Bind(0);
|
||||
//
|
||||
//
|
||||
// AlignFrame(this, () =>
|
||||
// {
|
||||
// GL.DrawElements(GepmetryType.TRIANGLES, 6, typeof(uint), IntPtr.Zero);
|
||||
//
|
||||
// vao.BindNull();
|
||||
//
|
||||
// InternalIO.glfw.SwapBuffers(windowID);
|
||||
// InternalIO.glfw.PollEvents();
|
||||
// });
|
||||
//
|
||||
// }
|
||||
// }
|
||||
|
||||
internal static class Program
|
||||
{
|
||||
@@ -196,8 +197,24 @@ namespace StgSharp
|
||||
{
|
||||
try
|
||||
{
|
||||
StgSharpDemoForm demoForm = new StgSharpDemoForm();
|
||||
demoForm.Show(null);
|
||||
|
||||
DynamicArrayList<int> list = new DynamicArrayList<int>();
|
||||
for (int i = 0; i < 100; i++)
|
||||
{
|
||||
list.Add(i + 1);
|
||||
}
|
||||
list.ShowStructure();
|
||||
for (int i = 0; i < 100; i++)
|
||||
{
|
||||
Console.WriteLine(list[i]);
|
||||
}
|
||||
for (int i = 99; i >= 0; i--)
|
||||
{
|
||||
Console.WriteLine(list.Length);
|
||||
list.RemoveAt(i);
|
||||
}
|
||||
Console.WriteLine(list.Length);
|
||||
|
||||
}
|
||||
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+8b14599233aebdea7b06c2073fd92aa31800164d")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+659420aa6c98d2cef990b65d1c5999c6968f3699")]
|
||||
[assembly: System.Reflection.AssemblyProductAttribute("StgSharpDebug")]
|
||||
[assembly: System.Reflection.AssemblyTitleAttribute("StgSharpDebug")]
|
||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||
|
||||
@@ -1 +1 @@
|
||||
51df9ffdab5f2efe774f0851f1e38e609d26429e2fe900edf259834ca9f1c168
|
||||
0ab12d2c59e99bed4d91307c0f5814fb6bd5b6c00fee74f06034c9eec82824d1
|
||||
|
||||
@@ -1 +1 @@
|
||||
00bbfd1293fc084f2832b4c2a7391aef92f545fcaa28ae1447945a3e52b96666
|
||||
9e267d6382351e5a6029e566efd636dd8c97791311edd2b33766cc1dbf39e8a8
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -1 +1 @@
|
||||
{"documents":{"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\*":"https://raw.githubusercontent.com/Nitload-NSI/CCD_Github/8b14599233aebdea7b06c2073fd92aa31800164d/*"}}
|
||||
{"documents":{"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\*":"https://raw.githubusercontent.com/Nitload-NSI/CCD_Github/659420aa6c98d2cef990b65d1c5999c6968f3699/*"}}
|
||||
@@ -29,22 +29,43 @@
|
||||
Height of this form, represent in <see cref="T:System.Int32"/>
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:StgSharp.Graphics.Form.IsDoubleRendering">
|
||||
<summary>
|
||||
Representing
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:StgSharp.Graphics.Form.Size">
|
||||
<summary>
|
||||
Width of this form, represent in <see cref="T:System.Int32"/>
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:StgSharp.Graphics.Form.GL">
|
||||
<member name="M:StgSharp.Graphics.Form.Init(System.Object[])">
|
||||
<summary>
|
||||
A set of methods providing support for all OpenGL
|
||||
APIs and other methods depend on OpenGL.
|
||||
Necessary operation to init this form.
|
||||
</summary>
|
||||
<param name="args"></param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.Form.Main(System.Object[])">
|
||||
<summary>
|
||||
Behaviour of current form when in a render cycle.
|
||||
When this form
|
||||
</summary>
|
||||
<param name="args"></param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.Form.Show(System.Object[])">
|
||||
<summary>
|
||||
Init this form and render it on screen, and respond with operation
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.Form.SetRenderThreads(System.Boolean)">
|
||||
<summary>
|
||||
Define how current form render in one frame.
|
||||
</summary>
|
||||
<param name="totalThread">
|
||||
|
||||
Please define
|
||||
</param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.Form.InitForm(System.Int32,System.Int32,System.String,System.IntPtr,StgSharp.Graphics.Form)">
|
||||
<summary>
|
||||
Constructor of a Form, creats an instance of a form and
|
||||
@@ -94,11 +115,6 @@
|
||||
Maximum size of current form. In form of a <see cref="T:StgSharp.Math.Vec2d"/> of (width,height)
|
||||
</param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.Form.BindToPlatform">
|
||||
<summary>
|
||||
Bind this form to StgSharp platform.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.Form.Texture.LoadTexture(System.Int32,System.String,StgSharp.Graphics.ImageLoader)">
|
||||
<summary>
|
||||
|
||||
@@ -107,29 +123,6 @@
|
||||
<param name="index"></param>
|
||||
<param name="loader"></param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.Form.VertexBuffer.Unbind">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.Form.VertexBuffer.SetValue``1(System.Int32,``0,StgSharp.Graphics.BufferUsage)">
|
||||
<summary>
|
||||
Set data to current vertex buffer object
|
||||
</summary>
|
||||
<typeparam name="T">Type of bufferData</typeparam>
|
||||
<param name="index">Index to find certain VBO in this instance</param>
|
||||
<param name="bufferData">Data to write in</param>
|
||||
<param name="usage">How OpenGL use these data, defined by <see cref="T:StgSharp.Graphics.BufferUsage"/></param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.Form.VertexBuffer.SetValueArray``1(System.Int32,``0[],StgSharp.Graphics.BufferUsage)">
|
||||
<summary>
|
||||
Set data to current vertex buffer object
|
||||
</summary>
|
||||
<typeparam name="T">Type of bufferData</typeparam>
|
||||
<param name="index">Index to find certain VBO in this instance</param>
|
||||
<param name="bufferArray">A array of data to write in</param>
|
||||
<param name="usage">How OpenGL use these data, defined by <see cref="T:StgSharp.Graphics.BufferUsage"/></param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.Form.CreateShader">
|
||||
<summary>
|
||||
Create an instance of <see cref="T:StgSharp.Graphics.Form.Shader"/> program
|
||||
@@ -193,6 +186,34 @@
|
||||
</summary>
|
||||
<param name="timer"><see cref="T:StgSharp.Graphics.FrameTimer"/> to be converted</param>
|
||||
</member>
|
||||
<member name="T:StgSharp.Graphics.IBufferObject">
|
||||
<summary>
|
||||
Interface of all kinds OpenGL buffer onjects
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.VertexBuffer.Unbind">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.VertexBuffer.SetValue``1(System.Int32,``0,StgSharp.Graphics.BufferUsage)">
|
||||
<summary>
|
||||
Set data to current vertex buffer object
|
||||
</summary>
|
||||
<typeparam name="T">Type of bufferData</typeparam>
|
||||
<param name="index">Index to find certain VBO in this instance</param>
|
||||
<param name="bufferData">Data to write in</param>
|
||||
<param name="usage">How OpenGL use these data, defined by <see cref="T:StgSharp.Graphics.BufferUsage"/></param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.VertexBuffer.SetValueArray``1(System.Int32,``0[],StgSharp.Graphics.BufferUsage)">
|
||||
<summary>
|
||||
Set data to current vertex buffer object
|
||||
</summary>
|
||||
<typeparam name="T">Type of bufferData</typeparam>
|
||||
<param name="index">Index to find certain VBO in this instance</param>
|
||||
<param name="bufferArray">A array of data to write in</param>
|
||||
<param name="usage">How OpenGL use these data, defined by <see cref="T:StgSharp.Graphics.BufferUsage"/></param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.glManager.LoadGLapi(StgSharp.Graphics.Form,StgSharp.Graphics.GLfuncLoader)">
|
||||
<summary>
|
||||
Load all aupportable OpenGL APIs and bind them to given <see cref="T:StgSharp.Graphics.Form"/> context.
|
||||
@@ -269,6 +290,34 @@
|
||||
<param name="uniform">The <see cref="T:StgSharp.Graphics.Uniform`1"/> target</param>
|
||||
<param name="vec">A <see cref="T:StgSharp.Math.Vec4d"/> value of the uniform </param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.IglFunc.AlignFrame(StgSharp.Graphics.Form)">
|
||||
<summary>
|
||||
Align a sets of code to frame update of a <see cref="T:StgSharp.Graphics.Form"/>.
|
||||
Usually, a call of <see cref="M:StgSharp.Graphics.IglFunc.AfterAlign(StgSharp.Graphics.Form,System.Action)"/> is required.
|
||||
This method is used as sigle thread method. If more than one
|
||||
alignment is requested, a <see cref="T:System.InvalidOperationException"/> will throw.
|
||||
</summary>
|
||||
<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.AfterAlign(StgSharp.Graphics.Form,System.Action)">
|
||||
<summary>
|
||||
Operation after alignment by calling <see cref="M:StgSharp.Graphics.IglFunc.AlignFrame(StgSharp.Graphics.Form)"/>.
|
||||
No calling of this method is acceptable, but it will bring the risk
|
||||
of that relevant code will not run if it is interrupted by frame overtime.
|
||||
Please call this method immediately after calling <see cref="M:StgSharp.Graphics.IglFunc.AlignFrame(StgSharp.Graphics.Form)"/>,
|
||||
too early or sonner may cause <see cref="T:System.InvalidOperationException"/>.
|
||||
</summary>
|
||||
<param name="form">The form used as frame update benchmark.</param>
|
||||
<param name="action">Operation after frame update alignment.</param>
|
||||
<exception cref="T:System.InvalidOperationException">The action binded to a wrong alignment.</exception>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.IglFunc.ActiveTexture(System.UInt32)">
|
||||
<summary>
|
||||
Same function as OpenGL api glActiveTexture
|
||||
</summary>
|
||||
<param name="type">type of texture to activate</param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.IglFunc.AttachShader(System.UInt32,System.UInt32)">
|
||||
<summary>
|
||||
Same fucntion as OpenGL api glAttachShader
|
||||
@@ -283,6 +332,13 @@
|
||||
<param name="bufferType"></param>
|
||||
<param name="index"></param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.IglFunc.BindTexture(System.UInt32,System.UInt32)">
|
||||
<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.UInt32)">
|
||||
<summary>
|
||||
Same function as OpenGL api, glBindVertexArray
|
||||
@@ -354,6 +410,13 @@
|
||||
<param name="count"></param>
|
||||
<param name="ptr"></param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.IglFunc.GenTextures(System.Int32,System.UInt32*)">
|
||||
<summary>
|
||||
Same fucnction as OpenGL api glGenTextures.
|
||||
</summary>
|
||||
<param name="count">amount of textures to generate</param>
|
||||
<param name="ptr">pointer to texture signs' array</param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.IglFunc.GenVertexArrays(System.Int32,System.UInt32*)">
|
||||
<summary>
|
||||
Same fucntion as OpenGL api, glGenVertexArray
|
||||
@@ -369,6 +432,12 @@
|
||||
<param name="ptr">Pointer to byte array of name <see cref="T:System.String"/> of the uniform </param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.IglFunc.MakeContexCurrent(StgSharp.Graphics.Form)">
|
||||
<summary>
|
||||
Make the OpenGL context of a vertain <see cref="T:StgSharp.Graphics.Form"/> as the activated OpenGL context.
|
||||
</summary>
|
||||
<param name="form"></param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.IglFunc.SetFrameBufferSizeCallback(System.IntPtr,StgSharp.Graphics.FrameBufferSizeHandler)">
|
||||
<summary>
|
||||
sets the framebuffer resize callback of the specified <see cref="T:StgSharp.Graphics.Form"/>,
|
||||
@@ -415,26 +484,6 @@
|
||||
</summary>
|
||||
<param name="program">Sign of program to be used</param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.IglFunc.GenTextures(System.Int32,System.UInt32*)">
|
||||
<summary>
|
||||
Same fucnction as OpenGL api glGenTextures.
|
||||
</summary>
|
||||
<param name="count">amount of textures to generate</param>
|
||||
<param name="ptr">pointer to texture signs' array</param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.IglFunc.BindTexture(System.UInt32,System.UInt32)">
|
||||
<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.ActiveTexture(System.UInt32)">
|
||||
<summary>
|
||||
Same function as OpenGL api glActiveTexture
|
||||
</summary>
|
||||
<param name="type">type of texture to activate</param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.IglFunc.Viewport(System.Int32,System.Int32,System.Int32,System.Int32)">
|
||||
<summary>
|
||||
Same function as the OpenGL api, glViewPort
|
||||
@@ -599,6 +648,47 @@
|
||||
A square
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:StgSharp.Logic.DynamicArrayList`1">
|
||||
<summary>
|
||||
A linear data structure with dynamic length.
|
||||
It contains a <see cref="T:System.Collections.Generic.List`1"/> of <see cref="T:System.Array"/>,
|
||||
each <see cref="T:System.Array"/> is twice longer than the former one.
|
||||
</summary>
|
||||
<typeparam name="T"></typeparam>
|
||||
</member>
|
||||
<member name="M:StgSharp.Logic.DynamicArrayList`1.#ctor(System.Int32)">
|
||||
<summary>
|
||||
Init a <see cref="T:StgSharp.Logic.DynamicArrayList`1"/> with a certain amount of elements prepared.
|
||||
</summary>
|
||||
<param name="count">Amount of elements to be prepared.</param>
|
||||
</member>
|
||||
<member name="P:StgSharp.Logic.DynamicArrayList`1.Length">
|
||||
<summary>
|
||||
Length of this <see cref="T:StgSharp.Logic.DynamicArrayList`1"/>
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:StgSharp.Logic.Bool2">
|
||||
<summary>
|
||||
A pair of <see cref="T:System.Boolean"/> value
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:StgSharp.Logic.Bool2.Value">
|
||||
<summary>
|
||||
A <see cref="T:System.UInt16"/> value.
|
||||
The lower byte is <see cref="F:StgSharp.Logic.Bool2.bool0"/>,
|
||||
and higher byte is <see cref="F:StgSharp.Logic.Bool2.bool1"/>.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:StgSharp.Logic.Bool2.bool0">
|
||||
<summary>
|
||||
The first <see cref="T:System.Boolean"/> value.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:StgSharp.Logic.Bool2.bool1">
|
||||
<summary>
|
||||
The second <see cref="T:System.Boolean"/> value.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:StgSharp.LinkedList`1.IsEmpty">
|
||||
<summary>
|
||||
Whether this linked list has no members or not.
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user