Ejemplo n.º 1
0
        internal Window(int width, int height, string title, MonitorHandle monitor, Dictionary <WindowAttribute, int> windowHints)
        {
            try
            {
                ErrorUtility.Bind();

                if (windowHints != null)
                {
                    foreach (var hintPair in windowHints)
                    {
                        Glfw3.WindowHint(hintPair.Key, hintPair.Value);
                    }
                }

                this.handle = Glfw3.CreateWindow(width, height, title, monitor, WindowHandle.Zero);

                ErrorUtility.ThrowOnError();
            }
            finally
            {
                ErrorUtility.Unbind();
            }
        }
Ejemplo n.º 2
0
 public Window(int width, int height, string title)
 {
     this.handle = Glfw3.CreateWindow(width, height, title, IntPtr.Zero, IntPtr.Zero);
 }