Ejemplo n.º 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();
                }
            }
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 3
0
 public void SetGamma(float gamma)
 {
     GLFW.SetGamma(monitor, gamma);
     gammaRamp = GLFW.GetGammaRamp(monitor);
 }