public Window(int width, int height, string name) { Width = width; Height = height; rescaleDelegate = Rescale; GlfwWindow = Glfw.CreateWindow(Width, Height, name); Glfw.Vidmode vidmode = Glfw.GetVideoMode(Glfw.GetPrimaryMonitor()); Glfw.SetWindowPos(GlfwWindow, (vidmode.Width - Width) / 2, (vidmode.Height - Height) / 2); Glfw.SetWindowSizeCallback(GlfwWindow, rescaleDelegate); }
internal static extern void glfwSetWindowSizeCallback(Glfw.Window window, Glfw.SetWindowSizeCallbackDelegate cbfun);