예제 #1
0
        private void InitialiseWindow()
        {
            Glfw3.glfwInit();

            Glfw3.glfwWindowHint(0x00022001, 0);
            this.window = Glfw3.glfwCreateWindow(SurfaceWidth, SurfaceHeight, "Vulkan", IntPtr.Zero, IntPtr.Zero);

            this.windowSizeChanged = (x, y, z) => this.RecreateSwapChain();
            Glfw3.glfwSetWindowSizeCallback(this.window, this.windowSizeChanged);
        }
예제 #2
0
        public GlFwForm(int width, int height, string title, GlfwWindowEventListener eventListener)
        {
            _width            = width;
            _height           = height;
            _title            = title;
            _winEventListener = eventListener;
            //

            SetGlfwWindowHandler(Glfw3.glfwCreateWindow(_width, _height, title, IntPtr.Zero, IntPtr.Zero));
            GlfwAppLoop.RegisterGlfwForm(this);
        }
예제 #3
0
        public override void Initialise(Game game)
        {
            Glfw3.glfwInit();

            Glfw3.glfwWindowHint(0x00022001, 0);
            this.WindowHandle = Glfw3.glfwCreateWindow(1280, 720, this.options.Title, IntPtr.Zero, IntPtr.Zero);

            this.windowSizeChanged = this.OnWindowSizeChanged;
            Glfw3.glfwSetWindowSizeCallback(this.WindowHandle, this.windowSizeChanged);

            this.game = game;
        }