public static MonitorPtr GetPrimaryMonitor() { MonitorPtr result = glfwGetPrimaryMonitor(); CheckError(); return(result); }
public static void SetWindowMonitor(WindowPtr window, MonitorPtr monitor, int x, int y, int width, int height, int refreshRate) { glfwSetWindowMonitor(window, monitor, x, y, width, height, refreshRate); CheckError(); }
public static WindowPtr CreateWindow(int width, int height, string title, MonitorPtr monitor, WindowPtr share) { var result = glfwCreateWindow(width, height, title, monitor, share); CheckError(); GetCallbacks(result); return(result); }
public static GammaRamp GetGammaRamp(MonitorPtr monitor) { unsafe { NativeGammaRamp ngr = *glfwGetGammaRamp(monitor); CheckError(); return(new GammaRamp(ngr)); } }
public static VideoMode GetVideoMode(MonitorPtr monitor) { unsafe { VideoMode result = *glfwGetVideoMode(monitor); CheckError(); return(result); } }
public static string GetMonitorName(MonitorPtr monitor) { unsafe { var s = glfwGetMonitorName(monitor); CheckError(); string result = Interop.GetString(s); return(result); } }
public static void SetGammaRamp(MonitorPtr monitor, GammaRamp ramp) { unsafe { fixed(ushort *r = &ramp.red[0]) fixed(ushort *g = &ramp.green[0]) fixed(ushort *b = &ramp.blue[0]) { NativeGammaRamp ngr = new NativeGammaRamp(r, g, b, ramp.size); NativeGammaRamp *ptr = &ngr; glfwSetGammaRamp(monitor, ptr); CheckError(); } } }
public static MonitorPtr[] GetMonitors() { unsafe { int count; MonitorPtr *ptr = glfwGetMonitors(out count); CheckError(); MonitorPtr[] result = new MonitorPtr[count]; for (int i = 0; i < count; i++) { result[i] = ptr[i]; } return(result); } }
public static VideoMode[] GetVideoModes(MonitorPtr monitor) { unsafe { int count; VideoMode *ptr = glfwGetVideoModes(monitor, out count); CheckError(); VideoMode[] result = new VideoMode[count]; for (int i = 0; i < count; i++) { result[i] = ptr[i]; } return(result); } }
public static void SetGamma(MonitorPtr monitor, float gamma) { glfwSetGamma(monitor, gamma); }
public static void GetMonitorPhysicalSize(MonitorPtr monitor, out int width, out int height) { glfwGetMonitorPhysicalSize(monitor, out width, out height); CheckError(); }
public static void GetMonitorPos(MonitorPtr monitor, out int x, out int y) { glfwGetMonitorPos(monitor, out x, out y); CheckError(); }