daily update on 20240315 by nitload youmu
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user