Esempio n. 1
0
        public static VideoMode GetVideoMode(MonitorPtr monitor)
        {
            IntPtr    ptr        = glfwGetVideoMode(monitor);
            VideoMode returnMode = Marshal.PtrToStructure <VideoMode>(ptr);

            return(returnMode);
        }
Esempio n. 2
0
		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;
		}
Esempio n. 3
0
		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;
		}
Esempio n. 4
0
        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);
        }
Esempio n. 5
0
        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);
        }
Esempio n. 6
0
        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);
        }
Esempio n. 7
0
 internal static extern IntPtr glfwGetMonitorName(MonitorPtr monitor);
Esempio n. 8
0
 public static void SetGamma(MonitorPtr monitor, float gamma)
 {
     glfwSetGamma(monitor, gamma);
 }
Esempio n. 9
0
		public static WindowPtr CreateWindow(int width, int height, string title, MonitorPtr monitor, WindowPtr share) {
			return glfwCreateWindow(width, height, title, monitor, share);
		}
Esempio n. 10
0
		internal static extern void glfwSetGamma(MonitorPtr monitor, float gamma);
Esempio n. 11
0
		internal static extern void glfwSetGammaRamp(MonitorPtr monitor, ref GammaRamp ramp);
Esempio n. 12
0
		internal static extern void glfwGetMonitorPhysicalSize(MonitorPtr monitor, out int width, out int height);
Esempio n. 13
0
		internal static extern IntPtr glfwGetVideoModes(MonitorPtr monitor, out int count);
Esempio n. 14
0
		public static string GetMonitorName(MonitorPtr monitor) {
			return Marshal.PtrToStringAnsi(glfwGetMonitorName(monitor));
		}
Esempio n. 15
0
 public static void SetGammaRamp(MonitorPtr monitor, ref GammaRamp ramp)
 {
     ramp.Length = (uint)ramp.Red.Length;
     glfwSetGammaRamp(monitor, ref ramp);
 }
Esempio n. 16
0
 internal static extern void glfwGetMonitorPhysicalSize(MonitorPtr monitor, out int width, out int height);
Esempio n. 17
0
		public static void GetMonitorPos(MonitorPtr monitor, out int xpos, out int ypos) {
			glfwGetMonitorPos(monitor, out xpos, out ypos);
		}
Esempio n. 18
0
 internal static extern void glfwGetMonitorPos(MonitorPtr monitor, out int xpos, out int ypos);
Esempio n. 19
0
 public static WindowPtr CreateWindow(int width, int height, string title, MonitorPtr monitor, WindowPtr share)
 {
     return(glfwCreateWindow(width, height, title, monitor, share));
 }
Esempio n. 20
0
 public static string GetMonitorName(MonitorPtr monitor)
 {
     return(Marshal.PtrToStringAnsi(glfwGetMonitorName(monitor)));
 }
Esempio n. 21
0
 public static void GetMonitorPhysicalSize(MonitorPtr monitor, out int width, out int height)
 {
     glfwGetMonitorPhysicalSize(monitor, out width, out height);
 }
Esempio n. 22
0
 public static void GetMonitorPos(MonitorPtr monitor, out int xpos, out int ypos)
 {
     glfwGetMonitorPos(monitor, out xpos, out ypos);
 }
Esempio n. 23
0
		public static void GetMonitorPhysicalSize(MonitorPtr monitor, out int width, out int height) {
			glfwGetMonitorPhysicalSize(monitor, out width, out height);
		}
Esempio n. 24
0
		public static VideoMode GetVideoMode(MonitorPtr monitor) {
            IntPtr ptr = glfwGetVideoMode(monitor);
            VideoMode returnMode = Marshal.PtrToStructure<VideoMode>(ptr);
            return returnMode;
		}
Esempio n. 25
0
 internal static extern IntPtr glfwGetVideoModes(MonitorPtr monitor, out int count);
Esempio n. 26
0
		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;
		}
Esempio n. 27
0
		public static void SetGamma(MonitorPtr monitor, float gamma) {
			glfwSetGamma(monitor, gamma);
		}
Esempio n. 28
0
 internal static extern IntPtr glfwGetVideoMode(MonitorPtr monitor);
Esempio n. 29
0
		internal static extern void glfwGetMonitorPos(MonitorPtr monitor, out int xpos, out int ypos);
Esempio n. 30
0
 internal static extern void glfwSetGamma(MonitorPtr monitor, float gamma);
Esempio n. 31
0
		internal static extern IntPtr glfwGetMonitorName(MonitorPtr monitor);
Esempio n. 32
0
 internal static extern void glfwGetGammaRamp(MonitorPtr monitor, out GammaRampInternal ramp);
Esempio n. 33
0
		internal static extern IntPtr glfwGetVideoMode(MonitorPtr monitor);
Esempio n. 34
0
 internal static extern void glfwSetGammaRamp(MonitorPtr monitor, ref GammaRamp ramp);
Esempio n. 35
0
		internal static extern void glfwGetGammaRamp(MonitorPtr monitor, out GammaRampInternal ramp);
Esempio n. 36
0
 internal static extern WindowPtr glfwCreateWindow(int width, int height, [MarshalAs(UnmanagedType.LPStr)] string title, MonitorPtr monitor, WindowPtr share);
Esempio n. 37
0
		internal static extern WindowPtr glfwCreateWindow(int width, int height, [MarshalAs(UnmanagedType.LPStr)] string title, MonitorPtr monitor, WindowPtr share);
Esempio n. 38
0
		public static void SetGammaRamp(MonitorPtr monitor, ref GammaRamp ramp) {
			ramp.Length = (uint)ramp.Red.Length;
			glfwSetGammaRamp(monitor, ref ramp);
		}