示例#1
0
        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);
        }
示例#2
0
        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);
        }
示例#3
0
        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);
        }
示例#4
0
        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];
            }
        }
示例#5
0
 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);
 }
示例#6
0
 public static GlfwWindow CreateWindow(int width, int height, string title, GlfwMonitor monitor, GlfwWindow share)
 {
     return(GlfwCore.glfwCreateWindow(width, height, title, monitor, share));
 }
示例#7
0
 public static void SetGammaRamp(GlfwMonitor monitor, ref GlfwGammaRamp ramp)
 {
     ramp.Length = (uint)ramp.Red.Length;
     GlfwCore.glfwSetGammaRamp(monitor, ref ramp);
 }
示例#8
0
 internal static extern void glfwGetMonitorPos(GlfwMonitor monitor, out int xpos, out int ypos);
示例#9
0
 public static void GetMonitorPhysicalSize(GlfwMonitor monitor, out int width, out int height)
 {
     GlfwCore.glfwGetMonitorPhysicalSize(monitor, out width, out height);
 }
示例#10
0
 internal static extern void glfwGetGammaRamp(GlfwMonitor monitor, out GlfwGammaRampInternal ramp);
示例#11
0
 internal static extern void glfwSetGamma(GlfwMonitor monitor, float gamma);
示例#12
0
 internal static extern GlfwVidMode *glfwGetVideoMode(GlfwMonitor monitor);
示例#13
0
 internal static extern GlfwVidMode *glfwGetVideoModes(GlfwMonitor monitor, out int count);
示例#14
0
 internal static extern sbyte *glfwGetMonitorName(GlfwMonitor monitor);
示例#15
0
 internal static extern void glfwGetMonitorPhysicalSize(GlfwMonitor monitor, out int width, out int height);
示例#16
0
 public static void GetMonitorPos(GlfwMonitor monitor, out int xpos, out int ypos)
 {
     GlfwCore.glfwGetMonitorPos(monitor, out xpos, out ypos);
 }
示例#17
0
 internal static extern void glfwSetGammaRamp(GlfwMonitor monitor, ref GlfwGammaRamp ramp);
示例#18
0
 public static string GetMonitorName(GlfwMonitor monitor)
 {
     return(new string(GlfwCore.glfwGetMonitorName(monitor)));
 }
示例#19
0
 internal static extern GlfwWindow glfwCreateWindow(int width, int height,
                                                    [MarshalAs(UnmanagedType.LPStr)] string title, GlfwMonitor monitor, GlfwWindow share);
示例#20
0
 public static void SetGamma(GlfwMonitor monitor, float gamma)
 {
     GlfwCore.glfwSetGamma(monitor, gamma);
 }
示例#21
0
 internal static extern void glfwSetWindowMonitor(GlfwWindow window, GlfwMonitor monitor, int xpos, int ypos,
                                                  int width, int height, int refreshRate);