daily update on 20240305 by nitload youmu
This commit is contained in:
@@ -6,6 +6,7 @@ using StgSharp.Math;
|
||||
using StgSharp.Math.Linear;
|
||||
|
||||
using System;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Numerics;
|
||||
@@ -60,20 +61,19 @@ namespace StgSharp
|
||||
SetMetadata(800, 600, "Hello, STG#!", IntPtr.Zero, null);
|
||||
MakeAsCurrentContext();
|
||||
SetSizeLimit(800, 600, 800, 600);
|
||||
this.LoadGLapi(null);
|
||||
FrameBufferSizeCallback =
|
||||
(IntPtr id, uint width, uint height)
|
||||
=>
|
||||
(IntPtr id, uint width, uint height) =>
|
||||
{
|
||||
gl.Viewport(0, 0, width, height);
|
||||
};
|
||||
this.LoadGLapi(null);
|
||||
|
||||
shader = CreateShaderProgram();
|
||||
var vertex = CreateShader(ShaderType.Vertex, 1);
|
||||
var fragment = CreateShader(ShaderType.Fragment, 1);
|
||||
vertex.Compile(File.ReadAllText("Shader\\vertex.vert"));
|
||||
vertex.Compile(0, File.ReadAllText("Shader\\vertex.vert"));
|
||||
vertex.AttachTo(0, shader);
|
||||
fragment.Compile(File.ReadAllText("Shader\\fragment.frag"));
|
||||
fragment.Compile(0, File.ReadAllText("Shader\\fragment.frag"));
|
||||
fragment.AttachTo(0, shader);
|
||||
|
||||
shader.Link();
|
||||
@@ -195,6 +195,37 @@ namespace StgSharp
|
||||
demoForm.Init();
|
||||
demoForm.Show();
|
||||
/**/
|
||||
|
||||
/*
|
||||
GLparamQueue queue = new GLparamQueue();
|
||||
Thread t = default;
|
||||
for (int i = 0; i < 100; i++)
|
||||
{
|
||||
M128 m = new M128();
|
||||
m.Write<int>(0, 1 + i);
|
||||
m.Write<int>(1, 10 - i);
|
||||
m.Write<Int64>(1, 511L * i);
|
||||
queue.Enqueue(m);
|
||||
if (i == 10)
|
||||
{
|
||||
t = new Thread(new ThreadStart(
|
||||
() =>
|
||||
{
|
||||
for (int i = 0; i < 100; i++)
|
||||
{
|
||||
M128 m = default;
|
||||
queue.TryDequeue(out m);
|
||||
Console.WriteLine(m.ToString(10));
|
||||
}
|
||||
}
|
||||
));
|
||||
t.Start();
|
||||
}
|
||||
}
|
||||
|
||||
t.Join();
|
||||
|
||||
/**/
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user