new simplified timer. and little other ops

This commit is contained in:
Youmu Liu
2025-11-18 20:39:03 +08:00
parent 81a60d1cfe
commit ece12f2ea7
28 changed files with 2254 additions and 853 deletions
+3 -3
View File
@@ -120,7 +120,7 @@ namespace StgSharp.Graphics
protected float TimePassed
{
[MethodImpl(MethodImplOptions.AggressiveInlining)]
get => _timeProvider.CurrentSecond;
get => (float)_timeProvider.CurrentSecond;
}
protected TimeSpanProvider TimeProvider
@@ -147,8 +147,8 @@ namespace StgSharp.Graphics
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public abstract void SetSizeLimit(int minWidth, int minHeight, int maxWidth, int maxHeight);
public static TTarget ShareContextFrom<TSource, TTarget>([NotNull]TSource source) where TSource: RenderStream
where TTarget: RenderStream, new()
public static TTarget ShareContextFrom<TSource, TTarget>([NotNull]TSource source) where TSource : RenderStream
where TTarget : RenderStream, new()
{
TTarget target = new TTarget();
target.Initialize(source.BindedViewPortContext, source._timeProvider);