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 { /// /// Init an instance of OpenGL program, /// This method should be called before any other StgSharp api. /// 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; } } } } }