daily update on 20240315 by nitload youmu

This commit is contained in:
YoumuLiu
2024-03-16 03:09:00 +08:00
parent a770bbe685
commit 15bf989285
84 changed files with 1064 additions and 1981 deletions
@@ -0,0 +1,44 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;
using System.Threading.Tasks;
namespace StgSharp
{
public static unsafe partial class StgSharp
{
/// <summary>
/// Init an instance of OpenGL program,
/// This method should be called before any other StgSharp api.
/// </summary>
public static void InitGL(int majorVersion, int minorVersion)
{
if (API == default)
{
API = GraphicAPI.GL;
}
if (API != GraphicAPI.GL)
{
return;
}
InternalIO.InternalInitGL(majorVersion, minorVersion);
}
public static class GlobalSetting
{
private static bool vSyncActivated;
public static bool VSyncActivated
{
get { return vsyncActivated; }
set
{
InternalIO.glfwSwapInterval(value ? 1 : 0);
vsyncActivated = value;
}
}
}
}
}