daily update on 20240501 by nitload youmu, tracking blueprint corupt[D[D[Dr
This commit is contained in:
@@ -28,6 +28,7 @@
|
||||
//
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
using StgSharp.Logic;
|
||||
using StgSharp.Math;
|
||||
|
||||
using System;
|
||||
@@ -41,7 +42,7 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace StgSharp.Graphics
|
||||
{
|
||||
public abstract class RenderStream
|
||||
public abstract class RenderStream: IConvertableToBlueprintNode
|
||||
{
|
||||
|
||||
private IntPtr canvasHandle;
|
||||
@@ -55,7 +56,7 @@ namespace StgSharp.Graphics
|
||||
protected string name;
|
||||
private Camera nativeCamera;
|
||||
|
||||
protected RenderStream(RenderStreamConstructArgs args)
|
||||
public RenderStream(RenderStreamConstructArgs args)
|
||||
{
|
||||
height = args.Height;
|
||||
monitor = args.Monitor;
|
||||
@@ -143,6 +144,15 @@ namespace StgSharp.Graphics
|
||||
}
|
||||
}
|
||||
|
||||
protected abstract string[] InputPortsName { get; }
|
||||
protected abstract string[] OutputPortsName { get; }
|
||||
|
||||
string[] IConvertableToBlueprintNode.InputInterfacesName => InputPortsName;
|
||||
|
||||
string[] IConvertableToBlueprintNode.OutputInterfacesName => OutputPortsName;
|
||||
|
||||
BlueprintNodeAction IConvertableToBlueprintNode.MainExecution => InternalDraw;
|
||||
|
||||
/// <summary>
|
||||
/// Set the size limit of current form
|
||||
/// </summary>
|
||||
@@ -159,7 +169,7 @@ namespace StgSharp.Graphics
|
||||
protected abstract void NativeCameraViewRange(Radius FieldOfRange,vec2d offset, (float frontDepth, float backDepth ) viewDepth );
|
||||
protected abstract void NativeCameraViewTarget(vec3d position, vec3d direction, vec3d up);
|
||||
/// <summary>
|
||||
/// Get <see cref="Uniform{Matrix44}"/> uniform from a shader.
|
||||
/// Get <see cref="Uniform{T}"/>(T is <see cref="Matrix44"/>) uniform from a shader.
|
||||
/// This uniform will be used as projection matrix of this camera.
|
||||
/// Additionally, for multi-shader rendering, each shader requires a uniform,
|
||||
/// so do not ignore return value of this method.
|
||||
@@ -174,7 +184,9 @@ namespace StgSharp.Graphics
|
||||
#endregion
|
||||
|
||||
#region internal operation
|
||||
internal abstract void InternalDraw();
|
||||
internal abstract void InternalDraw(
|
||||
in Dictionary<string, BlueprintPipeline> input,
|
||||
in Dictionary<string, BlueprintPipeline> output);
|
||||
internal abstract void InternalInit();
|
||||
internal abstract void InternalTerminate();
|
||||
#endregion
|
||||
@@ -182,8 +194,11 @@ namespace StgSharp.Graphics
|
||||
#region public operation
|
||||
protected abstract void Deinit();
|
||||
protected abstract void Init();
|
||||
protected abstract void Main();
|
||||
protected abstract void Main(
|
||||
in Dictionary<string, BlueprintPipeline> input,
|
||||
in Dictionary<string, BlueprintPipeline> output);
|
||||
protected abstract void ProcessInput();
|
||||
|
||||
#endregion
|
||||
|
||||
#region public resource generator
|
||||
@@ -191,6 +206,8 @@ namespace StgSharp.Graphics
|
||||
protected abstract Shader CreateShaderSegment(ShaderType type, int count);
|
||||
protected abstract ShaderProgram CreateShaderProgram();
|
||||
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user