daily uodate on 20240626 by nitload youmu[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[p
This commit is contained in:
@@ -43,11 +43,32 @@ namespace StgSharp.Logic
|
||||
}
|
||||
}
|
||||
BlueprintRunner.Run(renderLogic, ()=>ShouldClose);
|
||||
RenderStream.PollEvents();
|
||||
frameTimeProvider.WaitNextSpan();
|
||||
Interlocked.Add(ref _frameCount, 1);
|
||||
}
|
||||
}
|
||||
|
||||
private unsafe void PrivateShow()
|
||||
{
|
||||
if(0 == InternalIO.glfwWindowShouldClose(this.viewPortDisplay.ViewPortID))
|
||||
{
|
||||
frameTimeProvider.WaitNextSpan();
|
||||
Interlocked.Add(ref _frameCount, 1);
|
||||
viewPortDisplay.FlushSize();
|
||||
foreach (var item in this._globalKeyAction)
|
||||
{
|
||||
if (InternalIO.glfwGetKey(this.viewPortDisplay.ViewPortID, (int)item.Key.TargetKeyOrButtonID)
|
||||
== item.Key.TriggeredStatus)
|
||||
{
|
||||
item.Value();
|
||||
}
|
||||
}
|
||||
BlueprintRunner.Run(renderLogic, () => ShouldClose);
|
||||
RenderStream.PollEvents();
|
||||
}
|
||||
}
|
||||
|
||||
public T BuildNewRenderStream<T>(View arg, (int x, int y, int z) unitCubeSize) where T : RenderStream
|
||||
{
|
||||
if (arg.ContextName == this.Name)
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
//-----------------------------------------------------------------------
|
||||
using StgSharp.Controlling.UsrActivity;
|
||||
using StgSharp.Graphics;
|
||||
using StgSharp.Graphics.GL;
|
||||
using StgSharp.Math;
|
||||
|
||||
using System;
|
||||
@@ -96,6 +97,18 @@ namespace StgSharp.Logic
|
||||
{
|
||||
};
|
||||
_globalKeyAction = new Dictionary<KeyTrigger, Action>();
|
||||
viewPortDisplay.FrameSizeCallback = (handle, width, height)
|
||||
=>
|
||||
{
|
||||
InternalIO.glfwMakeContextCurrent(viewPortDisplay.ViewPortID);
|
||||
glFunc.Viewport(0, 0, width, height);
|
||||
PrivateShow();
|
||||
};
|
||||
viewPortDisplay.FramePostionCallback = (handle, xpos, ypos)
|
||||
=>
|
||||
{
|
||||
PrivateShow();
|
||||
};
|
||||
}
|
||||
|
||||
private void CountFps()
|
||||
|
||||
Reference in New Issue
Block a user