Example #1
0
        public static void SetGammaRamp(MonitorPtr monitor, GammaRamp ramp)
        {
            unsafe
            {
                fixed(ushort *r = &ramp.red[0])
                fixed(ushort *g = &ramp.green[0])
                fixed(ushort *b = &ramp.blue[0])
                {
                    NativeGammaRamp  ngr = new NativeGammaRamp(r, g, b, ramp.size);
                    NativeGammaRamp *ptr = &ngr;

                    glfwSetGammaRamp(monitor, ptr);
                    CheckError();
                }
            }
        }
Example #2
0
        Monitor(MonitorPtr monitor)
        {
            this.monitor = monitor;

            Name = GLFW.GetMonitorName(monitor);

            VideoModes = new List <VideoMode>(GLFW.GetVideoModes(monitor)).AsReadOnly();

            int x, y, w, h;

            GLFW.GetMonitorPhysicalSize(monitor, out w, out h);
            GLFW.GetMonitorPos(monitor, out x, out y);

            Width     = w;
            Height    = h;
            PositionX = x;
            PositionY = y;

            gammaRamp = GLFW.GetGammaRamp(monitor);
        }
Example #3
0
 public void SetGamma(float gamma)
 {
     GLFW.SetGamma(monitor, gamma);
     gammaRamp = GLFW.GetGammaRamp(monitor);
 }