public static VideoMode GetVideoMode(MonitorPtr monitor) { IntPtr ptr = glfwGetVideoMode(monitor); VideoMode returnMode = Marshal.PtrToStructure <VideoMode>(ptr); return(returnMode); }
public static VideoMode[] GetVideoModes(MonitorPtr monitor) { int count; IntPtr ptr = glfwGetVideoModes(monitor, out count); VideoMode[] result = new VideoMode[count]; for (int i = 0; i < count; ++i) { int offset = i * Marshal.SizeOf<VideoMode>(); result[i] = Marshal.PtrToStructure<VideoMode>(ptr + offset); } return result; }
public static MonitorPtr[] GetMonitors() { int count; IntPtr ptr = glfwGetMonitors(out count); MonitorPtr[] result = new MonitorPtr[count]; for (int i = 0; i < count; ++i) { int offset = i * Marshal.SizeOf<MonitorPtr>(); result[i] = Marshal.PtrToStructure<MonitorPtr>(ptr + offset); } return result; }
public static VideoMode[] GetVideoModes(MonitorPtr monitor) { int count; IntPtr ptr = glfwGetVideoModes(monitor, out count); VideoMode[] result = new VideoMode[count]; for (int i = 0; i < count; ++i) { int offset = i * Marshal.SizeOf <VideoMode>(); result[i] = Marshal.PtrToStructure <VideoMode>(ptr + offset); } return(result); }
public static MonitorPtr[] GetMonitors() { int count; IntPtr ptr = glfwGetMonitors(out count); MonitorPtr[] result = new MonitorPtr[count]; for (int i = 0; i < count; ++i) { int offset = i * Marshal.SizeOf <MonitorPtr>(); result[i] = Marshal.PtrToStructure <MonitorPtr>(ptr + offset); } return(result); }
public static GammaRamp GetGammaRamp(MonitorPtr monitor) { GammaRampInternal rampI; glfwGetGammaRamp(monitor, out rampI); uint length = rampI.Length; GammaRamp ramp = new GammaRamp(length); for (int i = 0; i < ramp.Red.Length; ++i) { int offset = i * sizeof(ushort); ramp.Red[i] = Marshal.PtrToStructure <short>(rampI.Red + offset); ramp.Green[i] = Marshal.PtrToStructure <short>(rampI.Green + offset); ramp.Blue[i] = Marshal.PtrToStructure <short>(rampI.Blue + offset); } return(ramp); }
internal static extern IntPtr glfwGetMonitorName(MonitorPtr monitor);
public static void SetGamma(MonitorPtr monitor, float gamma) { glfwSetGamma(monitor, gamma); }
public static WindowPtr CreateWindow(int width, int height, string title, MonitorPtr monitor, WindowPtr share) { return glfwCreateWindow(width, height, title, monitor, share); }
internal static extern void glfwSetGamma(MonitorPtr monitor, float gamma);
internal static extern void glfwSetGammaRamp(MonitorPtr monitor, ref GammaRamp ramp);
internal static extern void glfwGetMonitorPhysicalSize(MonitorPtr monitor, out int width, out int height);
internal static extern IntPtr glfwGetVideoModes(MonitorPtr monitor, out int count);
public static string GetMonitorName(MonitorPtr monitor) { return Marshal.PtrToStringAnsi(glfwGetMonitorName(monitor)); }
public static void SetGammaRamp(MonitorPtr monitor, ref GammaRamp ramp) { ramp.Length = (uint)ramp.Red.Length; glfwSetGammaRamp(monitor, ref ramp); }
public static void GetMonitorPos(MonitorPtr monitor, out int xpos, out int ypos) { glfwGetMonitorPos(monitor, out xpos, out ypos); }
internal static extern void glfwGetMonitorPos(MonitorPtr monitor, out int xpos, out int ypos);
public static WindowPtr CreateWindow(int width, int height, string title, MonitorPtr monitor, WindowPtr share) { return(glfwCreateWindow(width, height, title, monitor, share)); }
public static string GetMonitorName(MonitorPtr monitor) { return(Marshal.PtrToStringAnsi(glfwGetMonitorName(monitor))); }
public static void GetMonitorPhysicalSize(MonitorPtr monitor, out int width, out int height) { glfwGetMonitorPhysicalSize(monitor, out width, out height); }
public static VideoMode GetVideoMode(MonitorPtr monitor) { IntPtr ptr = glfwGetVideoMode(monitor); VideoMode returnMode = Marshal.PtrToStructure<VideoMode>(ptr); return returnMode; }
public static GammaRamp GetGammaRamp(MonitorPtr monitor) { GammaRampInternal rampI; glfwGetGammaRamp(monitor, out rampI); uint length = rampI.Length; GammaRamp ramp = new GammaRamp(length); for (int i = 0; i < ramp.Red.Length; ++i) { int offset = i * sizeof(ushort); ramp.Red[i] = Marshal.PtrToStructure<short>(rampI.Red + offset); ramp.Green[i] = Marshal.PtrToStructure<short>(rampI.Green + offset); ramp.Blue[i] = Marshal.PtrToStructure<short>(rampI.Blue + offset); } return ramp; }
internal static extern IntPtr glfwGetVideoMode(MonitorPtr monitor);
internal static extern void glfwGetGammaRamp(MonitorPtr monitor, out GammaRampInternal ramp);
internal static extern WindowPtr glfwCreateWindow(int width, int height, [MarshalAs(UnmanagedType.LPStr)] string title, MonitorPtr monitor, WindowPtr share);