public void WaitForExit() { while (!_window.ShouldClose) { GL.PollEvents(); } }
public GlfwWindow(WindowOptions optionsCache, GlfwWindow?parent, GlfwMonitor?monitor) : base(optionsCache) { _glfw = GlfwProvider.GLFW.Value; _parent = parent; _initialMonitor = monitor; _localTitleCache = optionsCache.Title; }
public GlfwCoreUIApp() { if (!GL.Init()) { var errorCode = GL.GetError(out var errorMessage); throw new InvalidOperationException($"{errorCode}: {errorMessage}"); } }
private bool disposedValue = false; // To detect redundant calls protected virtual void Dispose(bool disposing) { if (!disposedValue) { if (disposing) { _window?.Dispose(); } GL.Terminate(); disposedValue = true; } }