예제 #1
0
 public void WaitForExit()
 {
     while (!_window.ShouldClose)
     {
         GL.PollEvents();
     }
 }
예제 #2
0
 public GlfwWindow(WindowOptions optionsCache, GlfwWindow?parent, GlfwMonitor?monitor) : base(optionsCache)
 {
     _glfw            = GlfwProvider.GLFW.Value;
     _parent          = parent;
     _initialMonitor  = monitor;
     _localTitleCache = optionsCache.Title;
 }
예제 #3
0
 public GlfwCoreUIApp()
 {
     if (!GL.Init())
     {
         var errorCode = GL.GetError(out var errorMessage);
         throw new InvalidOperationException($"{errorCode}: {errorMessage}");
     }
 }
예제 #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;
            }
        }