Ejemplo n.º 1
0
        /// <summary>
        ///     Predefined controller value for setting a single floating-
        ///     point value in a constant paramter of a vertex or fragment program.
        /// </summary>
        /// <remarks>
        ///     Any value is accepted, it is propagated into the 'x'
        ///     component of the constant register identified by the index. If you
        ///     need to use named parameters, retrieve the index from the param
        ///     object before setting this controller up.
        /// </remarks>
        /// <param name="parms"></param>
        /// <param name="index"></param>
        /// <param name="timeFactor"></param>
        /// <returns></returns>
        public Controller <Real> CreateGpuProgramTimerParam(GpuProgramParameters parms, int index, Real timeFactor)
        {
            IControllerValue <Real>    val  = new FloatGpuParamControllerValue(parms, index);
            IControllerFunction <Real> func = new MultipyControllerFunction(timeFactor, true);

            return(CreateController(val, func));
        }
Ejemplo n.º 2
0
		/// <summary>
		///     Predefined controller value for setting a single floating-
		///     point value in a constant paramter of a vertex or fragment program.
		/// </summary>
		/// <remarks>
		///     Any value is accepted, it is propagated into the 'x'
		///     component of the constant register identified by the index. If you
		///     need to use named parameters, retrieve the index from the param
		///     object before setting this controller up.
		/// </remarks>
		/// <param name="parms"></param>
		/// <param name="index"></param>
		/// <param name="timeFactor"></param>
		/// <returns></returns>
		public Controller<Real> CreateGpuProgramTimerParam( GpuProgramParameters parms, int index, Real timeFactor )
		{
			IControllerValue<Real> val = new FloatGpuParamControllerValue( parms, index );
			IControllerFunction<Real> func = new MultipyControllerFunction( timeFactor, true );

			return CreateController( val, func );
		}