daily update on 20240828 by nitload youmu, autotexture added

This commit is contained in:
Nitload
2024-08-28 10:58:31 +08:00
parent d082071f2d
commit 1ee4e4a42f
586 changed files with 60910 additions and 123106 deletions
+21 -17
View File
@@ -29,7 +29,8 @@
//-----------------------------------------------------------------------
//-----------------------------------------------------------------------
using StgSharp.Graphics.OpenGL;
using StgSharp.Logic;
using StgSharp.Timing;
using StgSharp.Math;
using StgSharp.MVVM;
using StgSharp.MVVM.View;
@@ -45,13 +46,14 @@ using System.Threading.Tasks;
namespace StgSharp.Graphics
{
public abstract class RenderStream
public abstract class RenderStream
{
private protected (int x, int y, int z) _coordStretch;
private Camera nativeCamera;
private protected ViewPort primeArgs;
private Camera nativeCamera;
internal TimeSpanProvider _timeProvider;
public (int width, int height) Size
{
get => (Width, Height);
@@ -63,6 +65,11 @@ namespace StgSharp.Graphics
}
}
public abstract bool IsContextSharable
{
get;
}
public int Height
{
get => primeArgs.Height;
@@ -81,11 +88,6 @@ namespace StgSharp.Graphics
internal set => primeArgs.Monitor = value;
}
public abstract bool IsContextSharable
{
get;
}
public string Name
{
get => primeArgs.Name;
@@ -98,6 +100,7 @@ namespace StgSharp.Graphics
get => primeArgs;
internal set => primeArgs = value;
}
internal IntPtr CanvasHandle { get => primeArgs.ViewPortID; }
@@ -113,6 +116,11 @@ namespace StgSharp.Graphics
internal set => nativeCamera = value;
}
protected float FramePassed
{
get => _timeProvider.CurrentSpan;
}
protected int PassedFrames
{
get => _timeProvider.CurrentSpan;
@@ -123,11 +131,6 @@ namespace StgSharp.Graphics
get => _timeProvider.CurrentSecond;
}
protected float FramePassed
{
get => _timeProvider.CurrentSpan;
}
protected TimeSpanProvider TimeProvider
{
get => _timeProvider;
@@ -148,16 +151,16 @@ namespace StgSharp.Graphics
where TTarget : RenderStream, new()
{
TTarget target = new TTarget();
target.Initialize(source.Port,source._coordStretch,source._timeProvider);
target.Initialize(source.Port, source._coordStretch, source._timeProvider);
return target;
}
internal protected static void PollEvents()
protected internal static void PollEvents()
{
InternalIO.glfwPollEvents();
}
internal protected void SwapBuffers()
protected internal void SwapBuffers()
{
InternalIO.glfwSwapBuffers(CanvasHandle);
}
@@ -217,6 +220,7 @@ namespace StgSharp.Graphics
#endregion
}
}