Beispiel #1
0
        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);
        }
Beispiel #2
0
 internal static extern void glfwSetWindowSizeCallback(Glfw.Window window, Glfw.SetWindowSizeCallbackDelegate cbfun);