daily update on 2024.03.18 by itload youmu
This commit is contained in:
@@ -1,17 +1,8 @@
|
||||
//using StgSharp.Envitronment.Win32;
|
||||
using StgSharp.Geometries;
|
||||
using StgSharp.Graphics;
|
||||
using StgSharp.Logic;
|
||||
using StgSharp.Math;
|
||||
using StgSharp.Math.Linear;
|
||||
|
||||
using System;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Numerics;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
|
||||
namespace StgSharp
|
||||
{
|
||||
@@ -28,10 +19,10 @@ namespace StgSharp
|
||||
|
||||
public static unsafe void ProcessInput(IntPtr windowPtr)
|
||||
{
|
||||
if (InternalIO.glfwGetKey(windowPtr, (int)Operation.Key.ESCAPE)
|
||||
if (InternalIO.glfwGetKey((GLFWwindow*)windowPtr, (int)Operation.Key.ESCAPE)
|
||||
== KeyStatus.PRESS)
|
||||
{
|
||||
InternalIO.glfwSetWindowShouldClose(windowPtr, 1);
|
||||
InternalIO.glfwSetWindowShouldClose((GLFWwindow*)windowPtr, 1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -55,7 +46,7 @@ namespace StgSharp
|
||||
{
|
||||
InternalIO.InternalWriteLog("\n\n\n", "Program start", LogType.Info);
|
||||
|
||||
SetRenderThreads(2);
|
||||
SetRenderThreads(1);
|
||||
|
||||
SetMetadata(800, 600, "Hello, STG#!", IntPtr.Zero, null);
|
||||
MakeAsCurrentContext();
|
||||
@@ -145,7 +136,7 @@ namespace StgSharp
|
||||
|
||||
public override void Main(params object[] args)
|
||||
{
|
||||
ProcessInput(windowID);
|
||||
ProcessInput(WindowID);
|
||||
|
||||
gl.ClearColor(0.333f, 0.555f, 0.555f, 1.0f);
|
||||
//GL.api.Clear(GLconst.COLOR_BUFFER_BIT);
|
||||
@@ -162,9 +153,10 @@ namespace StgSharp
|
||||
/**/
|
||||
|
||||
float time = (float)InternalIO.glfwGetTime();
|
||||
|
||||
gl.SetValue(color,
|
||||
0.5f + MathF.Sin(time),
|
||||
0.5f + MathF.Sin(time/* + 0.667f * 3.14f/**/),
|
||||
0.5f + MathF.Sin(time * 0.1f),
|
||||
0.5f + MathF.Sin(time/* - 0.667f * 3.14f/**/)
|
||||
);
|
||||
|
||||
@@ -174,8 +166,6 @@ namespace StgSharp
|
||||
|
||||
vao.BindNull();
|
||||
|
||||
SwapBuffers();
|
||||
PollEvents();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user