Exemple #1
0
        private void InitialiseWindow()
        {
            Glfw3.Init();

            Glfw3.WindowHint(0x00022001, 0);
            this.window             = Glfw3.CreateWindow(SurfaceWidth, SurfaceHeight, "Hello Triangle", IntPtr.Zero, IntPtr.Zero);
            this.windowSizeCallback = (x, y, z) => this.RecreateSwapChain();

            Glfw3.SetWindowSizeCallback(this.window, this.windowSizeCallback);
        }
Exemple #2
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);
        }
Exemple #3
0
        public override void Initialise(Game game)
        {
            Glfw3.Init();

            Glfw3.WindowHint(0x00022001, 0);
            this.WindowHandle = Glfw3.CreateWindow(this.options.InitialWidth, this.options.InitialHeight, this.options.Title, IntPtr.Zero, IntPtr.Zero);

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

            this.game = game;
        }
Exemple #4
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;
        }
Exemple #5
0
 public static extern WindowSizeDelegate SetWindowSizeCallback(WindowHandle window, WindowSizeDelegate callback);
Exemple #6
0
 public GraphicsWindowInfo(IWindowInfo windowInfo, IGraphicsContext graphicsContext, WindowSizeDelegate getWindowSize)
 {
     WindowInfo      = windowInfo;
     GraphicsContext = graphicsContext;
     GetWindowSize   = getWindowSize;
 }
Exemple #7
0
 public static extern WindowSizeDelegate SetWindowSizeCallback(IntPtr window, WindowSizeDelegate callback);