daily update on 20240901 by nitload youmu
This commit is contained in:
@@ -77,6 +77,19 @@ namespace StgSharp.MVVM.ViewModel
|
||||
() =>
|
||||
{
|
||||
};
|
||||
|
||||
viewPortDisplay.FrameSizeCallback = (handle, width, height)
|
||||
=>
|
||||
{
|
||||
InternalIO.glfwMakeContextCurrent(viewPortDisplay.ViewPortID);
|
||||
OpenGLFunction.CurrentGL.Viewport(0, 0, width, height);
|
||||
PrivateShow();
|
||||
};
|
||||
viewPortDisplay.FramePostionCallback = (handle, xpos, ypos)
|
||||
=>
|
||||
{
|
||||
PrivateShow();
|
||||
};
|
||||
}
|
||||
|
||||
protected ViewModelBase(float frameLength)
|
||||
@@ -95,17 +108,30 @@ namespace StgSharp.MVVM.ViewModel
|
||||
() =>
|
||||
{
|
||||
};
|
||||
|
||||
viewPortDisplay.FrameSizeCallback = (handle, width, height)
|
||||
=>
|
||||
{
|
||||
InternalIO.glfwMakeContextCurrent(viewPortDisplay.ViewPortID);
|
||||
OpenGLFunction.CurrentGL.Viewport(0, 0, width, height);
|
||||
PrivateShow();
|
||||
};
|
||||
viewPortDisplay.FramePostionCallback = (handle, xpos, ypos)
|
||||
=>
|
||||
{
|
||||
PrivateShow();
|
||||
};
|
||||
}
|
||||
|
||||
public ViewModelBase(ViewPort vbinding, int framespeed)
|
||||
public ViewModelBase(ViewPort vBinding, int frameSpeed)
|
||||
{
|
||||
viewPortDisplay = vbinding;
|
||||
viewPortDisplay = vBinding;
|
||||
allView = new();
|
||||
fpsCountProvider = new TimeSpanProvider(1.0, TimeSpanProvider.DefaultProvider);
|
||||
_frameSpeed = 0;
|
||||
_frameCount = 0;
|
||||
fpsCountProvider.SpanRefreshCallback = CountFps;
|
||||
long frameLength = (framespeed > 0) ? ((1000L * 1000L) / framespeed) : 0;
|
||||
long frameLength = (frameSpeed > 0) ? ((1000L * 1000L) / frameSpeed) : 0;
|
||||
frameTimeProvider = new TimeSpanProvider(
|
||||
frameLength, TimeSpanProvider.DefaultProvider
|
||||
);
|
||||
@@ -127,9 +153,9 @@ namespace StgSharp.MVVM.ViewModel
|
||||
};
|
||||
}
|
||||
|
||||
public ViewModelBase(ViewPort vbinding, float frameLength)
|
||||
public ViewModelBase(ViewPort vBinding, float frameLength)
|
||||
{
|
||||
viewPortDisplay = vbinding;
|
||||
viewPortDisplay = vBinding;
|
||||
allView = new();
|
||||
fpsCountProvider = new TimeSpanProvider(1.0, TimeSpanProvider.DefaultProvider);
|
||||
_frameSpeed = 0;
|
||||
@@ -251,12 +277,6 @@ namespace StgSharp.MVVM.ViewModel
|
||||
|
||||
public abstract void CustomizeInitialize();
|
||||
|
||||
public Action MethodLookup(string methodName)
|
||||
{
|
||||
MethodInfo method = GetType().GetMethod(methodName);
|
||||
return (method != null) ? ((Action)Delegate.CreateDelegate(typeof(Action), this, method)) : null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Resize the current form
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user