daily update on 20240610 by nitload youmu

This commit is contained in:
Nitload
2024-06-10 15:11:01 +08:00
parent c0093f7b5c
commit f6963b8e00
96 changed files with 2927 additions and 2290 deletions
+22 -10
View File
@@ -9,8 +9,14 @@ using System.Runtime.CompilerServices;
namespace StgSharp
{
public class StgSharpDemoForm : ViewModel
public class StgSharpDemoForm : ViewModelBase
{
public StgSharpDemoForm(int frameSpeed) : base(frameSpeed)
{
}
public StgSharpDemoForm(ViewPort vp, int frameSpeed) : base(vp, frameSpeed)
{
}
public void Beep()
{
@@ -39,21 +45,27 @@ namespace StgSharp
StgSharp.Init();
StgSharp.InitGL(4, 6);
StgSharp.GlobalSetting.VSyncActivated = false;
StgSharpDemoForm demoForm = new StgSharpDemoForm();
demoForm.Size = (800, 800);
demoForm.name = "Hello, Stg#!";
var stream = demoForm.BuildMainRenderStream
ViewPort vp = new ViewPort(
name: "Hello, Stg#!",
size: (800,600),
monitor: IntPtr.Zero
);
StgSharpDemoForm demoForm = new StgSharpDemoForm(vp,60);
View v = demoForm.BuildNewView(null, (1,1,1));
var stream = demoForm.BuildRenderStream
//<MainRenderStream>
//<ParticleStream>
<fboFrame>
((1,1,1));
(v, (1,1,1));
var rstream = RenderStream.ShareContextWith
<fboFrame,ParticleStream>(stream);
Console.WriteLine(1);
Blueprint blueprint = new Blueprint();
BlueprintNode node0 = new BlueprintNode("BufferGenerateStream", rstream);
@@ -69,7 +81,7 @@ namespace StgSharp
blueprint.AddNativeNode(node1);
blueprint.Init(0);
//Console.WriteLine(2);
Console.WriteLine(2);
demoForm.RenderLogic = blueprint;
demoForm.Show();