daily update on 20240320 by nitload youmu

This commit is contained in:
YoumuLiu
2024-03-21 02:01:17 +08:00
parent 0c50c6282e
commit 9a10ec201c
91 changed files with 1150 additions and 1815 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.
File diff suppressed because it is too large Load Diff
@@ -11,7 +11,7 @@ uniform vec3 color;
void main()
{
gl_Position = vec4(aPos.xyz,1.0);
gl_Position = vec4(aPos.xyz,1.0) + vec4(color.xy-vec2(0.5,0.5),0.0,0.0);
TexColor = color;
TexCoord = aTextCoord;
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -50,6 +50,18 @@
Width of this form, represent in <see cref="T:System.Int32"/>
</summary>
</member>
<member name="M:StgSharp.Graphics.Form.Init(System.Object[])">
<summary>
Necessary operation to init this form.
</summary>
<param name="args"></param>
</member>
<member name="M:StgSharp.Graphics.Form.Main">
<summary>
Behaviour of current form when in a frame cycle.
</summary>
<param name="args"></param>
</member>
<member name="M:StgSharp.Graphics.Form.MakeAsCurrentContext">
<summary>
Init an OpenGl context if current form has not been binded to any context. and set the context binded to
@@ -99,19 +111,7 @@
<param name="maxWidth">Maximum width of curent form</param>
<param name="maxHeight">Maximum height of current form</param>
</member>
<member name="M:StgSharp.Graphics.Form.Init(System.Object[])">
<summary>
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[])">
<member name="M:StgSharp.Graphics.Form.Show">
<summary>
Init this form and render it on screen, and respond with operation
</summary>
@@ -137,13 +137,6 @@
<param name="count">Amount of EBO to be created.</param>
<returns></returns>
</member>
<member name="M:StgSharp.Graphics.Form.CreateVertexArray(System.Int32)">
<summary>
Create a set of <see cref="T:StgSharp.Graphics.VertexArray"/>.
</summary>
<param name="count">Amount of VAO to be crated.</param>
<returns></returns>
</member>
<member name="M:StgSharp.Graphics.Form.CreateTexture(System.Int32)">
<summary>
Create a sets of <see cref="T:StgSharp.Graphics.Texture"/>
@@ -151,6 +144,13 @@
<param name="count">Amount of textures to be crated.</param>
<returns></returns>
</member>
<member name="M:StgSharp.Graphics.Form.CreateVertexArray(System.Int32)">
<summary>
Create a set of <see cref="T:StgSharp.Graphics.VertexArray"/>.
</summary>
<param name="count">Amount of VAO to be crated.</param>
<returns></returns>
</member>
<member name="M:StgSharp.Graphics.Form.CreateVertexBuffer(System.Int32)">
<summary>
Create aset of <see cref="T:StgSharp.Graphics.VertexBuffer"/>.
@@ -273,11 +273,6 @@
Inti a shader with no program attached.
</summary>
</member>
<member name="M:StgSharp.Graphics.ShaderProgram.Link">
<summary>
Link the shader to current context.
</summary>
</member>
<member name="M:StgSharp.Graphics.ShaderProgram.GetUniform``1(System.String)">
<summary>
Get a uniform form current shader,
@@ -302,6 +297,11 @@
<param name="name">Name of the Uniform in shader code</param>
<returns></returns>
</member>
<member name="M:StgSharp.Graphics.ShaderProgram.Link">
<summary>
Link the shader to current context.
</summary>
</member>
<member name="M:StgSharp.Graphics.ShaderProgram.Use">
<summary>
Let the current context use this shader.
@@ -466,17 +466,6 @@
</summary>
<param name="form"></param>
</member>
<member name="M:StgSharp.Graphics.IglFunc.SetValue(StgSharp.Graphics.Uniform{System.Single,System.Single,System.Single,System.Single},System.Single,System.Single,System.Single,System.Single)">
<summary>
Set data value to a float <see cref="T:StgSharp.Graphics.Uniform`4"/>,
all types of parameters are float.
</summary>
<param name="uniform">The <see cref="T:StgSharp.Graphics.Uniform`4"/> target</param>
<param name="v0">The first value to be set</param>
<param name="v1">The second value to be set</param>
<param name="v2">The third value to be set</param>
<param name="v3">The forth value to be set</param>
</member>
<member name="M:StgSharp.Graphics.IglFunc.SetValue(StgSharp.Graphics.Uniform{System.Single,System.Single,System.Single,System.Single},StgSharp.Math.Vec4d)">
<summary>
Set data value to a float <see cref="T:StgSharp.Graphics.Uniform`4"/>,
@@ -485,25 +474,6 @@
<param name="uniform">The <see cref="T:StgSharp.Graphics.Uniform`4"/> target</param>
<param name="vec">A <see cref="T:StgSharp.Math.Vec4d"/> packing four parameters of the uniform </param>
</member>
<member name="M:StgSharp.Graphics.IglFunc.SetValue(StgSharp.Graphics.Uniform{System.Single,System.Single,System.Single},System.Single,System.Single,System.Single)">
<summary>
Set data value to a float <see cref="T:StgSharp.Graphics.Uniform`3"/>,
all types of parameters are float.
</summary>
<param name="uniform">The <see cref="T:StgSharp.Graphics.Uniform`3"/> target</param>
<param name="v0">The first value to be set</param>
<param name="v1">The second value to be set</param>
<param name="v2">The third value to be set</param>
</member>
<member name="M:StgSharp.Graphics.IglFunc.SetValue(StgSharp.Graphics.Uniform{System.Single,System.Single},System.Single,System.Single)">
<summary>
Set data value to a float <see cref="T:StgSharp.Graphics.Uniform`2"/>,
all types of parameters are float.
</summary>
<param name="uniform">The <see cref="T:StgSharp.Graphics.Uniform`2"/> target</param>
<param name="v0">The first value to be set</param>
<param name="v1">The second value to be set</param>
</member>
<member name="M:StgSharp.Graphics.IglFunc.SetValue(StgSharp.Graphics.Uniform{System.Single},System.Single)">
<summary>
Set data value to a float <see cref="T:StgSharp.Graphics.Uniform`1"/>,
@@ -528,6 +498,36 @@
<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.SetValue(StgSharp.Graphics.Uniform{System.Single,System.Single},System.Single,System.Single)">
<summary>
Set data value to a float <see cref="T:StgSharp.Graphics.Uniform`2"/>,
all types of parameters are float.
</summary>
<param name="uniform">The <see cref="T:StgSharp.Graphics.Uniform`2"/> target</param>
<param name="v0">The first value to be set</param>
<param name="v1">The second value to be set</param>
</member>
<member name="M:StgSharp.Graphics.IglFunc.SetValue(StgSharp.Graphics.Uniform{System.Single,System.Single,System.Single},System.Single,System.Single,System.Single)">
<summary>
Set data value to a float <see cref="T:StgSharp.Graphics.Uniform`3"/>,
all types of parameters are float.
</summary>
<param name="uniform">The <see cref="T:StgSharp.Graphics.Uniform`3"/> target</param>
<param name="v0">The first value to be set</param>
<param name="v1">The second value to be set</param>
<param name="v2">The third value to be set</param>
</member>
<member name="M:StgSharp.Graphics.IglFunc.SetValue(StgSharp.Graphics.Uniform{System.Single,System.Single,System.Single,System.Single},System.Single,System.Single,System.Single,System.Single)">
<summary>
Set data value to a float <see cref="T:StgSharp.Graphics.Uniform`4"/>,
all types of parameters are float.
</summary>
<param name="uniform">The <see cref="T:StgSharp.Graphics.Uniform`4"/> target</param>
<param name="v0">The first value to be set</param>
<param name="v1">The second value to be set</param>
<param name="v2">The third value to be set</param>
<param name="v3">The forth value to be set</param>
</member>
<member name="M:StgSharp.Graphics.IglFunc.SetVertexAttribute(System.UInt32,System.Int32,System.TypeCode,System.Boolean,System.UInt32,System.Int32)">
<summary>
Set how a shader parameter read data from a VBO.
@@ -654,7 +654,7 @@
<param name="tick">The game tick represent time passed by</param>
<returns>A 3d vector representing movement</returns>
</member>
<member name="M:StgSharp.Geometries.Line.MoveBeginPoint(System.UInt32)">
<member name="M:StgSharp.Geometries.Line.MoveBeginPoint(System.Int32)">
<summary>
Move begin side of a line.
It is recommended to override this function rather than
@@ -662,7 +662,7 @@
</summary>
<param name="tick">Time passed since current line was created.</param>
</member>
<member name="M:StgSharp.Geometries.Line.MoveEndPoint(System.UInt32)">
<member name="M:StgSharp.Geometries.Line.MoveEndPoint(System.Int32)">
<summary>
Move end side of a line.
It is recommended to override this function rather than
@@ -671,7 +671,7 @@
<param name="tick">Time passed since current line was created.</param>
<returns></returns>
</member>
<member name="M:StgSharp.Geometries.Parallelogram.MoveVertex2(System.UInt32)">
<member name="M:StgSharp.Geometries.Parallelogram.MoveVertex2(System.Int32)">
<summary>
Move the third vertix. this is a useless method for Parallelograms.
</summary>
@@ -679,7 +679,7 @@
<returns></returns>
<exception cref="T:StgSharp.Geometries.UnusedVertexException">Geometry overdefined</exception>
</member>
<member name="M:StgSharp.Geometries.Parallelogram.MoveVertex3(System.UInt32)">
<member name="M:StgSharp.Geometries.Parallelogram.MoveVertex3(System.Int32)">
<summary>
Move the third vertix. This method is useless for Parallelograms.
</summary>
@@ -692,6 +692,11 @@
平面几何体。包含三角形,对称四边形,自由多边形等。最多可由16个点参数定义。
</summary>
</member>
<member name="P:StgSharp.Geometries.PlainGeometry.BornTime">
<summary>
Tick time this geometry eas crested
</summary>
</member>
<member name="M:StgSharp.Geometries.PlainGeometry.GetAllSides">
<summary>
Get all sides of this <see cref="T:StgSharp.Geometries.PlainGeometry"/>.
@@ -704,11 +709,6 @@
</summary>
<returns></returns>
</member>
<member name="P:StgSharp.Geometries.PlainGeometry.BornTime">
<summary>
Tick time this geometry eas crested
</summary>
</member>
<member name="M:StgSharp.Geometries.Point.Update(System.UInt32)">
<summary>
Update the coordinate of the point. If this is a moving point,
@@ -778,25 +778,41 @@
The second <see cref="T:System.Boolean"/> value.
</summary>
</member>
<member name="T:StgSharp.TimeProvider">
<member name="T:StgSharp.TimeSpanProvider">
<summary>
A microsecond-accuracy timer. It will refresh every a certain time span.
</summary>
</member>
<member name="M:StgSharp.TimeProvider.#ctor(System.Int64,StgSharp.TimeSourceProvider)">
<member name="M:StgSharp.TimeSpanProvider.#ctor(System.Int64,StgSharpDebug.Logic.TimeSourceProviderBase)">
<summary>
Create a new <see cref="T:StgSharp.TimeProvider"/> and define the length of time span. Length of a single time span is defined in microseconds.
Create a new <see cref="T:StgSharp.TimeSpanProvider"/> and define the length of time span. Length of a single time span is defined in microseconds.
</summary>
<param name="spanLength"></param>
<parma name="provider"></parma>
</member>
<member name="P:StgSharp.TimeProvider.DefaultProvider">
<member name="M:StgSharp.TimeSpanProvider.#ctor(System.Double,StgSharpDebug.Logic.TimeSourceProviderBase)">
<summary>
Create a new <see cref="T:StgSharp.TimeSpanProvider"/> and define the length of time span.
Length of a single time span is defined in seconds.
</summary>
<param name="spanLength"></param>
<parma name="provider"></parma>
</member>
<member name="M:StgSharp.TimeSpanProvider.#ctor(System.Int64,System.Int32,StgSharpDebug.Logic.TimeSourceProviderBase)">
<summary>
Create a new <see cref="T:StgSharp.TimeSpanProvider"/> and define the length of time span. Length of a single time span is defined in microseconds.
</summary>
<param name="spanLength"></param>
<parma name="provider"></parma>
</member>
<member name="P:StgSharp.TimeSpanProvider.DefaultProvider">
<summary>
Time source provider provided in <see cref="T:StgSharp.StgSharp"/> internal framework.
</summary>
</member>
<member name="P:StgSharp.TimeProvider.SpanRefreshCallback">
<member name="P:StgSharp.TimeSpanProvider.SpanRefreshCallback">
<summary>
The method this <see cref="T:StgSharp.TimeProvider"/> will call every time a new time span started.
The method this <see cref="T:StgSharp.TimeSpanProvider"/> will call every time a new time span started.
</summary>
</member>
<member name="T:StgSharp.Math.GLclampf">
@@ -849,18 +865,18 @@
<param name="y"></param>
<returns>Returns the value of x^y</returns>
</member>
<member name="M:StgSharp.Math.Scaler.Random">
<summary>
</summary>
<returns></returns>
</member>
<member name="M:StgSharp.Math.Scaler.LowProceisionRandom">
<summary>
returns a random float number between 0 and 1.
</summary>
<returns></returns>
</member>
<member name="M:StgSharp.Math.Scaler.Random">
<summary>
</summary>
<returns></returns>
</member>
<member name="M:StgSharp.Math.Scaler.RandomSeed">
<summary>
Generates a random seed in int value.
@@ -39,6 +39,7 @@ namespace StgSharp
{
public static unsafe partial class StgSharp
{
private static bool _inited;
/// <summary>
/// Init an instance of OpenGL program,
@@ -78,6 +78,18 @@ namespace StgSharp
private static bool vsyncActivated;
internal static GraphicAPI API = default;
public static void Init()
{
mainTimeProvider = new StgSharpTime();
MainTimeProvider.StartProvidingTime();
InternalIO.glfwInit();
}
public static void Terminate()
{
MainTimeProvider.Terminate();
}
public static void Mark(bool needConsole)
{
markCount++;
+19 -6
View File
@@ -42,8 +42,11 @@ namespace StgSharp
public partial class StgSharp
{
internal static StgSharpTime mainTimeProvider;
internal static StgSharpTime MainTimeProvider=>mainTimeProvider;
}
public sealed class StgSharpTime : TimeSourceProviderBase
@@ -58,8 +61,7 @@ namespace StgSharp
{
}
public static StgSharpTime OnlyInstance
=> StgSharp.mainTimeProvider;
public static StgSharpTime OnlyInstance => StgSharp.MainTimeProvider;
public override sealed void StartProvidingTime()
{
@@ -90,10 +92,6 @@ namespace StgSharp
timeProvideThread.Start();
}
[MethodImpl(MethodImplOptions.NoOptimization)]
public static void TimerActivate(int maxFrameUpdateSensitiveTimeProviderCount)
{
}
protected override sealed void AddSubscriberUnsynced(TimeSpanProvider subscriber)
{
@@ -115,6 +113,11 @@ namespace StgSharp
while (mainProvider.IsRunning)
{
totalMS = mainProvider.ElapsedTicks / (internalFrequncy / (1000L * 1000L));
if (subscriberList.Count==0)
{
continue;
}
CheckSubscriberSemaphore.Wait();
foreach (TimeSpanProvider subscriber in subscriberList)
{
if (subscriber.CheckTime(totalMS))
@@ -122,6 +125,16 @@ namespace StgSharp
};
}
CheckSubscriberSemaphore.Release();
}
int a = 0;
}
public void Terminate()
{
lock (mainProvider)
{
mainProvider.Stop();
}
}
@@ -59,22 +59,22 @@ namespace StgSharp.Geometries
return new Plain(this.center, this.beginPoint, this.endPoint);
}
public virtual vec3d MovBegin(uint tick)
public virtual vec3d MovBegin(int tick)
{
return movBeginOperation.Invoke(tick);
}
public virtual vec3d MoveCenter(uint tick)
public virtual vec3d MoveCenter(int tick)
{
return movCenterOperation.Invoke(tick);
}
public virtual vec3d MovEnd(uint tick)
public virtual vec3d MovEnd(int tick)
{
return movEndOperation.Invoke(tick);
}
internal override void UpdateCoordinate(uint tick)
internal override void UpdateCoordinate(int tick)
{
tick = time;
center.Position = this.coordinate.origin + MoveCenter(tick);
@@ -60,23 +60,23 @@ namespace StgSharp.Geometries
return new Plain(center, pointOnCircle, pointOnPlain);
}
public virtual vec3d MoveCenter(uint tick)
public virtual vec3d MoveCenter(int tick)
{
return movCenterOperation.Invoke(tick);
}
public virtual vec3d UpdatePlain(uint tick)
public virtual vec3d UpdatePlain(int tick)
{
return movEndOperation.Invoke(tick);
}
public virtual vec3d UpdateRadius(uint tick)
public virtual vec3d UpdateRadius(int tick)
{
return movBeginOperation.Invoke(tick);
}
internal override void UpdateCoordinate(uint tick)
internal override void UpdateCoordinate(int tick)
{
tick = time;
center.Position = this.coordinate.origin + MoveCenter(tick);
@@ -37,12 +37,12 @@ namespace StgSharp.Geometries
/// </summary>
/// <param name="tick">The game tick represent time passed by</param>
/// <returns>A 3d vector representing movement</returns>
public delegate vec3d GetLocationHandler(uint tick);
public delegate vec3d GetLocationHandler(int tick);
public static unsafe class GeometryOperation
{
public static vec3d DefualtMotion(uint tick)
public static vec3d DefualtMotion(int tick)
{
return default(vec3d);
}
@@ -77,7 +77,7 @@ namespace StgSharp.Geometries
/// loading an <see cref="GetLocationHandler"/> with same function.
/// </summary>
/// <param name="tick">Time passed since current line was created.</param>
public virtual vec3d MoveBeginPoint(uint tick)
public virtual vec3d MoveBeginPoint(int tick)
{
return movBegin.Invoke(time);
}
@@ -89,12 +89,12 @@ namespace StgSharp.Geometries
/// </summary>
/// <param name="tick">Time passed since current line was created.</param>
/// <returns></returns>
public virtual vec3d MoveEndPoint(uint tick)
public virtual vec3d MoveEndPoint(int tick)
{
return movEnd.Invoke(time);
}
internal override void UpdateCoordinate(uint tick)
internal override void UpdateCoordinate(int tick)
{
beginPoint.Position = coordinate.origin + MoveBeginPoint(time);
endPoint.Position = coordinate.origin + MoveEndPoint(time);
@@ -66,7 +66,7 @@ namespace StgSharp.Geometries
public GetLocationHandler MovVertex01Operation => moveVertex0Operation;
public GetLocationHandler MovVertex02Operation => moveVertex1Operation;
public virtual vec3d MovCenter(uint tick)
public virtual vec3d MovCenter(int tick)
{
return movCenterOperation.Invoke(tick);
}
@@ -77,7 +77,7 @@ namespace StgSharp.Geometries
/// <param name="tick">Current time tick</param>
/// <returns></returns>
/// <exception cref="UnusedVertexException">Geometry overdefined</exception>
public override sealed vec3d MoveVertex2(uint tick)
public override sealed vec3d MoveVertex2(int tick)
{
throw new UnusedVertexException();
}
@@ -88,12 +88,12 @@ namespace StgSharp.Geometries
/// <param name="tick">Current time tick</param>
/// <returns></returns>
/// <exception cref="UnusedVertexException">Geometry overdefined</exception>
public override sealed vec3d MoveVertex3(uint tick)
public override sealed vec3d MoveVertex3(int tick)
{
throw new UnusedVertexException();
}
internal override sealed void UpdateCoordinate(uint tick)
internal override sealed void UpdateCoordinate(int tick)
{
}
@@ -51,7 +51,7 @@ namespace StgSharp.Geometries
/// <summary>
/// Tick time this geometry eas crested
/// </summary>
public uint BornTime => time;
public int BornTime => time;
public PartialPlainCoordinate ReferenceCoordinate => this.coordinate;
@@ -70,7 +70,7 @@ namespace StgSharp.Geometries
public abstract Plain GetPlain();
internal abstract void UpdateCoordinate(uint tick);
internal abstract void UpdateCoordinate(int tick);
//public abstract Rectangle GetRenderFrame();
}
@@ -151,29 +151,29 @@ namespace StgSharp.Geometries
vertexMat.mat.colum2);
}
public virtual vec3d MoveVertex0(uint tick)
public virtual vec3d MoveVertex0(int tick)
{
return moveVertex0Operation(tick);
}
public virtual vec3d MoveVertex1(uint tick)
public virtual vec3d MoveVertex1(int tick)
{
return moveVertex1Operation(tick);
}
public virtual vec3d MoveVertex2(uint tick)
public virtual vec3d MoveVertex2(int tick)
{
return moveVertex2Operation(tick);
}
public virtual vec3d MoveVertex3(uint tick)
public virtual vec3d MoveVertex3(int tick)
{
return moveVertex3Operation(tick);
}
internal override void UpdateCoordinate(uint tick)
internal override void UpdateCoordinate(int tick)
{
}
@@ -124,35 +124,35 @@ namespace StgSharp.Geometries
return new Plain(Vertex0, Vertex1, Vertex2);
}
public virtual vec3d movVertex01(uint tick)
public virtual vec3d movVertex01(int tick)
{
return movP01Operation.Invoke(time);
}
public virtual vec3d movVertex02(uint tick)
public virtual vec3d movVertex02(int tick)
{
return movP02Operation.Invoke(time);
}
public virtual vec3d movVertex03(uint tick)
public virtual vec3d movVertex03(int tick)
{
return movP03Operation.Invoke(time);
}
public virtual vec3d movVertex04(uint tick)
public virtual vec3d movVertex04(int tick)
{
return movP04Operation.Invoke(time);
}
public virtual vec3d movVertex05(uint tick)
public virtual vec3d movVertex05(int tick)
{
return movP05Operation.Invoke(time);
}
internal override void UpdateCoordinate(uint tick)
internal override void UpdateCoordinate(int tick)
{
uint nowTick = tick - BornTime;
int nowTick = tick - BornTime;
vertexMat.vec0 = (coordinate.origin + movVertex01(nowTick)).vec;
vertexMat.vec1 = (coordinate.origin + movVertex02(nowTick)).vec;
vertexMat.vec2 = (coordinate.origin + movVertex03(nowTick)).vec;
@@ -111,39 +111,39 @@ namespace StgSharp.Geometries
return new Plain(Vertex0, Vertex1, Vertex2);
}
public virtual vec3d movVertex0(uint tick)
public virtual vec3d movVertex0(int tick)
{
return movVertex0Operation.Invoke(time);
}
public virtual vec3d movVertex1(uint tick)
public virtual vec3d movVertex1(int tick)
{
return movVertex1Operation.Invoke(time);
}
public virtual vec3d movVertex2(uint tick)
public virtual vec3d movVertex2(int tick)
{
return movVertex2Operation.Invoke(time);
}
public virtual vec3d movVertex3(uint tick)
public virtual vec3d movVertex3(int tick)
{
return movVertex3Operation.Invoke(time);
}
public virtual vec3d movVertex4(uint tick)
public virtual vec3d movVertex4(int tick)
{
return movVertex4Operation.Invoke(time);
}
public virtual vec3d movVertex5(uint tick)
public virtual vec3d movVertex5(int tick)
{
return movVertex5Operation.Invoke(time);
}
internal override void UpdateCoordinate(uint tick)
internal override void UpdateCoordinate(int tick)
{
uint nowTick = tick - BornTime;
int nowTick = tick - BornTime;
Vector4 origin = coordinate.origin.vec;
vertexMat.vec0 = origin + movVertex0(nowTick).vec;
vertexMat.vec1 = origin + movVertex1(nowTick).vec;
@@ -53,7 +53,7 @@ namespace StgSharp.Geometries
{
}
public override sealed vec3d MoveVertex1(uint tick)
public override sealed vec3d MoveVertex1(int tick)
{
return default;
}
@@ -98,22 +98,22 @@ namespace StgSharp.Geometries
return new Plain(this.vertexMat.mat.colum0, this.vertexMat.mat.colum1, this.vertexMat.mat.colum2);
}
public virtual vec3d MovVertex01(uint tick)
public virtual vec3d MovVertex01(int tick)
{
return movVertex01Opearion.Invoke(tick);
}
public virtual vec3d MovVertex02(uint tick)
public virtual vec3d MovVertex02(int tick)
{
return movVertex02Opearion.Invoke(tick);
}
public virtual vec3d MovVertex03(uint tick)
public virtual vec3d MovVertex03(int tick)
{
return movVertex03Opearion.Invoke(tick);
}
internal override sealed void UpdateCoordinate(uint tick)
internal override sealed void UpdateCoordinate(int tick)
{
tick = time;
vertexMat.mat.colum0 = coordinate.origin.vec + MovVertex01(time).vec;
+56 -47
View File
@@ -58,22 +58,22 @@ namespace StgSharp.Graphics
internal int width;
private GLFWwindow* windowID;
internal TimeSpanProvider frameTimeProvider;
#endregion metadata
#region glapicount
private int missingAPIcount = 0;
private int problemAPIcount = 0;
#endregion glapicount
#region form main
#region form time
private short fpsCount;
internal TimeSpanProvider frameTimeProvider;
internal TimeSpanProvider fpsCountProvider = new TimeSpanProvider(1.0, TimeSpanProvider.DefaultProvider);
#endregion
#region form thread setting
private bool isSingleThread = true;
private List<FrameAsyncTask> frameAsyncTaskList = new List<FrameAsyncTask>();
#endregion form thread setting
protected Form()
{
}
@@ -129,8 +129,6 @@ namespace StgSharp.Graphics
public unsafe IntPtr WindowID => (IntPtr)windowID;
internal unsafe GLFWwindow* id => windowID;
protected FrameBufferSizeHandler FrameBufferSizeCallback
{
set
@@ -140,8 +138,26 @@ namespace StgSharp.Graphics
}
}
internal unsafe GLFWwindow* id => windowID;
internal bool IsSingleThread => isSingleThread;
public abstract void Deinit(params object[] args);
/// <summary>
/// Necessary operation to init this form.
/// </summary>
/// <param name="args"></param>
public abstract void Init(params object[] args);
/// <summary>
/// Behaviour of current form when in a frame cycle.
/// </summary>
/// <param name="args"></param>
public abstract void Main();
/// <summary>
/// Init an OpenGl context if current form has not been binded to any context. and set the context binded to
/// current form as current OpenGL context.
@@ -179,7 +195,12 @@ namespace StgSharp.Graphics
gl = new GLonRender(contextID);
}
InternalIO.glfwMakeContextCurrent(windowID);
gl.SwitchContext();
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public unsafe void PollEvents()
{
InternalIO.glfwPollEvents();
}
/// <summary>
@@ -250,33 +271,12 @@ namespace StgSharp.Graphics
public void SetSizeLimit(int minWidth, int minHeight, int maxWidth, int maxHeight)
{ InternalIO.glfwSetWindowSizeLimits(this.windowID, minWidth, minHeight, maxWidth, maxHeight); }
unsafe ~Form() { Marshal.FreeHGlobal(graphicContextID); }
public abstract void Deinit(params object[] args);
/// <summary>
/// Necessary operation to init this form.
/// </summary>
/// <param name="args"></param>
public abstract void Init(params object[] args);
/// <summary>
/// Behaviour of current form when in a render cycle. When this form
/// </summary>
/// <param name="args"></param>
public abstract void Main(params object[] args);
public unsafe void PollEvents()
{
InternalIO.glfwPollEvents();
}
#region form main
/// <summary>
/// Init this form and render it on screen, and respond with operation
/// </summary>
public unsafe void Show(params object[] args)
public unsafe void Show()
{
if (gl == null)
{
@@ -284,40 +284,46 @@ namespace StgSharp.Graphics
}
else
{
frameTimeProvider = new TimeSpanProvider(1 / 60.0, TimeSpanProvider.DefaultProvider);
if (isSingleThread)
{
while (!ShouldClose)
{
Main(args);
Main();
SwapBuffers();
PollEvents();
frameTimeProvider.WaitNextSpan();
}
}
else
{
GLonUpdate update = new GLonUpdate((GLcontext*)graphicContextID);
FrameAsyncTask renderTask = new FrameAsyncTask(update);
FrameAsyncTask updateTask = new FrameAsyncTask(update);
FrameAsyncTask updateTask = new AsyncUpdateDataTask(this);
FrameAsyncTask renderTask = new AsyncRenderFrameTask(this);
frameAsyncTaskList.Add(renderTask);
frameAsyncTaskList.Add(updateTask);
gl = update;
update.ActivatedOperationBuffer = updateTask.opBuffer;
SemaphoreSlim frameBeginSemaphore = FrameAsyncTask.CombineAsync(renderTask, updateTask);
SemaphoreSlim renderCompleteSemaphor = renderTask.StartAsync();
SemaphoreSlim updateCompleteSemaphor = updateTask.StartAsync();
while (!ShouldClose)
{
renderTask.StartAsync();
updateTask.StartAsync();
FrameAsyncTask.CombineAsync(renderTask, updateTask);
frameBeginSemaphore.Release(2);
renderCompleteSemaphor.Wait();
updateCompleteSemaphor.Wait();
SwapBuffers();
PollEvents();
FrameAsyncTask.ExchangeBuffer(updateTask, renderTask);
update.ActivatedOperationBuffer = updateTask.opBuffer;
frameTimeProvider.WaitNextSpan();
}
//TODO 对逻辑线程和渲染线程进行同步,两种gl模式包需要改名字
}
}
}
internal static unsafe void InternalSwapBuffers(FrameOperationBuffer operationBuffer, GLcontext* context)
{
IntPtr window = default;
operationBuffer.TryDequeue(out window);
InternalIO.glfwSwapBuffers((GLFWwindow*)window);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
internal void InternalDeinit(params object[] args) { Deinit(args); }
@@ -373,8 +379,11 @@ namespace StgSharp.Graphics
throw new ArgumentException("Amount of threads should be bigger than 0");
}
}
#endregion form main
unsafe ~Form() { Marshal.FreeHGlobal(graphicContextID); }
#endregion form main
}
}
+90 -19
View File
@@ -32,6 +32,7 @@ using StgSharp.Math;
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;
@@ -47,6 +48,12 @@ namespace StgSharp.Graphics
private ConcurrentQueue<IntPtr> _funcQueue;
private readonly unsafe GLcontext* currentContext;
public unsafe FrameOperationBuffer(IglFunc gl)
{
currentContext = gl.Context;
_funcQueue = new ConcurrentQueue<IntPtr>();
}
public unsafe bool CallNext()
{
if (_funcQueue.TryDequeue(out _func))
@@ -481,22 +488,60 @@ namespace StgSharp.Graphics
#endregion gl param queue
}
//TODO 任务组绑定机制有问题,现在一次只能绑定两个
//TODO 目前还不能加载任何任务
//TODO 任务的启动逻辑需要重构
internal class FrameAsyncTask
public class FrameAsyncTask
{
private SemaphoreSlim _refrshSemaphore;
private SemaphoreSlim _frameCompleteSemaphore;
private Task _task;
private FrameOperationBuffer opBuffer = new FrameOperationBuffer();
protected SemaphoreSlim _frameCompleteSemaphore = new SemaphoreSlim(0, 1);
protected SemaphoreSlim _refreshSemaphore;
private Task _task;
protected Action _taskTODO;
protected Func<bool> _terminateSignature;
internal FrameOperationBuffer opBuffer;
internal FrameAsyncTask(GLonUpdate gl)
public Action TaskTODO
{
get => _taskTODO;
set => _taskTODO = value;
}
internal FrameAsyncTask(Action action, IglFunc gl)
{
_taskTODO = action;
opBuffer = new FrameOperationBuffer(gl);
}
public static SemaphoreSlim CombineAsync(params FrameAsyncTask[] taskList)
{
if (taskList.Length == 0)
{
return null;
}
SemaphoreSlim refresh = new SemaphoreSlim(taskList.Length);
foreach (FrameAsyncTask item in taskList)
{
item._refreshSemaphore = refresh;
}
return refresh;
}
public static SemaphoreSlim CombineAsync(List<FrameAsyncTask> taskList)
{
if (taskList.Count == 0)
{
return null;
}
SemaphoreSlim refresh = new SemaphoreSlim(taskList.Count);
foreach (FrameAsyncTask item in taskList)
{
item._refreshSemaphore = refresh;
}
return refresh;
}
public static void ExchangeBuffer(FrameAsyncTask task0, FrameAsyncTask task1)
@@ -506,25 +551,51 @@ namespace StgSharp.Graphics
task1.opBuffer = cache;
}
public async Task StartAsync()
public virtual SemaphoreSlim StartAsync()
{
_task = new Task(
() =>
{
while (true)
{
_refreshSemaphore.Wait();
_taskTODO();
_frameCompleteSemaphore.Release();
}
});
_task.Start();
await _task;
return _frameCompleteSemaphore;
}
public static SemaphoreSlim CombineAsync(FrameAsyncTask task0, FrameAsyncTask task1)
}
internal sealed class AsyncUpdateDataTask : FrameAsyncTask
{
public AsyncUpdateDataTask(Form f) : base(f.Main, f.GL)
{
SemaphoreSlim refresh = new SemaphoreSlim(2);
task0._refrshSemaphore = refresh;
task1._refrshSemaphore = refresh;
return refresh;
}
public static SemaphoreSlim AsyncWait(FrameAsyncTask task0, FrameAsyncTask task1)
}
internal sealed class AsyncRenderFrameTask : FrameAsyncTask
{
public AsyncRenderFrameTask(Form f) : base(null, f.gl)
{
SemaphoreSlim refresh = new SemaphoreSlim(2);
task0._refrshSemaphore = refresh;
task1._refrshSemaphore = refresh;
return refresh;
TaskTODO = new (
() =>
{
while (true)
{
FrameOperation();
}
});
}
private void FrameOperation()
{
while (opBuffer.CallNext()){}
}
}
@@ -128,6 +128,7 @@ namespace StgSharp.Graphics
#endregion texture setting
}
public enum Filter
@@ -149,7 +149,6 @@ namespace StgSharp.Graphics
}
//TODO 发现一个大问题,paramQueue大多数时候取出的是数组,不是数组句柄,也就是说其内存将被长期固定且不能回收,这是内存泄漏
public unsafe class glArrayHandle
{
+1 -4
View File
@@ -223,7 +223,7 @@ namespace StgSharp.Graphics
default:
InternalIO.InternalWriteLog(
$"{($"Parameter error in parameter {nameof(type)} method DrawElements. ")}{($"Only {typeof(uint).Name},{typeof(ushort).Name},{typeof(byte).Name} types are suporrted.")}",
$"{$"Parameter error in parameter {nameof(type)} method DrawElements. "}{$"Only {typeof(uint).Name},{typeof(ushort).Name},{typeof(byte).Name} types are suporrted."}",
LogType.Error);
return;
}
@@ -333,9 +333,6 @@ namespace StgSharp.Graphics
api->glEnableVertexAttribArray(index);
}
void IglFunc.SwitchContext()
{
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
void IglFunc.TextureImage2d<T>(int target, int level, uint internalformat, uint width, uint height, uint format, uint type, glHandle pixels)
+2 -11
View File
@@ -48,14 +48,9 @@ namespace StgSharp.Graphics
private GLcontext* api;
private FrameOperationBuffer frameOpBuffer;
private glSHandle unupdatedFrame = glSHandle.Alloc(0);
internal GLonUpdate(GLcontext* context)
{
if (frameOpBuffer == null)
{
frameOpBuffer = new FrameOperationBuffer();
}
api = context;
}
@@ -263,7 +258,7 @@ namespace StgSharp.Graphics
default:
InternalIO.InternalWriteLog(
$"{($"Parameter error in parameter {type} method DrawElements. ")}{($"Only {TypeCode.Byte}, {TypeCode.UInt16}, {TypeCode.UInt32} types are suporrted.")}",
$"{$"Parameter error in parameter {type} method DrawElements. "}{$"Only {TypeCode.Byte}, {TypeCode.UInt16}, {TypeCode.UInt32} types are suporrted."}",
LogType.Error);
return;
}
@@ -369,9 +364,6 @@ namespace StgSharp.Graphics
frameOpBuffer.MethodEnqueue(SetVertexArrayPtr);
}
void IglFunc.SwitchContext()
{
}
unsafe void IglFunc.TextureImage2d<T>(int target, int level, uint internalformat, uint width, uint height, uint format, uint type, glHandle pixels)
{
@@ -404,8 +396,7 @@ namespace StgSharp.Graphics
frameOpBuffer.MethodEnqueue(ViewPortPtr);
}
GLcontext* IglFunc.Context
=> api;
GLcontext* IglFunc.Context => api;
}
}
@@ -997,7 +997,7 @@ namespace StgSharp.Graphics
catch (Exception ex)
{
InternalIO.InternalWriteLog(
$"{($"Failed to convert the api {typeof(T).Name}.\n")}{ex.Message}", LogType.Warning);
$"{$"Failed to convert the api {typeof(T).Name}.\n"}{ex.Message}", LogType.Warning);
return default;
}
}
-1
View File
@@ -331,7 +331,6 @@ namespace StgSharp.Graphics
internal void frameworkHandleEnqueue(IntPtr handle, params M128[] param);
internal void SwitchContext();
}
}
@@ -79,6 +79,10 @@ namespace StgSharpDebug.Logic
public abstract void StartProvidingTime();
protected SemaphoreSlim CheckSubscriberSemaphore
{
get => _addSubscriberSemaphore;
}
protected abstract void AddSubscriberUnsynced(TimeSpanProvider subscriber);
protected abstract void RemoveSubscriberUnsynced(TimeSpanProvider subscriber);
+52 -9
View File
@@ -32,6 +32,7 @@ using StgSharpDebug.Logic;
using System;
using System.Linq;
using System.Threading;
namespace StgSharp
{
@@ -48,7 +49,8 @@ namespace StgSharp
private long _spanBegin;
private readonly long _spanLength;
private bool _subscribed;
private Counter<uint> timeSpanCount = new Counter<uint>(0, 1, 1);
private Counter<int> timeSpanCount = new Counter<int>(-1, 1, 1);
private SemaphoreSlim _refreshSemaphore = new SemaphoreSlim(0,1);
/// <summary>
/// Create a new <see cref="TimeSpanProvider"/> and define the length of time span. Length of a single time span is defined in microseconds.
@@ -61,19 +63,36 @@ namespace StgSharp
provider.AddSubscriber(this);
_subscribed = true;
}
/// <summary>
/// Create a new <see cref="TimeSpanProvider"/> and define the length of time span.
/// Length of a single time span is defined in seconds.
/// </summary>
/// <param name="spanLength"></param>
/// <parma name="provider"></parma>
public TimeSpanProvider(double spanLength, TimeSourceProviderBase provider)
{
_spanLength = ((int)spanLength) * 1000L * 1000L; _spanBegin = -_spanLength;
provider.AddSubscriber(this);
_subscribed = true;
}
/// <summary>
/// Create a new <see cref="TimeSpanProvider"/> and define the length of time span. Length of a single time span is defined in microseconds.
/// </summary>
/// <param name="spanLength"></param>
/// <parma name="provider"></parma>
public TimeSpanProvider(long spanLength, uint maxSpan, TimeSourceProviderBase provider)
public TimeSpanProvider(long spanLength, int maxSpan, TimeSourceProviderBase provider)
{
_spanLength = spanLength;
if (maxSpan <= 0)
{
maxSpan = int.MaxValue;
}
_spanLength = spanLength; _spanBegin = -_spanLength;
provider.AddSubscriber(this);
_subscribed = true;
}
/// <summary>
/// Time source provider provided in <see cref="StgSharp"/> internal framework.
/// </summary>
@@ -105,15 +124,39 @@ namespace StgSharp
{
_spanBegin = microseconds;
timeSpanCount++;
}
if (timeSpanCount > _maxSpanCount)
{
return false;
try
{
_refreshSemaphore.Release();
}
catch(SemaphoreFullException ex)
{
if (_frameUpdateMissCallback != null)
{
_frameUpdateMissCallback(ex);
}
}
if (timeSpanCount > _maxSpanCount)
{
return false;
}
}
return true;
}
public static implicit operator uint(TimeSpanProvider provider)
private Action<SemaphoreFullException> _frameUpdateMissCallback = null;
public Action<SemaphoreFullException> FrameUpdateMissCallback
{
get { return _frameUpdateMissCallback; }
set { _frameUpdateMissCallback = value;}
}
public void WaitNextSpan()
{
_refreshSemaphore.Wait();
}
public static implicit operator int(TimeSpanProvider provider)
{
return provider.timeSpanCount.Value;
}
+1 -1
View File
@@ -119,7 +119,7 @@ namespace StgSharp.Math
public override string ToString()
{
InternalTranspose();
return $"{($"[{mat.m00},{mat.m01},{mat.m02},{mat.m03}],")}{($"[{mat.m10},{mat.m11},{mat.m12},{mat.m13}]")}";
return $"{$"[{mat.m00},{mat.m01},{mat.m02},{mat.m03}],"}{$"[{mat.m10},{mat.m11},{mat.m12},{mat.m13}]"}";
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
@@ -50,6 +50,18 @@
Width of this form, represent in <see cref="T:System.Int32"/>
</summary>
</member>
<member name="M:StgSharp.Graphics.Form.Init(System.Object[])">
<summary>
Necessary operation to init this form.
</summary>
<param name="args"></param>
</member>
<member name="M:StgSharp.Graphics.Form.Main">
<summary>
Behaviour of current form when in a frame cycle.
</summary>
<param name="args"></param>
</member>
<member name="M:StgSharp.Graphics.Form.MakeAsCurrentContext">
<summary>
Init an OpenGl context if current form has not been binded to any context. and set the context binded to
@@ -99,19 +111,7 @@
<param name="maxWidth">Maximum width of curent form</param>
<param name="maxHeight">Maximum height of current form</param>
</member>
<member name="M:StgSharp.Graphics.Form.Init(System.Object[])">
<summary>
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[])">
<member name="M:StgSharp.Graphics.Form.Show">
<summary>
Init this form and render it on screen, and respond with operation
</summary>
@@ -137,13 +137,6 @@
<param name="count">Amount of EBO to be created.</param>
<returns></returns>
</member>
<member name="M:StgSharp.Graphics.Form.CreateVertexArray(System.Int32)">
<summary>
Create a set of <see cref="T:StgSharp.Graphics.VertexArray"/>.
</summary>
<param name="count">Amount of VAO to be crated.</param>
<returns></returns>
</member>
<member name="M:StgSharp.Graphics.Form.CreateTexture(System.Int32)">
<summary>
Create a sets of <see cref="T:StgSharp.Graphics.Texture"/>
@@ -151,6 +144,13 @@
<param name="count">Amount of textures to be crated.</param>
<returns></returns>
</member>
<member name="M:StgSharp.Graphics.Form.CreateVertexArray(System.Int32)">
<summary>
Create a set of <see cref="T:StgSharp.Graphics.VertexArray"/>.
</summary>
<param name="count">Amount of VAO to be crated.</param>
<returns></returns>
</member>
<member name="M:StgSharp.Graphics.Form.CreateVertexBuffer(System.Int32)">
<summary>
Create aset of <see cref="T:StgSharp.Graphics.VertexBuffer"/>.
@@ -273,11 +273,6 @@
Inti a shader with no program attached.
</summary>
</member>
<member name="M:StgSharp.Graphics.ShaderProgram.Link">
<summary>
Link the shader to current context.
</summary>
</member>
<member name="M:StgSharp.Graphics.ShaderProgram.GetUniform``1(System.String)">
<summary>
Get a uniform form current shader,
@@ -302,6 +297,11 @@
<param name="name">Name of the Uniform in shader code</param>
<returns></returns>
</member>
<member name="M:StgSharp.Graphics.ShaderProgram.Link">
<summary>
Link the shader to current context.
</summary>
</member>
<member name="M:StgSharp.Graphics.ShaderProgram.Use">
<summary>
Let the current context use this shader.
@@ -466,17 +466,6 @@
</summary>
<param name="form"></param>
</member>
<member name="M:StgSharp.Graphics.IglFunc.SetValue(StgSharp.Graphics.Uniform{System.Single,System.Single,System.Single,System.Single},System.Single,System.Single,System.Single,System.Single)">
<summary>
Set data value to a float <see cref="T:StgSharp.Graphics.Uniform`4"/>,
all types of parameters are float.
</summary>
<param name="uniform">The <see cref="T:StgSharp.Graphics.Uniform`4"/> target</param>
<param name="v0">The first value to be set</param>
<param name="v1">The second value to be set</param>
<param name="v2">The third value to be set</param>
<param name="v3">The forth value to be set</param>
</member>
<member name="M:StgSharp.Graphics.IglFunc.SetValue(StgSharp.Graphics.Uniform{System.Single,System.Single,System.Single,System.Single},StgSharp.Math.Vec4d)">
<summary>
Set data value to a float <see cref="T:StgSharp.Graphics.Uniform`4"/>,
@@ -485,25 +474,6 @@
<param name="uniform">The <see cref="T:StgSharp.Graphics.Uniform`4"/> target</param>
<param name="vec">A <see cref="T:StgSharp.Math.Vec4d"/> packing four parameters of the uniform </param>
</member>
<member name="M:StgSharp.Graphics.IglFunc.SetValue(StgSharp.Graphics.Uniform{System.Single,System.Single,System.Single},System.Single,System.Single,System.Single)">
<summary>
Set data value to a float <see cref="T:StgSharp.Graphics.Uniform`3"/>,
all types of parameters are float.
</summary>
<param name="uniform">The <see cref="T:StgSharp.Graphics.Uniform`3"/> target</param>
<param name="v0">The first value to be set</param>
<param name="v1">The second value to be set</param>
<param name="v2">The third value to be set</param>
</member>
<member name="M:StgSharp.Graphics.IglFunc.SetValue(StgSharp.Graphics.Uniform{System.Single,System.Single},System.Single,System.Single)">
<summary>
Set data value to a float <see cref="T:StgSharp.Graphics.Uniform`2"/>,
all types of parameters are float.
</summary>
<param name="uniform">The <see cref="T:StgSharp.Graphics.Uniform`2"/> target</param>
<param name="v0">The first value to be set</param>
<param name="v1">The second value to be set</param>
</member>
<member name="M:StgSharp.Graphics.IglFunc.SetValue(StgSharp.Graphics.Uniform{System.Single},System.Single)">
<summary>
Set data value to a float <see cref="T:StgSharp.Graphics.Uniform`1"/>,
@@ -528,6 +498,36 @@
<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.SetValue(StgSharp.Graphics.Uniform{System.Single,System.Single},System.Single,System.Single)">
<summary>
Set data value to a float <see cref="T:StgSharp.Graphics.Uniform`2"/>,
all types of parameters are float.
</summary>
<param name="uniform">The <see cref="T:StgSharp.Graphics.Uniform`2"/> target</param>
<param name="v0">The first value to be set</param>
<param name="v1">The second value to be set</param>
</member>
<member name="M:StgSharp.Graphics.IglFunc.SetValue(StgSharp.Graphics.Uniform{System.Single,System.Single,System.Single},System.Single,System.Single,System.Single)">
<summary>
Set data value to a float <see cref="T:StgSharp.Graphics.Uniform`3"/>,
all types of parameters are float.
</summary>
<param name="uniform">The <see cref="T:StgSharp.Graphics.Uniform`3"/> target</param>
<param name="v0">The first value to be set</param>
<param name="v1">The second value to be set</param>
<param name="v2">The third value to be set</param>
</member>
<member name="M:StgSharp.Graphics.IglFunc.SetValue(StgSharp.Graphics.Uniform{System.Single,System.Single,System.Single,System.Single},System.Single,System.Single,System.Single,System.Single)">
<summary>
Set data value to a float <see cref="T:StgSharp.Graphics.Uniform`4"/>,
all types of parameters are float.
</summary>
<param name="uniform">The <see cref="T:StgSharp.Graphics.Uniform`4"/> target</param>
<param name="v0">The first value to be set</param>
<param name="v1">The second value to be set</param>
<param name="v2">The third value to be set</param>
<param name="v3">The forth value to be set</param>
</member>
<member name="M:StgSharp.Graphics.IglFunc.SetVertexAttribute(System.UInt32,System.Int32,System.TypeCode,System.Boolean,System.UInt32,System.Int32)">
<summary>
Set how a shader parameter read data from a VBO.
@@ -654,7 +654,7 @@
<param name="tick">The game tick represent time passed by</param>
<returns>A 3d vector representing movement</returns>
</member>
<member name="M:StgSharp.Geometries.Line.MoveBeginPoint(System.UInt32)">
<member name="M:StgSharp.Geometries.Line.MoveBeginPoint(System.Int32)">
<summary>
Move begin side of a line.
It is recommended to override this function rather than
@@ -662,7 +662,7 @@
</summary>
<param name="tick">Time passed since current line was created.</param>
</member>
<member name="M:StgSharp.Geometries.Line.MoveEndPoint(System.UInt32)">
<member name="M:StgSharp.Geometries.Line.MoveEndPoint(System.Int32)">
<summary>
Move end side of a line.
It is recommended to override this function rather than
@@ -671,7 +671,7 @@
<param name="tick">Time passed since current line was created.</param>
<returns></returns>
</member>
<member name="M:StgSharp.Geometries.Parallelogram.MoveVertex2(System.UInt32)">
<member name="M:StgSharp.Geometries.Parallelogram.MoveVertex2(System.Int32)">
<summary>
Move the third vertix. this is a useless method for Parallelograms.
</summary>
@@ -679,7 +679,7 @@
<returns></returns>
<exception cref="T:StgSharp.Geometries.UnusedVertexException">Geometry overdefined</exception>
</member>
<member name="M:StgSharp.Geometries.Parallelogram.MoveVertex3(System.UInt32)">
<member name="M:StgSharp.Geometries.Parallelogram.MoveVertex3(System.Int32)">
<summary>
Move the third vertix. This method is useless for Parallelograms.
</summary>
@@ -692,6 +692,11 @@
平面几何体。包含三角形,对称四边形,自由多边形等。最多可由16个点参数定义。
</summary>
</member>
<member name="P:StgSharp.Geometries.PlainGeometry.BornTime">
<summary>
Tick time this geometry eas crested
</summary>
</member>
<member name="M:StgSharp.Geometries.PlainGeometry.GetAllSides">
<summary>
Get all sides of this <see cref="T:StgSharp.Geometries.PlainGeometry"/>.
@@ -704,11 +709,6 @@
</summary>
<returns></returns>
</member>
<member name="P:StgSharp.Geometries.PlainGeometry.BornTime">
<summary>
Tick time this geometry eas crested
</summary>
</member>
<member name="M:StgSharp.Geometries.Point.Update(System.UInt32)">
<summary>
Update the coordinate of the point. If this is a moving point,
@@ -778,25 +778,41 @@
The second <see cref="T:System.Boolean"/> value.
</summary>
</member>
<member name="T:StgSharp.TimeProvider">
<member name="T:StgSharp.TimeSpanProvider">
<summary>
A microsecond-accuracy timer. It will refresh every a certain time span.
</summary>
</member>
<member name="M:StgSharp.TimeProvider.#ctor(System.Int64,StgSharp.TimeSourceProvider)">
<member name="M:StgSharp.TimeSpanProvider.#ctor(System.Int64,StgSharpDebug.Logic.TimeSourceProviderBase)">
<summary>
Create a new <see cref="T:StgSharp.TimeProvider"/> and define the length of time span. Length of a single time span is defined in microseconds.
Create a new <see cref="T:StgSharp.TimeSpanProvider"/> and define the length of time span. Length of a single time span is defined in microseconds.
</summary>
<param name="spanLength"></param>
<parma name="provider"></parma>
</member>
<member name="P:StgSharp.TimeProvider.DefaultProvider">
<member name="M:StgSharp.TimeSpanProvider.#ctor(System.Double,StgSharpDebug.Logic.TimeSourceProviderBase)">
<summary>
Create a new <see cref="T:StgSharp.TimeSpanProvider"/> and define the length of time span.
Length of a single time span is defined in seconds.
</summary>
<param name="spanLength"></param>
<parma name="provider"></parma>
</member>
<member name="M:StgSharp.TimeSpanProvider.#ctor(System.Int64,System.Int32,StgSharpDebug.Logic.TimeSourceProviderBase)">
<summary>
Create a new <see cref="T:StgSharp.TimeSpanProvider"/> and define the length of time span. Length of a single time span is defined in microseconds.
</summary>
<param name="spanLength"></param>
<parma name="provider"></parma>
</member>
<member name="P:StgSharp.TimeSpanProvider.DefaultProvider">
<summary>
Time source provider provided in <see cref="T:StgSharp.StgSharp"/> internal framework.
</summary>
</member>
<member name="P:StgSharp.TimeProvider.SpanRefreshCallback">
<member name="P:StgSharp.TimeSpanProvider.SpanRefreshCallback">
<summary>
The method this <see cref="T:StgSharp.TimeProvider"/> will call every time a new time span started.
The method this <see cref="T:StgSharp.TimeSpanProvider"/> will call every time a new time span started.
</summary>
</member>
<member name="T:StgSharp.Math.GLclampf">
@@ -849,18 +865,18 @@
<param name="y"></param>
<returns>Returns the value of x^y</returns>
</member>
<member name="M:StgSharp.Math.Scaler.Random">
<summary>
</summary>
<returns></returns>
</member>
<member name="M:StgSharp.Math.Scaler.LowProceisionRandom">
<summary>
returns a random float number between 0 and 1.
</summary>
<returns></returns>
</member>
<member name="M:StgSharp.Math.Scaler.Random">
<summary>
</summary>
<returns></returns>
</member>
<member name="M:StgSharp.Math.Scaler.RandomSeed">
<summary>
Generates a random seed in int value.
@@ -44,7 +44,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+15bf989285b01c5617b5f5612667e0da6a2b1781")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+0c50c6282e58714d20a68c1b2346c6dcec49af41")]
[assembly: System.Reflection.AssemblyProductAttribute("StgSharp")]
[assembly: System.Reflection.AssemblyTitleAttribute("StgSharp")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
@@ -1 +1 @@
a5fb7efba2f765dd708647c8b1db6590919a361aa8faa70d0f2be4d86bb8ef88
2d5ea9ef2f157207bf6ee00ab84f624a9e25fd320dfc78958779a7efb72477d0
@@ -1 +1 @@
{"documents":{"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\*":"https://raw.githubusercontent.com/Nitload-NSI/CCD_Github/15bf989285b01c5617b5f5612667e0da6a2b1781/*"}}
{"documents":{"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\*":"https://raw.githubusercontent.com/Nitload-NSI/CCD_Github/0c50c6282e58714d20a68c1b2346c6dcec49af41/*"}}
@@ -50,6 +50,18 @@
Width of this form, represent in <see cref="T:System.Int32"/>
</summary>
</member>
<member name="M:StgSharp.Graphics.Form.Init(System.Object[])">
<summary>
Necessary operation to init this form.
</summary>
<param name="args"></param>
</member>
<member name="M:StgSharp.Graphics.Form.Main">
<summary>
Behaviour of current form when in a frame cycle.
</summary>
<param name="args"></param>
</member>
<member name="M:StgSharp.Graphics.Form.MakeAsCurrentContext">
<summary>
Init an OpenGl context if current form has not been binded to any context. and set the context binded to
@@ -99,19 +111,7 @@
<param name="maxWidth">Maximum width of curent form</param>
<param name="maxHeight">Maximum height of current form</param>
</member>
<member name="M:StgSharp.Graphics.Form.Init(System.Object[])">
<summary>
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[])">
<member name="M:StgSharp.Graphics.Form.Show">
<summary>
Init this form and render it on screen, and respond with operation
</summary>
@@ -137,13 +137,6 @@
<param name="count">Amount of EBO to be created.</param>
<returns></returns>
</member>
<member name="M:StgSharp.Graphics.Form.CreateVertexArray(System.Int32)">
<summary>
Create a set of <see cref="T:StgSharp.Graphics.VertexArray"/>.
</summary>
<param name="count">Amount of VAO to be crated.</param>
<returns></returns>
</member>
<member name="M:StgSharp.Graphics.Form.CreateTexture(System.Int32)">
<summary>
Create a sets of <see cref="T:StgSharp.Graphics.Texture"/>
@@ -151,6 +144,13 @@
<param name="count">Amount of textures to be crated.</param>
<returns></returns>
</member>
<member name="M:StgSharp.Graphics.Form.CreateVertexArray(System.Int32)">
<summary>
Create a set of <see cref="T:StgSharp.Graphics.VertexArray"/>.
</summary>
<param name="count">Amount of VAO to be crated.</param>
<returns></returns>
</member>
<member name="M:StgSharp.Graphics.Form.CreateVertexBuffer(System.Int32)">
<summary>
Create aset of <see cref="T:StgSharp.Graphics.VertexBuffer"/>.
@@ -273,11 +273,6 @@
Inti a shader with no program attached.
</summary>
</member>
<member name="M:StgSharp.Graphics.ShaderProgram.Link">
<summary>
Link the shader to current context.
</summary>
</member>
<member name="M:StgSharp.Graphics.ShaderProgram.GetUniform``1(System.String)">
<summary>
Get a uniform form current shader,
@@ -302,6 +297,11 @@
<param name="name">Name of the Uniform in shader code</param>
<returns></returns>
</member>
<member name="M:StgSharp.Graphics.ShaderProgram.Link">
<summary>
Link the shader to current context.
</summary>
</member>
<member name="M:StgSharp.Graphics.ShaderProgram.Use">
<summary>
Let the current context use this shader.
@@ -466,17 +466,6 @@
</summary>
<param name="form"></param>
</member>
<member name="M:StgSharp.Graphics.IglFunc.SetValue(StgSharp.Graphics.Uniform{System.Single,System.Single,System.Single,System.Single},System.Single,System.Single,System.Single,System.Single)">
<summary>
Set data value to a float <see cref="T:StgSharp.Graphics.Uniform`4"/>,
all types of parameters are float.
</summary>
<param name="uniform">The <see cref="T:StgSharp.Graphics.Uniform`4"/> target</param>
<param name="v0">The first value to be set</param>
<param name="v1">The second value to be set</param>
<param name="v2">The third value to be set</param>
<param name="v3">The forth value to be set</param>
</member>
<member name="M:StgSharp.Graphics.IglFunc.SetValue(StgSharp.Graphics.Uniform{System.Single,System.Single,System.Single,System.Single},StgSharp.Math.Vec4d)">
<summary>
Set data value to a float <see cref="T:StgSharp.Graphics.Uniform`4"/>,
@@ -485,25 +474,6 @@
<param name="uniform">The <see cref="T:StgSharp.Graphics.Uniform`4"/> target</param>
<param name="vec">A <see cref="T:StgSharp.Math.Vec4d"/> packing four parameters of the uniform </param>
</member>
<member name="M:StgSharp.Graphics.IglFunc.SetValue(StgSharp.Graphics.Uniform{System.Single,System.Single,System.Single},System.Single,System.Single,System.Single)">
<summary>
Set data value to a float <see cref="T:StgSharp.Graphics.Uniform`3"/>,
all types of parameters are float.
</summary>
<param name="uniform">The <see cref="T:StgSharp.Graphics.Uniform`3"/> target</param>
<param name="v0">The first value to be set</param>
<param name="v1">The second value to be set</param>
<param name="v2">The third value to be set</param>
</member>
<member name="M:StgSharp.Graphics.IglFunc.SetValue(StgSharp.Graphics.Uniform{System.Single,System.Single},System.Single,System.Single)">
<summary>
Set data value to a float <see cref="T:StgSharp.Graphics.Uniform`2"/>,
all types of parameters are float.
</summary>
<param name="uniform">The <see cref="T:StgSharp.Graphics.Uniform`2"/> target</param>
<param name="v0">The first value to be set</param>
<param name="v1">The second value to be set</param>
</member>
<member name="M:StgSharp.Graphics.IglFunc.SetValue(StgSharp.Graphics.Uniform{System.Single},System.Single)">
<summary>
Set data value to a float <see cref="T:StgSharp.Graphics.Uniform`1"/>,
@@ -528,6 +498,36 @@
<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.SetValue(StgSharp.Graphics.Uniform{System.Single,System.Single},System.Single,System.Single)">
<summary>
Set data value to a float <see cref="T:StgSharp.Graphics.Uniform`2"/>,
all types of parameters are float.
</summary>
<param name="uniform">The <see cref="T:StgSharp.Graphics.Uniform`2"/> target</param>
<param name="v0">The first value to be set</param>
<param name="v1">The second value to be set</param>
</member>
<member name="M:StgSharp.Graphics.IglFunc.SetValue(StgSharp.Graphics.Uniform{System.Single,System.Single,System.Single},System.Single,System.Single,System.Single)">
<summary>
Set data value to a float <see cref="T:StgSharp.Graphics.Uniform`3"/>,
all types of parameters are float.
</summary>
<param name="uniform">The <see cref="T:StgSharp.Graphics.Uniform`3"/> target</param>
<param name="v0">The first value to be set</param>
<param name="v1">The second value to be set</param>
<param name="v2">The third value to be set</param>
</member>
<member name="M:StgSharp.Graphics.IglFunc.SetValue(StgSharp.Graphics.Uniform{System.Single,System.Single,System.Single,System.Single},System.Single,System.Single,System.Single,System.Single)">
<summary>
Set data value to a float <see cref="T:StgSharp.Graphics.Uniform`4"/>,
all types of parameters are float.
</summary>
<param name="uniform">The <see cref="T:StgSharp.Graphics.Uniform`4"/> target</param>
<param name="v0">The first value to be set</param>
<param name="v1">The second value to be set</param>
<param name="v2">The third value to be set</param>
<param name="v3">The forth value to be set</param>
</member>
<member name="M:StgSharp.Graphics.IglFunc.SetVertexAttribute(System.UInt32,System.Int32,System.TypeCode,System.Boolean,System.UInt32,System.Int32)">
<summary>
Set how a shader parameter read data from a VBO.
@@ -654,7 +654,7 @@
<param name="tick">The game tick represent time passed by</param>
<returns>A 3d vector representing movement</returns>
</member>
<member name="M:StgSharp.Geometries.Line.MoveBeginPoint(System.UInt32)">
<member name="M:StgSharp.Geometries.Line.MoveBeginPoint(System.Int32)">
<summary>
Move begin side of a line.
It is recommended to override this function rather than
@@ -662,7 +662,7 @@
</summary>
<param name="tick">Time passed since current line was created.</param>
</member>
<member name="M:StgSharp.Geometries.Line.MoveEndPoint(System.UInt32)">
<member name="M:StgSharp.Geometries.Line.MoveEndPoint(System.Int32)">
<summary>
Move end side of a line.
It is recommended to override this function rather than
@@ -671,7 +671,7 @@
<param name="tick">Time passed since current line was created.</param>
<returns></returns>
</member>
<member name="M:StgSharp.Geometries.Parallelogram.MoveVertex2(System.UInt32)">
<member name="M:StgSharp.Geometries.Parallelogram.MoveVertex2(System.Int32)">
<summary>
Move the third vertix. this is a useless method for Parallelograms.
</summary>
@@ -679,7 +679,7 @@
<returns></returns>
<exception cref="T:StgSharp.Geometries.UnusedVertexException">Geometry overdefined</exception>
</member>
<member name="M:StgSharp.Geometries.Parallelogram.MoveVertex3(System.UInt32)">
<member name="M:StgSharp.Geometries.Parallelogram.MoveVertex3(System.Int32)">
<summary>
Move the third vertix. This method is useless for Parallelograms.
</summary>
@@ -692,6 +692,11 @@
平面几何体。包含三角形,对称四边形,自由多边形等。最多可由16个点参数定义。
</summary>
</member>
<member name="P:StgSharp.Geometries.PlainGeometry.BornTime">
<summary>
Tick time this geometry eas crested
</summary>
</member>
<member name="M:StgSharp.Geometries.PlainGeometry.GetAllSides">
<summary>
Get all sides of this <see cref="T:StgSharp.Geometries.PlainGeometry"/>.
@@ -704,11 +709,6 @@
</summary>
<returns></returns>
</member>
<member name="P:StgSharp.Geometries.PlainGeometry.BornTime">
<summary>
Tick time this geometry eas crested
</summary>
</member>
<member name="M:StgSharp.Geometries.Point.Update(System.UInt32)">
<summary>
Update the coordinate of the point. If this is a moving point,
@@ -778,25 +778,41 @@
The second <see cref="T:System.Boolean"/> value.
</summary>
</member>
<member name="T:StgSharp.TimeProvider">
<member name="T:StgSharp.TimeSpanProvider">
<summary>
A microsecond-accuracy timer. It will refresh every a certain time span.
</summary>
</member>
<member name="M:StgSharp.TimeProvider.#ctor(System.Int64,StgSharp.TimeSourceProvider)">
<member name="M:StgSharp.TimeSpanProvider.#ctor(System.Int64,StgSharpDebug.Logic.TimeSourceProviderBase)">
<summary>
Create a new <see cref="T:StgSharp.TimeProvider"/> and define the length of time span. Length of a single time span is defined in microseconds.
Create a new <see cref="T:StgSharp.TimeSpanProvider"/> and define the length of time span. Length of a single time span is defined in microseconds.
</summary>
<param name="spanLength"></param>
<parma name="provider"></parma>
</member>
<member name="P:StgSharp.TimeProvider.DefaultProvider">
<member name="M:StgSharp.TimeSpanProvider.#ctor(System.Double,StgSharpDebug.Logic.TimeSourceProviderBase)">
<summary>
Create a new <see cref="T:StgSharp.TimeSpanProvider"/> and define the length of time span.
Length of a single time span is defined in seconds.
</summary>
<param name="spanLength"></param>
<parma name="provider"></parma>
</member>
<member name="M:StgSharp.TimeSpanProvider.#ctor(System.Int64,System.Int32,StgSharpDebug.Logic.TimeSourceProviderBase)">
<summary>
Create a new <see cref="T:StgSharp.TimeSpanProvider"/> and define the length of time span. Length of a single time span is defined in microseconds.
</summary>
<param name="spanLength"></param>
<parma name="provider"></parma>
</member>
<member name="P:StgSharp.TimeSpanProvider.DefaultProvider">
<summary>
Time source provider provided in <see cref="T:StgSharp.StgSharp"/> internal framework.
</summary>
</member>
<member name="P:StgSharp.TimeProvider.SpanRefreshCallback">
<member name="P:StgSharp.TimeSpanProvider.SpanRefreshCallback">
<summary>
The method this <see cref="T:StgSharp.TimeProvider"/> will call every time a new time span started.
The method this <see cref="T:StgSharp.TimeSpanProvider"/> will call every time a new time span started.
</summary>
</member>
<member name="T:StgSharp.Math.GLclampf">
@@ -849,18 +865,18 @@
<param name="y"></param>
<returns>Returns the value of x^y</returns>
</member>
<member name="M:StgSharp.Math.Scaler.Random">
<summary>
</summary>
<returns></returns>
</member>
<member name="M:StgSharp.Math.Scaler.LowProceisionRandom">
<summary>
returns a random float number between 0 and 1.
</summary>
<returns></returns>
</member>
<member name="M:StgSharp.Math.Scaler.Random">
<summary>
</summary>
<returns></returns>
</member>
<member name="M:StgSharp.Math.Scaler.RandomSeed">
<summary>
Generates a random seed in int value.
Binary file not shown.
Binary file not shown.
Binary file not shown.
-1
View File
@@ -9,7 +9,6 @@ extern char infolog[512] = { 0 };
SSCAPI void SSCDECL initGL(int majorVersion, int minorVersion)
{
glfwInit();
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, majorVersion);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, minorVersion);
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
+61 -66
View File
@@ -154,7 +154,6 @@ 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
EXTRN glfwWindowHint:PROC
EXTRN glfwGetProcAddress:PROC
EXTRN __imp___acrt_iob_func:PROC
@@ -191,7 +190,7 @@ pdata ENDS
; COMDAT pdata
pdata SEGMENT
$pdata$initGL DD imagerel $LN3
DD imagerel $LN3+96
DD imagerel $LN3+91
DD imagerel $unwind$initGL
pdata ENDS
; COMDAT pdata
@@ -375,7 +374,7 @@ _TEXT SEGMENT
$T1 = 200
readLog PROC ; COMDAT
; 66 : {
; 65 : {
$LN5:
00000 40 55 push rbp
@@ -387,7 +386,7 @@ $LN5:
00 00 lea rcx, OFFSET FLAT:__59F96598_StgSharpC@c
00016 e8 00 00 00 00 call __CheckForDebuggerJustMyCode
; 67 : infolog[511] = '\0';
; 66 : infolog[511] = '\0';
0001b b8 01 00 00 00 mov eax, 1
00020 48 69 c0 ff 01
@@ -408,13 +407,13 @@ $LN4@readLog:
00 00 mov rcx, QWORD PTR $T1[rbp]
00050 c6 04 08 00 mov BYTE PTR [rax+rcx], 0
; 68 : return &infolog;
; 67 : return &infolog;
00054 48 8d 05 00 00
00 00 lea rax, OFFSET FLAT:infolog
$LN2@readLog:
; 69 : }
; 68 : }
0005b 48 8d a5 e8 00
00 00 lea rsp, QWORD PTR [rbp+232]
@@ -430,7 +429,7 @@ _TEXT SEGMENT
out$ = 224
unloadImageData PROC ; COMDAT
; 61 : {
; 60 : {
$LN3:
00000 48 89 4c 24 08 mov QWORD PTR [rsp+8], rcx
@@ -443,7 +442,7 @@ $LN3:
00 00 lea rcx, OFFSET FLAT:__59F96598_StgSharpC@c
0001a e8 00 00 00 00 call __CheckForDebuggerJustMyCode
; 62 : free(out->pixelPtr);
; 61 : free(out->pixelPtr);
0001f 48 8b 85 e0 00
00 00 mov rax, QWORD PTR out$[rbp]
@@ -451,7 +450,7 @@ $LN3:
0002a ff 15 00 00 00
00 call QWORD PTR __imp_free
; 63 : }
; 62 : }
00030 48 8d a5 c8 00
00 00 lea rsp, QWORD PTR [rbp+200]
@@ -469,7 +468,7 @@ i$1 = 40
procName$ = 288
loadGlfuncDefault PROC ; COMDAT
; 19 : {
; 18 : {
$LN7:
00000 48 89 4c 24 08 mov QWORD PTR [rsp+8], rcx
@@ -482,29 +481,29 @@ $LN7:
00 00 lea rcx, OFFSET FLAT:__59F96598_StgSharpC@c
0001a e8 00 00 00 00 call __CheckForDebuggerJustMyCode
; 20 : void* ret = glfwGetProcAddress(procName);
; 19 : 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
; 21 : printf("%llu\n", (uint64_t)ret);
; 20 : 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
; 22 : if (ret = NULL)
; 21 : 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
; 23 : {
; 24 : *infolog = "Failed to load OpenGL api:";
; 22 : {
; 23 : *infolog = "Failed to load OpenGL api:";
0004e b8 01 00 00 00 mov eax, 1
00053 48 6b c0 00 imul rax, rax, 0
@@ -514,7 +513,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
; 25 : for (size_t i = 0; i < sizeof(procName); i++)
; 24 : 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
@@ -527,8 +526,8 @@ $LN4@loadGlfunc:
0007d 48 83 7d 28 08 cmp QWORD PTR i$1[rbp], 8
00082 73 25 jae SHORT $LN3@loadGlfunc
; 26 : {
; 27 : infolog[30 + i] = procName[i];
; 25 : {
; 26 : infolog[30 + i] = procName[i];
00084 48 8d 05 00 00
00 00 lea rax, OFFSET FLAT:infolog
@@ -541,12 +540,12 @@ $LN4@loadGlfunc:
000a0 0f b6 09 movzx ecx, BYTE PTR [rcx]
000a3 88 4c 10 1e mov BYTE PTR [rax+rdx+30], cl
; 28 : }
; 27 : }
000a7 eb c9 jmp SHORT $LN2@loadGlfunc
$LN3@loadGlfunc:
; 29 : printf("%s\n", infolog);
; 28 : printf("%s\n", infolog);
000a9 48 8d 15 00 00
00 00 lea rdx, OFFSET FLAT:infolog
@@ -555,12 +554,12 @@ $LN3@loadGlfunc:
000b7 e8 00 00 00 00 call printf
$LN5@loadGlfunc:
; 30 : }
; 31 : return (GLFWglproc)ret;
; 29 : }
; 30 : return (GLFWglproc)ret;
000bc 48 8b 45 08 mov rax, QWORD PTR ret$[rbp]
; 32 : }
; 31 : }
000c0 48 8d a5 08 01
00 00 lea rsp, QWORD PTR [rbp+264]
@@ -578,7 +577,7 @@ out$ = 232
loader$ = 240
loadImageData PROC ; COMDAT
; 52 : {
; 51 : {
$LN4:
00000 4c 89 44 24 18 mov QWORD PTR [rsp+24], r8
@@ -593,14 +592,14 @@ $LN4:
00 00 lea rcx, OFFSET FLAT:__59F96598_StgSharpC@c
00024 e8 00 00 00 00 call __CheckForDebuggerJustMyCode
; 53 : if (loader == NULL)
; 52 : 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
; 54 : {
; 55 : loader = stbi_load;
; 53 : {
; 54 : loader = stbi_load;
00033 48 8d 05 00 00
00 00 lea rax, OFFSET FLAT:stbi_load
@@ -608,8 +607,8 @@ $LN4:
00 00 mov QWORD PTR loader$[rbp], rax
$LN2@loadImageD:
; 56 : }
; 57 : out->pixelPtr = loader(location, &(out->width), &(out->height), &(out->channel), 0);
; 55 : }
; 56 : 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]
@@ -631,7 +630,7 @@ $LN2@loadImageD:
00 00 mov rcx, QWORD PTR out$[rbp]
00080 48 89 41 10 mov QWORD PTR [rcx+16], rax
; 58 : }
; 57 : }
00084 48 8d a5 c8 00
00 00 lea rsp, QWORD PTR [rbp+200]
@@ -650,7 +649,7 @@ context$ = 256
shaderProgram$ = 264
linkShaderProgram PROC ; COMDAT
; 35 : {
; 34 : {
$LN5:
00000 89 54 24 10 mov DWORD PTR [rsp+16], edx
@@ -675,7 +674,7 @@ $LN5:
00 00 lea rcx, OFFSET FLAT:__59F96598_StgSharpC@c
00048 e8 00 00 00 00 call __CheckForDebuggerJustMyCode
; 36 : context->LinkProgram(shaderProgram);
; 35 : context->LinkProgram(shaderProgram);
0004d 8b 8d 08 01 00
00 mov ecx, DWORD PTR shaderProgram$[rbp]
@@ -684,9 +683,9 @@ $LN5:
0005a ff 90 80 22 00
00 call QWORD PTR [rax+8832]
; 37 :
; 38 : int success;
; 39 : context->GetProgramiv(shaderProgram, GL_LINK_STATUS, &success);
; 36 :
; 37 : int success;
; 38 : 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
@@ -697,13 +696,13 @@ $LN5:
00076 ff 90 48 1a 00
00 call QWORD PTR [rax+6728]
; 40 : if (!success)
; 39 : if (!success)
0007c 83 7d 04 00 cmp DWORD PTR success$[rbp], 0
00080 75 28 jne SHORT $LN2@linkShader
; 41 : {
; 42 : context->GetProgramInfoLog(shaderProgram, 512, NULL, infolog);
; 40 : {
; 41 : context->GetProgramInfoLog(shaderProgram, 512, NULL, infolog);
00082 4c 8d 0d 00 00
00 00 lea r9, OFFSET FLAT:infolog
@@ -716,27 +715,27 @@ $LN5:
0009e ff 90 98 19 00
00 call QWORD PTR [rax+6552]
; 43 : return 0;
; 42 : return 0;
000a4 33 c0 xor eax, eax
000a6 eb 08 jmp SHORT $LN1@linkShader
; 44 : }
; 43 : }
000a8 eb 06 jmp SHORT $LN3@linkShader
$LN2@linkShader:
; 45 : else
; 46 : {
; 47 : return shaderProgram;
; 44 : else
; 45 : {
; 46 : return shaderProgram;
000aa 8b 85 08 01 00
00 mov eax, DWORD PTR shaderProgram$[rbp]
$LN3@linkShader:
$LN1@linkShader:
; 48 : }
; 49 : }
; 47 : }
; 48 : }
000b0 48 8b f8 mov rdi, rax
000b3 48 8d 4d e0 lea rcx, QWORD PTR [rbp-32]
@@ -777,37 +776,33 @@ $LN3:
00 00 lea rcx, OFFSET FLAT:__59F96598_StgSharpC@c
0001d e8 00 00 00 00 call __CheckForDebuggerJustMyCode
; 12 : glfwInit();
; 12 : glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, majorVersion);
00022 e8 00 00 00 00 call glfwInit
; 13 : glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, majorVersion);
00027 8b 95 e0 00 00
00022 8b 95 e0 00 00
00 mov edx, DWORD PTR majorVersion$[rbp]
0002d b9 02 20 02 00 mov ecx, 139266 ; 00022002H
00032 e8 00 00 00 00 call glfwWindowHint
00028 b9 02 20 02 00 mov ecx, 139266 ; 00022002H
0002d e8 00 00 00 00 call glfwWindowHint
; 14 : glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, minorVersion);
; 13 : glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, minorVersion);
00037 8b 95 e8 00 00
00032 8b 95 e8 00 00
00 mov edx, DWORD PTR minorVersion$[rbp]
0003d b9 03 20 02 00 mov ecx, 139267 ; 00022003H
00042 e8 00 00 00 00 call glfwWindowHint
00038 b9 03 20 02 00 mov ecx, 139267 ; 00022003H
0003d e8 00 00 00 00 call glfwWindowHint
; 15 : glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
; 14 : glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
00047 ba 01 20 03 00 mov edx, 204801 ; 00032001H
0004c b9 08 20 02 00 mov ecx, 139272 ; 00022008H
00051 e8 00 00 00 00 call glfwWindowHint
00042 ba 01 20 03 00 mov edx, 204801 ; 00032001H
00047 b9 08 20 02 00 mov ecx, 139272 ; 00022008H
0004c e8 00 00 00 00 call glfwWindowHint
; 16 : }
; 15 : }
00056 48 8d a5 c8 00
00051 48 8d a5 c8 00
00 00 lea rsp, QWORD PTR [rbp+200]
0005d 5f pop rdi
0005e 5d pop rbp
0005f c3 ret 0
00058 5f pop rdi
00059 5d pop rbp
0005a c3 ret 0
initGL ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu /ZI
Binary file not shown.
+3 -2
View File
@@ -1,3 +1,4 @@
正在创建库 D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpC.lib 和对象 D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpC.exp
LINK : warning LNK4098: 默认库“MSVCRT”与其他库的使用冲突;请使用 /NODEFAULTLIB:library
StgSharpC.c
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpC\StgSharpC.c(23,18): warning C4047: “=”:“char”与“char [27]”的间接级别不同
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpC\StgSharpC.c(67,5): warning C4047: “return”:“char *”与“char (*)[512]”的间接级别不同
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.
@@ -39,6 +39,7 @@ namespace StgSharp
{
public static unsafe partial class StgSharp
{
private static bool _inited;
/// <summary>
/// Init an instance of OpenGL program,
@@ -78,6 +78,18 @@ namespace StgSharp
private static bool vsyncActivated;
internal static GraphicAPI API = default;
public static void Init()
{
mainTimeProvider = new StgSharpTime();
MainTimeProvider.StartProvidingTime();
InternalIO.glfwInit();
}
public static void Terminate()
{
MainTimeProvider.Terminate();
}
public static void Mark(bool needConsole)
{
markCount++;
@@ -42,8 +42,11 @@ namespace StgSharp
public partial class StgSharp
{
internal static StgSharpTime mainTimeProvider;
internal static StgSharpTime MainTimeProvider=>mainTimeProvider;
}
public sealed class StgSharpTime : TimeSourceProviderBase
@@ -58,8 +61,7 @@ namespace StgSharp
{
}
public static StgSharpTime OnlyInstance
=> StgSharp.mainTimeProvider;
public static StgSharpTime OnlyInstance => StgSharp.MainTimeProvider;
public override sealed void StartProvidingTime()
{
@@ -90,10 +92,6 @@ namespace StgSharp
timeProvideThread.Start();
}
[MethodImpl(MethodImplOptions.NoOptimization)]
public static void TimerActivate(int maxFrameUpdateSensitiveTimeProviderCount)
{
}
protected override sealed void AddSubscriberUnsynced(TimeSpanProvider subscriber)
{
@@ -115,6 +113,11 @@ namespace StgSharp
while (mainProvider.IsRunning)
{
totalMS = mainProvider.ElapsedTicks / (internalFrequncy / (1000L * 1000L));
if (subscriberList.Count==0)
{
continue;
}
CheckSubscriberSemaphore.Wait();
foreach (TimeSpanProvider subscriber in subscriberList)
{
if (subscriber.CheckTime(totalMS))
@@ -122,6 +125,16 @@ namespace StgSharp
};
}
CheckSubscriberSemaphore.Release();
}
int a = 0;
}
public void Terminate()
{
lock (mainProvider)
{
mainProvider.Stop();
}
}
+7 -5
View File
@@ -1,6 +1,7 @@
//using StgSharp.Envitronment.Win32;
using StgSharp.Geometries;
using StgSharp.Graphics;
using StgSharp.Math;
using System;
@@ -46,7 +47,7 @@ namespace StgSharp
{
InternalIO.InternalWriteLog("\n\n\n", "Program start", LogType.Info);
SetRenderThreads(1);
SetRenderThreads(2);
SetMetadata(800, 600, "Hello, STG#!", IntPtr.Zero, null);
MakeAsCurrentContext();
@@ -134,7 +135,7 @@ namespace StgSharp
/**/
}
public override void Main(params object[] args)
public override void Main()
{
ProcessInput(WindowID);
@@ -155,8 +156,8 @@ namespace StgSharp
float time = (float)InternalIO.glfwGetTime();
gl.SetValue(color,
0.5f + MathF.Sin(time),
0.5f + MathF.Sin(time * 0.1f),
0.5f + MathF.Cos(time),
0.5f + MathF.Sin(time * 0.8f + 2 * Scaler.Pi / 3),
0.5f + MathF.Sin(time/* - 0.667f * 3.14f/**/)
);
@@ -178,12 +179,13 @@ namespace StgSharp
//StgSharp.TryCreatWindow();
/**/
StgSharp.Init();
StgSharp.InitGL(4, 6);
StgSharp.GlobalSetting.VSyncActivated = false;
StgSharpDemoForm demoForm = new StgSharpDemoForm();
demoForm.Init();
demoForm.Show();
StgSharp.Terminate();
/**/
/*
+1 -1
View File
@@ -11,7 +11,7 @@ uniform vec3 color;
void main()
{
gl_Position = vec4(aPos.xyz,1.0);
gl_Position = vec4(aPos.xyz,1.0) + vec4(color.xy-vec2(0.5,0.5),0.0,0.0);
TexColor = color;
TexCoord = aTextCoord;
}
@@ -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+15bf989285b01c5617b5f5612667e0da6a2b1781")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+0c50c6282e58714d20a68c1b2346c6dcec49af41")]
[assembly: System.Reflection.AssemblyProductAttribute("StgSharpDebug")]
[assembly: System.Reflection.AssemblyTitleAttribute("StgSharpDebug")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
@@ -1 +1 @@
3aa7da67b6813f3947d097a5f157a32e0cc91617596bb9e7a8770735ee78e02b
7d50eb808513f7c1246e38438c68619b8038ea6f40d8f0195814ea5f153c8520
@@ -1 +1 @@
c392364d0fdf9f80d34fdb655daec7662e4a9944698e668e912c170812c83950
89534d11606e9fa10416379029e46e1abd565a616f84922a93aa832564d2e51e
@@ -1 +1 @@
{"documents":{"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\*":"https://raw.githubusercontent.com/Nitload-NSI/CCD_Github/15bf989285b01c5617b5f5612667e0da6a2b1781/*"}}
{"documents":{"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\*":"https://raw.githubusercontent.com/Nitload-NSI/CCD_Github/0c50c6282e58714d20a68c1b2346c6dcec49af41/*"}}
@@ -50,6 +50,18 @@
Width of this form, represent in <see cref="T:System.Int32"/>
</summary>
</member>
<member name="M:StgSharp.Graphics.Form.Init(System.Object[])">
<summary>
Necessary operation to init this form.
</summary>
<param name="args"></param>
</member>
<member name="M:StgSharp.Graphics.Form.Main">
<summary>
Behaviour of current form when in a frame cycle.
</summary>
<param name="args"></param>
</member>
<member name="M:StgSharp.Graphics.Form.MakeAsCurrentContext">
<summary>
Init an OpenGl context if current form has not been binded to any context. and set the context binded to
@@ -99,19 +111,7 @@
<param name="maxWidth">Maximum width of curent form</param>
<param name="maxHeight">Maximum height of current form</param>
</member>
<member name="M:StgSharp.Graphics.Form.Init(System.Object[])">
<summary>
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[])">
<member name="M:StgSharp.Graphics.Form.Show">
<summary>
Init this form and render it on screen, and respond with operation
</summary>
@@ -137,13 +137,6 @@
<param name="count">Amount of EBO to be created.</param>
<returns></returns>
</member>
<member name="M:StgSharp.Graphics.Form.CreateVertexArray(System.Int32)">
<summary>
Create a set of <see cref="T:StgSharp.Graphics.VertexArray"/>.
</summary>
<param name="count">Amount of VAO to be crated.</param>
<returns></returns>
</member>
<member name="M:StgSharp.Graphics.Form.CreateTexture(System.Int32)">
<summary>
Create a sets of <see cref="T:StgSharp.Graphics.Texture"/>
@@ -151,6 +144,13 @@
<param name="count">Amount of textures to be crated.</param>
<returns></returns>
</member>
<member name="M:StgSharp.Graphics.Form.CreateVertexArray(System.Int32)">
<summary>
Create a set of <see cref="T:StgSharp.Graphics.VertexArray"/>.
</summary>
<param name="count">Amount of VAO to be crated.</param>
<returns></returns>
</member>
<member name="M:StgSharp.Graphics.Form.CreateVertexBuffer(System.Int32)">
<summary>
Create aset of <see cref="T:StgSharp.Graphics.VertexBuffer"/>.
@@ -273,11 +273,6 @@
Inti a shader with no program attached.
</summary>
</member>
<member name="M:StgSharp.Graphics.ShaderProgram.Link">
<summary>
Link the shader to current context.
</summary>
</member>
<member name="M:StgSharp.Graphics.ShaderProgram.GetUniform``1(System.String)">
<summary>
Get a uniform form current shader,
@@ -302,6 +297,11 @@
<param name="name">Name of the Uniform in shader code</param>
<returns></returns>
</member>
<member name="M:StgSharp.Graphics.ShaderProgram.Link">
<summary>
Link the shader to current context.
</summary>
</member>
<member name="M:StgSharp.Graphics.ShaderProgram.Use">
<summary>
Let the current context use this shader.
@@ -466,17 +466,6 @@
</summary>
<param name="form"></param>
</member>
<member name="M:StgSharp.Graphics.IglFunc.SetValue(StgSharp.Graphics.Uniform{System.Single,System.Single,System.Single,System.Single},System.Single,System.Single,System.Single,System.Single)">
<summary>
Set data value to a float <see cref="T:StgSharp.Graphics.Uniform`4"/>,
all types of parameters are float.
</summary>
<param name="uniform">The <see cref="T:StgSharp.Graphics.Uniform`4"/> target</param>
<param name="v0">The first value to be set</param>
<param name="v1">The second value to be set</param>
<param name="v2">The third value to be set</param>
<param name="v3">The forth value to be set</param>
</member>
<member name="M:StgSharp.Graphics.IglFunc.SetValue(StgSharp.Graphics.Uniform{System.Single,System.Single,System.Single,System.Single},StgSharp.Math.Vec4d)">
<summary>
Set data value to a float <see cref="T:StgSharp.Graphics.Uniform`4"/>,
@@ -485,25 +474,6 @@
<param name="uniform">The <see cref="T:StgSharp.Graphics.Uniform`4"/> target</param>
<param name="vec">A <see cref="T:StgSharp.Math.Vec4d"/> packing four parameters of the uniform </param>
</member>
<member name="M:StgSharp.Graphics.IglFunc.SetValue(StgSharp.Graphics.Uniform{System.Single,System.Single,System.Single},System.Single,System.Single,System.Single)">
<summary>
Set data value to a float <see cref="T:StgSharp.Graphics.Uniform`3"/>,
all types of parameters are float.
</summary>
<param name="uniform">The <see cref="T:StgSharp.Graphics.Uniform`3"/> target</param>
<param name="v0">The first value to be set</param>
<param name="v1">The second value to be set</param>
<param name="v2">The third value to be set</param>
</member>
<member name="M:StgSharp.Graphics.IglFunc.SetValue(StgSharp.Graphics.Uniform{System.Single,System.Single},System.Single,System.Single)">
<summary>
Set data value to a float <see cref="T:StgSharp.Graphics.Uniform`2"/>,
all types of parameters are float.
</summary>
<param name="uniform">The <see cref="T:StgSharp.Graphics.Uniform`2"/> target</param>
<param name="v0">The first value to be set</param>
<param name="v1">The second value to be set</param>
</member>
<member name="M:StgSharp.Graphics.IglFunc.SetValue(StgSharp.Graphics.Uniform{System.Single},System.Single)">
<summary>
Set data value to a float <see cref="T:StgSharp.Graphics.Uniform`1"/>,
@@ -528,6 +498,36 @@
<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.SetValue(StgSharp.Graphics.Uniform{System.Single,System.Single},System.Single,System.Single)">
<summary>
Set data value to a float <see cref="T:StgSharp.Graphics.Uniform`2"/>,
all types of parameters are float.
</summary>
<param name="uniform">The <see cref="T:StgSharp.Graphics.Uniform`2"/> target</param>
<param name="v0">The first value to be set</param>
<param name="v1">The second value to be set</param>
</member>
<member name="M:StgSharp.Graphics.IglFunc.SetValue(StgSharp.Graphics.Uniform{System.Single,System.Single,System.Single},System.Single,System.Single,System.Single)">
<summary>
Set data value to a float <see cref="T:StgSharp.Graphics.Uniform`3"/>,
all types of parameters are float.
</summary>
<param name="uniform">The <see cref="T:StgSharp.Graphics.Uniform`3"/> target</param>
<param name="v0">The first value to be set</param>
<param name="v1">The second value to be set</param>
<param name="v2">The third value to be set</param>
</member>
<member name="M:StgSharp.Graphics.IglFunc.SetValue(StgSharp.Graphics.Uniform{System.Single,System.Single,System.Single,System.Single},System.Single,System.Single,System.Single,System.Single)">
<summary>
Set data value to a float <see cref="T:StgSharp.Graphics.Uniform`4"/>,
all types of parameters are float.
</summary>
<param name="uniform">The <see cref="T:StgSharp.Graphics.Uniform`4"/> target</param>
<param name="v0">The first value to be set</param>
<param name="v1">The second value to be set</param>
<param name="v2">The third value to be set</param>
<param name="v3">The forth value to be set</param>
</member>
<member name="M:StgSharp.Graphics.IglFunc.SetVertexAttribute(System.UInt32,System.Int32,System.TypeCode,System.Boolean,System.UInt32,System.Int32)">
<summary>
Set how a shader parameter read data from a VBO.
@@ -654,7 +654,7 @@
<param name="tick">The game tick represent time passed by</param>
<returns>A 3d vector representing movement</returns>
</member>
<member name="M:StgSharp.Geometries.Line.MoveBeginPoint(System.UInt32)">
<member name="M:StgSharp.Geometries.Line.MoveBeginPoint(System.Int32)">
<summary>
Move begin side of a line.
It is recommended to override this function rather than
@@ -662,7 +662,7 @@
</summary>
<param name="tick">Time passed since current line was created.</param>
</member>
<member name="M:StgSharp.Geometries.Line.MoveEndPoint(System.UInt32)">
<member name="M:StgSharp.Geometries.Line.MoveEndPoint(System.Int32)">
<summary>
Move end side of a line.
It is recommended to override this function rather than
@@ -671,7 +671,7 @@
<param name="tick">Time passed since current line was created.</param>
<returns></returns>
</member>
<member name="M:StgSharp.Geometries.Parallelogram.MoveVertex2(System.UInt32)">
<member name="M:StgSharp.Geometries.Parallelogram.MoveVertex2(System.Int32)">
<summary>
Move the third vertix. this is a useless method for Parallelograms.
</summary>
@@ -679,7 +679,7 @@
<returns></returns>
<exception cref="T:StgSharp.Geometries.UnusedVertexException">Geometry overdefined</exception>
</member>
<member name="M:StgSharp.Geometries.Parallelogram.MoveVertex3(System.UInt32)">
<member name="M:StgSharp.Geometries.Parallelogram.MoveVertex3(System.Int32)">
<summary>
Move the third vertix. This method is useless for Parallelograms.
</summary>
@@ -692,6 +692,11 @@
平面几何体。包含三角形,对称四边形,自由多边形等。最多可由16个点参数定义。
</summary>
</member>
<member name="P:StgSharp.Geometries.PlainGeometry.BornTime">
<summary>
Tick time this geometry eas crested
</summary>
</member>
<member name="M:StgSharp.Geometries.PlainGeometry.GetAllSides">
<summary>
Get all sides of this <see cref="T:StgSharp.Geometries.PlainGeometry"/>.
@@ -704,11 +709,6 @@
</summary>
<returns></returns>
</member>
<member name="P:StgSharp.Geometries.PlainGeometry.BornTime">
<summary>
Tick time this geometry eas crested
</summary>
</member>
<member name="M:StgSharp.Geometries.Point.Update(System.UInt32)">
<summary>
Update the coordinate of the point. If this is a moving point,
@@ -778,25 +778,41 @@
The second <see cref="T:System.Boolean"/> value.
</summary>
</member>
<member name="T:StgSharp.TimeProvider">
<member name="T:StgSharp.TimeSpanProvider">
<summary>
A microsecond-accuracy timer. It will refresh every a certain time span.
</summary>
</member>
<member name="M:StgSharp.TimeProvider.#ctor(System.Int64,StgSharp.TimeSourceProvider)">
<member name="M:StgSharp.TimeSpanProvider.#ctor(System.Int64,StgSharpDebug.Logic.TimeSourceProviderBase)">
<summary>
Create a new <see cref="T:StgSharp.TimeProvider"/> and define the length of time span. Length of a single time span is defined in microseconds.
Create a new <see cref="T:StgSharp.TimeSpanProvider"/> and define the length of time span. Length of a single time span is defined in microseconds.
</summary>
<param name="spanLength"></param>
<parma name="provider"></parma>
</member>
<member name="P:StgSharp.TimeProvider.DefaultProvider">
<member name="M:StgSharp.TimeSpanProvider.#ctor(System.Double,StgSharpDebug.Logic.TimeSourceProviderBase)">
<summary>
Create a new <see cref="T:StgSharp.TimeSpanProvider"/> and define the length of time span.
Length of a single time span is defined in seconds.
</summary>
<param name="spanLength"></param>
<parma name="provider"></parma>
</member>
<member name="M:StgSharp.TimeSpanProvider.#ctor(System.Int64,System.Int32,StgSharpDebug.Logic.TimeSourceProviderBase)">
<summary>
Create a new <see cref="T:StgSharp.TimeSpanProvider"/> and define the length of time span. Length of a single time span is defined in microseconds.
</summary>
<param name="spanLength"></param>
<parma name="provider"></parma>
</member>
<member name="P:StgSharp.TimeSpanProvider.DefaultProvider">
<summary>
Time source provider provided in <see cref="T:StgSharp.StgSharp"/> internal framework.
</summary>
</member>
<member name="P:StgSharp.TimeProvider.SpanRefreshCallback">
<member name="P:StgSharp.TimeSpanProvider.SpanRefreshCallback">
<summary>
The method this <see cref="T:StgSharp.TimeProvider"/> will call every time a new time span started.
The method this <see cref="T:StgSharp.TimeSpanProvider"/> will call every time a new time span started.
</summary>
</member>
<member name="T:StgSharp.Math.GLclampf">
@@ -849,18 +865,18 @@
<param name="y"></param>
<returns>Returns the value of x^y</returns>
</member>
<member name="M:StgSharp.Math.Scaler.Random">
<summary>
</summary>
<returns></returns>
</member>
<member name="M:StgSharp.Math.Scaler.LowProceisionRandom">
<summary>
returns a random float number between 0 and 1.
</summary>
<returns></returns>
</member>
<member name="M:StgSharp.Math.Scaler.Random">
<summary>
</summary>
<returns></returns>
</member>
<member name="M:StgSharp.Math.Scaler.RandomSeed">
<summary>
Generates a random seed in int value.
+1 -1
View File
@@ -23,7 +23,7 @@ namespace StgsharpEnvDebug
throw new NotImplementedException();
}
public override void Main(object[] args)
public override void Main()
{
throw new NotImplementedException();
}
@@ -14,7 +14,7 @@ using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("StgsharpEnvDebug")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+15bf989285b01c5617b5f5612667e0da6a2b1781")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+0c50c6282e58714d20a68c1b2346c6dcec49af41")]
[assembly: System.Reflection.AssemblyProductAttribute("StgsharpEnvDebug")]
[assembly: System.Reflection.AssemblyTitleAttribute("StgsharpEnvDebug")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
@@ -1 +1 @@
2ca7ccb7ba3e43bbfc557f46ee96e48e65cf1acb0d37efdf05e0fca553d8f3e3
11db6760a69171ede0767fbd4cdd0f5c73fec99a5c6d2c7a760bada5c7ae656f