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); }
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); }
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; }
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; }
public static extern WindowSizeDelegate SetWindowSizeCallback(WindowHandle window, WindowSizeDelegate callback);
public GraphicsWindowInfo(IWindowInfo windowInfo, IGraphicsContext graphicsContext, WindowSizeDelegate getWindowSize) { WindowInfo = windowInfo; GraphicsContext = graphicsContext; GetWindowSize = getWindowSize; }
public static extern WindowSizeDelegate SetWindowSizeCallback(IntPtr window, WindowSizeDelegate callback);