예제 #1
0
 /// <summary>
 /// Construct CondTable and StiTable According to Internal Experiment Design Condition List
 /// </summary>
 public void InitEx()
 {
     CondTable = new float[Cond.Count][];
     int[] ortho = new int[Cond.Count];
     for (int i = 0; i < Cond.Count; i++)
     {
         CondTable[i] = Cond[i].VALUE.Interpolate();
         ortho[i]     = Cond[i].VALUE.ValueN;
     }
     StiTable            = SLAlgorithm.OrthoTable(ortho);
     Exdesign.stimuli[0] = StiTable.Length;
 }
예제 #2
0
        /// <summary>
        /// Linearize Gamma According to Current Gamma Value Using GraphicsDevice GammaRamp
        /// </summary>
        /// <param name="gamma">current R, G, B gamma value</param>
        public void SetGamma(Vector3 gamma)
        {
            bool isfullscreengamma;
            GraphicsDeviceCapabilities gdcap = gd.GraphicsDeviceCapabilities;

            if (gdcap.DriverCapabilities.SupportsFullScreenGamma)
            {
                isfullscreengamma = true;
            }
            else
            {
                isfullscreengamma = false;
                SLConstant.ShowMessage("This GraphicsDevice Does Not Support Full Screen Gamma Correction !");
            }
            if (isfullscreengamma && gd.PresentationParameters.IsFullScreen && (gamma.X != 1.0f || gamma.Y != 1.0f || gamma.Z != 1.0f))
            {
                gd.SetGammaRamp(false, SLAlgorithm.GetGamma(gamma));
            }
        }
예제 #3
0
        /// <summary>
        /// Linearize Gamma According to Current Gamma Value Using GraphicsDevice GammaRamp
        /// </summary>
        /// <param name="gamma">current R, G, B gamma value</param>
        public void SetGamma(Vector3 gamma)
        {
            bool isfullscreengamma;
            GraphicsDeviceCapabilities gdcap = GraphicsAdapter.DefaultAdapter.GetCapabilities(DeviceType.Hardware);

            if (gdcap.DriverCapabilities.SupportsFullScreenGamma)
            {
                isfullscreengamma = true;
            }
            else
            {
                isfullscreengamma = false;
                SLConstant.ShowMessage("This Adapter Does Not Support Full Screen Gamma Correction !");
            }
            if (isfullscreengamma && gdm.IsFullScreen && (gamma.X != 1.0f || gamma.Y != 1.0f || gamma.Z != 1.0f))
            {
                gdm.GraphicsDevice.SetGammaRamp(false, SLAlgorithm.GetGamma(gamma));
                this.gamma = gamma;
            }
        }