public static GlfwVidMode[] GetVideoModes(GlfwMonitor monitor) { int count; GlfwVidMode *array = GlfwCore.glfwGetVideoModes(monitor, out count); GlfwVidMode[] result = new GlfwVidMode[count]; for (int i = 0; i < count; ++i) { result[i] = array[i]; } return(result); }
public static GlfwMonitor[] GetMonitors() { int count; GlfwMonitor *array = GlfwCore.glfwGetMonitors(out count); GlfwMonitor[] result = new GlfwMonitor[count]; for (int i = 0; i < count; ++i) { result[i] = array[i]; } return(result); }
public static GlfwVidMode GetVideoMode(GlfwMonitor monitor) { GlfwVidMode *vidMode = GlfwCore.glfwGetVideoMode(monitor); GlfwVidMode returnMode = new GlfwVidMode { RedBits = vidMode->RedBits, GreenBits = vidMode->GreenBits, BlueBits = vidMode->BlueBits, RefreshRate = vidMode->RefreshRate, Width = vidMode->Width, Height = vidMode->Height }; return(returnMode); }
public static void GetGammaRamp(GlfwMonitor monitor, out GlfwGammaRamp ramp) { GlfwGammaRampInternal rampI; GlfwCore.glfwGetGammaRamp(monitor, out rampI); uint length = rampI.Length; ramp = new GlfwGammaRamp(); ramp.Red = new uint[length]; ramp.Green = new uint[length]; ramp.Blue = new uint[length]; for (int i = 0; i < ramp.Red.Length; ++i) { ramp.Red[i] = rampI.Red[i]; } for (int i = 0; i < ramp.Green.Length; ++i) { ramp.Green[i] = rampI.Green[i]; } for (int i = 0; i < ramp.Blue.Length; ++i) { ramp.Blue[i] = rampI.Blue[i]; } }
public static void SetWindowMonitor(GlfwWindow window, GlfwMonitor monitor, int xpos, int ypos, int width, int height, int refreshRate) { GlfwCore.glfwSetWindowMonitor(window, monitor, xpos, ypos, width, height, refreshRate); }
public static GlfwWindow CreateWindow(int width, int height, string title, GlfwMonitor monitor, GlfwWindow share) { return(GlfwCore.glfwCreateWindow(width, height, title, monitor, share)); }
public static void SetGammaRamp(GlfwMonitor monitor, ref GlfwGammaRamp ramp) { ramp.Length = (uint)ramp.Red.Length; GlfwCore.glfwSetGammaRamp(monitor, ref ramp); }
internal static extern void glfwGetMonitorPos(GlfwMonitor monitor, out int xpos, out int ypos);
public static void GetMonitorPhysicalSize(GlfwMonitor monitor, out int width, out int height) { GlfwCore.glfwGetMonitorPhysicalSize(monitor, out width, out height); }
internal static extern void glfwGetGammaRamp(GlfwMonitor monitor, out GlfwGammaRampInternal ramp);
internal static extern void glfwSetGamma(GlfwMonitor monitor, float gamma);
internal static extern GlfwVidMode *glfwGetVideoMode(GlfwMonitor monitor);
internal static extern GlfwVidMode *glfwGetVideoModes(GlfwMonitor monitor, out int count);
internal static extern sbyte *glfwGetMonitorName(GlfwMonitor monitor);
internal static extern void glfwGetMonitorPhysicalSize(GlfwMonitor monitor, out int width, out int height);
public static void GetMonitorPos(GlfwMonitor monitor, out int xpos, out int ypos) { GlfwCore.glfwGetMonitorPos(monitor, out xpos, out ypos); }
internal static extern void glfwSetGammaRamp(GlfwMonitor monitor, ref GlfwGammaRamp ramp);
public static string GetMonitorName(GlfwMonitor monitor) { return(new string(GlfwCore.glfwGetMonitorName(monitor))); }
internal static extern GlfwWindow glfwCreateWindow(int width, int height, [MarshalAs(UnmanagedType.LPStr)] string title, GlfwMonitor monitor, GlfwWindow share);
public static void SetGamma(GlfwMonitor monitor, float gamma) { GlfwCore.glfwSetGamma(monitor, gamma); }
internal static extern void glfwSetWindowMonitor(GlfwWindow window, GlfwMonitor monitor, int xpos, int ypos, int width, int height, int refreshRate);