daily update on 20240501 by nitload youmu, tracking blueprint corupt[D[D[Dr
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
using StgSharp;
|
||||
using StgSharp.Geometries;
|
||||
using StgSharp.Graphics;
|
||||
using StgSharp.Logic;
|
||||
using StgSharp.Math;
|
||||
|
||||
using System;
|
||||
@@ -9,10 +10,10 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StgSharpDebug
|
||||
namespace StgSharp
|
||||
{
|
||||
|
||||
public sealed class MainRenderStream : glRenderStream
|
||||
public class MainRenderStream : glRenderStream
|
||||
{
|
||||
private Uniform<float, float, float, float> color;
|
||||
private ElementBuffer ebo;
|
||||
@@ -23,11 +24,15 @@ namespace StgSharpDebug
|
||||
private VertexArray vao;
|
||||
private VertexBuffer vbo;
|
||||
|
||||
protected MainRenderStream(RenderStreamConstructArgs args) : base(args)
|
||||
public MainRenderStream(RenderStreamConstructArgs args) : base(args)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
protected override string[] InputPortsName => ["input_1"];
|
||||
|
||||
protected override string[] OutputPortsName => ["output_1"];
|
||||
|
||||
protected override void Deinit()
|
||||
{
|
||||
/**/
|
||||
@@ -37,7 +42,7 @@ namespace StgSharpDebug
|
||||
/**/
|
||||
}
|
||||
|
||||
protected override void Init()
|
||||
protected sealed override void Init()
|
||||
{
|
||||
SetSizeLimit(800, 800, 800, 800);
|
||||
|
||||
@@ -122,7 +127,10 @@ namespace StgSharpDebug
|
||||
|
||||
}
|
||||
|
||||
protected override void Main()
|
||||
protected sealed override void Main(
|
||||
in Dictionary<string, BlueprintPipeline> input,
|
||||
in Dictionary<string, BlueprintPipeline> output
|
||||
)
|
||||
{
|
||||
GL.ClearColor(0.333f, 0.555f, 0.555f, 1.0f);
|
||||
|
||||
@@ -158,6 +166,8 @@ namespace StgSharpDebug
|
||||
|
||||
//vao.BindNull();
|
||||
/**/
|
||||
|
||||
BlueprintPipeline.SkipAll(output);
|
||||
}
|
||||
|
||||
protected override void ProcessInput()
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
//using StgSharp.Environment.Win32;
|
||||
using StgSharp.Geometries;
|
||||
using StgSharp.Graphics;
|
||||
using StgSharp.Logic;
|
||||
using StgSharp.Math;
|
||||
|
||||
using System;
|
||||
@@ -11,10 +12,6 @@ namespace StgSharp
|
||||
public class StgSharpDemoForm : Form
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
[MultiFrameActivity()]
|
||||
public void Beep()
|
||||
{
|
||||
if (CurrentFrameCount%60==0)
|
||||
@@ -38,6 +35,8 @@ namespace StgSharp
|
||||
{
|
||||
try
|
||||
{
|
||||
InternalIO.InternalWriteLog($"\n\n\nProgram Started",LogType.Info);
|
||||
|
||||
//StgSharp.TryCreatWindow();
|
||||
|
||||
/**/
|
||||
@@ -45,6 +44,26 @@ namespace StgSharp
|
||||
StgSharp.InitGL(4, 6);
|
||||
StgSharp.GlobalSetting.VSyncActivated = false;
|
||||
StgSharpDemoForm demoForm = new StgSharpDemoForm();
|
||||
demoForm.Size = (800, 800);
|
||||
demoForm.name = "Hello, Stg#!";
|
||||
|
||||
MainRenderStream stream = glRenderStream.AsMainStreamOf
|
||||
<MainRenderStream>(demoForm,(1,1,1));
|
||||
|
||||
Blueprint blueprint = new Blueprint();
|
||||
|
||||
BlueprintNode node = new BlueprintNode("MainRenderStream",stream);
|
||||
node.AddAfter(blueprint.BeginLayer,
|
||||
"input_1", "input_1");
|
||||
node.AddBefore(blueprint.EndLayer,
|
||||
"output_1", "output_1");
|
||||
|
||||
blueprint.AddNativeNode(node);
|
||||
blueprint.Init(0);
|
||||
|
||||
//Console.WriteLine(2);
|
||||
|
||||
demoForm.RenderLogic = blueprint;
|
||||
demoForm.Show();
|
||||
StgSharp.Terminate();
|
||||
/**/
|
||||
@@ -52,6 +71,7 @@ namespace StgSharp
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine(ex.Message + "\n" + ex.StackTrace);
|
||||
InternalIO.InternalWriteLog(
|
||||
ex.Message + "\n" + ex.StackTrace,
|
||||
LogType.Error);
|
||||
|
||||
Reference in New Issue
Block a user