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

        protected virtual void Dispose(bool disposing)
        {
            if (!disposedValue)
            {
                if (disposing)
                {
                    _window?.Dispose();
                }

                GL.Terminate();

                disposedValue = true;
            }
        }