public static GLFWgammaramp getGammaRamp(GLFWmonitor monitor) { IntPtr a = Glfwint.getGammaRamp(monitor.handle); GLFWgammaramp ramp = (GLFWgammaramp)Marshal.PtrToStructure(a, typeof(GLFWgammaramp)); return(ramp); }
public static GLFWmonitor getPrimaryMonitor() { GLFWmonitor newMonitor = new GLFWmonitor(); newMonitor.handle = Glfwint.getPrimaryMonitor(); return(newMonitor); }
public static GLFWmonitor getWindowMonitor(GLFWwindow window) { GLFWmonitor mon = new GLFWmonitor(); mon.handle = Glfwint.getWindowMonitor(window.handle); return(mon); }
public static void setGammaRamp(GLFWmonitor monitor, GLFWgammaramp ramp) { IntPtr ptr = new IntPtr(); Marshal.StructureToPtr(ramp, ptr, false); Glfwint.setGammaRamp(monitor.handle, ptr); }
public static GLFWwindow createWindow(int width, int height, string title, GLFWmonitor monitor, GLFWwindow share) { GLFWwindow win = new GLFWwindow(); IntPtr tmp = Glfwint.createWindow(width, height, Marshal.StringToHGlobalAuto(title), monitor.handle, share.handle); win.handle = tmp; return(win); }
public static List <GLFWmonitor> getMonitors() { int count = 0; IntPtr monitorList = Glfwint.getMonitors(ref count); List <GLFWmonitor> monitors = new List <GLFWmonitor> (); for (int i = 0; i < count; i++) { GLFWmonitor newMonitor = new GLFWmonitor(); newMonitor.handle = (IntPtr)Marshal.PtrToStructure(monitorList, typeof(IntPtr)); monitorList += Marshal.SizeOf(typeof(IntPtr)); monitors.Add(newMonitor); } return(monitors); }
public static List <GLFWvidmode> getVideoModes(GLFWmonitor monitor) { int count = 0; IntPtr modeList = Glfwint.getVideoModes(monitor.handle, ref count); List <GLFWvidmode> modes = new List <GLFWvidmode> (); for (int i = 0; i < count; i++) { GLFWvidmode newMode = new GLFWvidmode(); newMode = (GLFWvidmode)Marshal.PtrToStructure(modeList, typeof(GLFWvidmode)); modeList += Marshal.SizeOf(typeof(GLFWvidmode)); modes.Add(newMode); } return(modes); }
public static void getMonitorPos(GLFWmonitor monitor, ref int x, ref int y) { x = 0; y = 0; Glfwint.getMonitorPos(monitor.handle, ref x, ref y); }
// I don't know, I want to name it getPhysicalMonitorSize, but I'll keep it getMonitorPhysicalSize for the sake of compatibility public static void getMonitorPhysicalSize(GLFWmonitor monitor, ref int width, ref int height) { width = 0; height = 0; Glfwint.getMonitorPhysicalSize(monitor.handle, ref width, ref height); }
public static string getMonitorName(GLFWmonitor monitor) { IntPtr name = Glfwint.getMonitorName(monitor.handle); return(Marshal.PtrToStringAuto(name)); }
public static void setGamma(GLFWmonitor monitor, float gamma) { Glfwint.setGamma(monitor.handle, gamma); }
public static GLFWvidmode getVideoMode(GLFWmonitor monitor) { return((GLFWvidmode)Marshal.PtrToStructure(Glfwint.getVideoMode(monitor.handle), typeof(GLFWvidmode))); }
public static void setWindowMonitor(GLFWwindow window, GLFWmonitor monitor, int x, int y, int width, int height, int refreshRate) { Glfwint.setWindowMonitor(window.handle, monitor.handle, x, y, width, height, refreshRate); }