示例#1
0
 public static GammaRamp GetGammaRamp(MonitorPtr monitor)
 {
     unsafe
     {
         NativeGammaRamp ngr = *glfwGetGammaRamp(monitor);
         CheckError();
         return(new GammaRamp(ngr));
     }
 }
示例#2
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();
                }
            }
        }
示例#3
0
        public GammaRamp(NativeGammaRamp ramp)
        {
            size  = ramp.size;
            red   = new ushort[size];
            green = new ushort[size];
            blue  = new ushort[size];

            unsafe
            {
                for (int i = 0; i < size; i++)
                {
                    red[i]   = ramp.red[i];
                    green[i] = ramp.green[i];
                    blue[i]  = ramp.blue[i];
                }
            }
        }