daily update on 20240628 by nitload youmu
This commit is contained in:
@@ -57,7 +57,6 @@ namespace StgSharp.Graphics.GL
|
||||
{
|
||||
internal static unsafe partial class glFunc
|
||||
{
|
||||
|
||||
private static GLcontext* context;
|
||||
|
||||
public static IntPtr CurrentContextHandle
|
||||
|
||||
@@ -197,7 +197,7 @@ namespace StgSharp.Graphics.GL
|
||||
|
||||
}
|
||||
|
||||
internal static partial class glFunc
|
||||
internal partial class glFunc
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public unsafe static void SetUniformValue
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace StgSharp.Graphics
|
||||
{
|
||||
public interface IGraphicAPIs
|
||||
{
|
||||
public IntPtr GraphicApiPackageHandle { get; }
|
||||
}
|
||||
|
||||
}
|
||||
@@ -262,28 +262,11 @@ namespace StgSharp.Logic
|
||||
|
||||
#endregion
|
||||
|
||||
public static IConvertableToBlueprintNode AsBlueprintNodeMainExecution(this BlueprintNodeMainExecution execution, string name)
|
||||
{
|
||||
if (execution == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(execution));
|
||||
}
|
||||
var attributeArray = execution.Method.GetCustomAttributes(typeof(BpNodeActionAttribute), false);
|
||||
var attri = (BpNodeActionAttribute)attributeArray[0];
|
||||
if ( attributeArray.Length < 0 || attri == null)
|
||||
{
|
||||
throw new InvalidCastException($"Delegate {nameof(execution)} is not marked by {typeof(BpNodeActionAttribute)}");
|
||||
}
|
||||
if (attri.OperationSpan <= 1)
|
||||
{
|
||||
return new DefaultConvertableToBlueprintNode();
|
||||
}
|
||||
return new CrossFrameOperation(
|
||||
|
||||
);
|
||||
}
|
||||
|
||||
}//--------------------------------- end of class -----------------------------------
|
||||
|
||||
|
||||
|
||||
public class BlueprintNodeRunException : Exception
|
||||
{
|
||||
|
||||
|
||||
@@ -12,9 +12,9 @@ namespace StgSharp.Logic
|
||||
private string[] _output;
|
||||
private int _operationSpan;
|
||||
|
||||
internal string[] InputPort => _input;
|
||||
internal string[] OutputPort => _output;
|
||||
internal int OperationSpan => _operationSpan;
|
||||
public string[] InputPort => _input;
|
||||
public string[] OutputPort => _output;
|
||||
public int OperationSpan => _operationSpan;
|
||||
|
||||
public BpNodeActionAttribute(string[] inputPort, string[] outputPort, int operationSpan)
|
||||
{
|
||||
@@ -30,13 +30,6 @@ namespace StgSharp.Logic
|
||||
this._operationSpan = 1;
|
||||
}
|
||||
|
||||
public BpNodeActionAttribute()
|
||||
{
|
||||
_input = Array.Empty<string>();
|
||||
_output = Array.Empty<string>();
|
||||
_operationSpan = 1;
|
||||
}
|
||||
|
||||
public BpNodeActionAttribute(int operationSpan)
|
||||
{
|
||||
_input = Array.Empty<string>();
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace StgSharp.Logic
|
||||
{
|
||||
public static class BpNodeConverter
|
||||
{
|
||||
public static IConvertableToBlueprintNode AsBlueprintNodeMainExecution(this BlueprintNodeOperation startUp)
|
||||
{
|
||||
if (startUp == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(startUp));
|
||||
}
|
||||
var attributeArray = startUp.Method.GetCustomAttributes(typeof(BpNodeActionAttribute), false);
|
||||
var attri = (BpNodeActionAttribute)attributeArray[0];
|
||||
if (attributeArray.Length < 0 || attri == null)
|
||||
{
|
||||
throw new InvalidCastException($"Delegate {nameof(startUp)} is not marked by {typeof(BpNodeActionAttribute)}");
|
||||
}
|
||||
return new DefaultConvertableToBlueprintNode(startUp,attri.InputPort, attri.OutputPort);
|
||||
}
|
||||
|
||||
public static IConvertableToBlueprintNode AsBlueprintNodeMainExecution(this Action startUp)
|
||||
{
|
||||
if (startUp == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(startUp));
|
||||
}
|
||||
var attributeArray = startUp.Method.GetCustomAttributes(typeof(BpNodeActionAttribute), false);
|
||||
var attri = (BpNodeActionAttribute)attributeArray[0];
|
||||
if (attributeArray.Length < 0 || attri == null)
|
||||
{
|
||||
throw new InvalidCastException($"Delegate {nameof(startUp)} is not marked by {typeof(BpNodeActionAttribute)}");
|
||||
}
|
||||
return new CrossFrameOperation(startUp,attri.OperationSpan);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -25,7 +25,7 @@ namespace StgSharp.Logic
|
||||
{
|
||||
private string[] _input;
|
||||
private string[] _output;
|
||||
private BlueprintNodeMainExecution _execute;
|
||||
private BlueprintNodeOperation _execution;
|
||||
|
||||
string[] IConvertableToBlueprintNode.InputInterfacesName => _input;
|
||||
|
||||
@@ -33,11 +33,16 @@ namespace StgSharp.Logic
|
||||
|
||||
void IConvertableToBlueprintNode.ExecuteMain(in Dictionary<string, BlueprintPipeline> input, in Dictionary<string, BlueprintPipeline> output)
|
||||
{
|
||||
_execute(in input, in output);
|
||||
_execution(in input, in output);
|
||||
}
|
||||
|
||||
|
||||
public DefaultConvertableToBlueprintNode(BlueprintNodeOperation execution, string[] input, string[] output)
|
||||
{
|
||||
_input = input;
|
||||
_output = output;
|
||||
_execution = execution;
|
||||
}
|
||||
}
|
||||
|
||||
public delegate void BlueprintNodeMainExecution(in Dictionary<string, BlueprintPipeline> input, in Dictionary<string, BlueprintPipeline> output);
|
||||
public delegate void BlueprintNodeOperation(in Dictionary<string, BlueprintPipeline> input, in Dictionary<string, BlueprintPipeline> output);
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ using System.Reflection;
|
||||
[assembly: System.Reflection.AssemblyCompanyAttribute("StgSharp")]
|
||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Release")]
|
||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+b2cb0cbddfff2845396010b6dbcd4e6ae51b0177")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+8f9f1c4012e0ba8723569f71754633060f4f0d85")]
|
||||
[assembly: System.Reflection.AssemblyProductAttribute("StgSharp")]
|
||||
[assembly: System.Reflection.AssemblyTitleAttribute("StgSharp")]
|
||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||
|
||||
Reference in New Issue
Block a user