Exemple #1
0
        public static unsafe GlfwMonitorPtr[] GetMonitors()
        {
            int count;
            GlfwMonitorPtr* array = GLFWDelegates.glfwGetMonitors(out count);
            GlfwMonitorPtr[] result = new GlfwMonitorPtr[count];

            for (int i = 0; i < count; ++i)
            {
                result[i] = array[i];
            }

            return result;
        }
Exemple #2
0
        public static GlfwVidMode[] GetVideoModes(GlfwMonitorPtr monitor)
        {
            int count;
            GlfwVidMode* array = GLFWDelegates.glfwGetVideoModes(monitor, out count);
            GlfwVidMode[] result = new GlfwVidMode[count];

            for (int i = 0; i < count; ++i)
            {
                result[i] = array[i];
            }

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