/// <summary>
 ///    Sets up a constant which will automatically be updated by the engine.
 /// </summary>
 /// <remarks>
 ///    Vertex and fragment programs often need parameters which are to do with the
 ///    current render state, or particular values which may very well change over time,
 ///    and often between objects which are being rendered. This feature allows you 
 ///    to set up a certain number of predefined parameter mappings that are kept up to 
 ///    date for you.
 /// </remarks>
 /// <param name="name">
 ///    Name of the param.
 /// </param>
 /// <param name="type">
 ///    The type of automatic constant to set.
 /// </param>
 /// <param name="extraInfo">
 ///    Any extra infor needed by the auto constant (i.e. light index, etc).
 /// </param>
 public void SetNamedAutoConstant(string name, AutoConstants type, int extraInfo)
 {
     SetAutoConstant(GetParamIndex(name), type, extraInfo);
 }
 /// <summary>
 ///    Overloaded method.
 /// </summary>
 /// <param name="type">The type of automatic constant to set.</param>
 /// <param name="index">
 ///    The location in the constant list to place this updated constant every time
 ///    it is changed. Note that because of the nature of the types, we know how big the 
 ///    parameter details will be so you don't need to set that like you do for manual constants.
 /// </param>
 /// <param name="extraInfo">If the constant type needs more information (like a light index) put it here.</param>
 public void SetAutoConstant(int index, AutoConstants type, float extraInfo)
 {
     AutoConstantEntry entry = new AutoConstantEntry(type, index, extraInfo);
     autoConstantList.Add(entry);
 }
 /// <summary>
 ///    Overloaded method.
 /// </summary>
 /// <param name="type">The type of automatic constant to set.</param>
 /// <param name="index">
 ///    The location in the constant list to place this updated constant every time
 ///    it is changed. Note that because of the nature of the types, we know how big the 
 ///    parameter details will be so you don't need to set that like you do for manual constants.
 /// </param>
 /// <param name="extraInfo">If the constant type needs more information (like a light index) put it here.</param>
 public void SetAutoConstant(int index, AutoConstants type, int extraInfo)
 {
     AutoConstantEntry entry = new AutoConstantEntry(type, index, extraInfo);
     System.Diagnostics.Debug.Assert(type != AutoConstants.SinTime_0_X);
     autoConstantList.Add(entry);
 }
 /// <summary>
 ///    Sets up a constant which will automatically be updated by the engine.
 /// </summary>
 /// <remarks>
 ///    Vertex and fragment programs often need parameters which are to do with the
 ///    current render state, or particular values which may very well change over time,
 ///    and often between objects which are being rendered. This feature allows you 
 ///    to set up a certain number of predefined parameter mappings that are kept up to 
 ///    date for you.
 /// </remarks>
 /// <param name="type">The type of automatic constant to set.</param>
 /// <param name="index">
 ///    The location in the constant list to place this updated constant every time
 ///    it is changed. Note that because of the nature of the types, we know how big the 
 ///    parameter details will be so you don't need to set that like you do for manual constants.
 /// </param>
 public void SetAutoConstant(int index, AutoConstants type)
 {
     SetAutoConstant(index, type, 0);
 }
 /// <summary>
 ///    Default constructor.
 /// </summary>
 /// <param name="type">Type of auto param (i.e. WorldViewMatrix, etc)</param>
 /// <param name="index">Index of the param.</param>
 /// <param name="data">Any additional info to go with the parameter.</param>
 public AutoConstantEntry(AutoConstants type, int index, float fdata)
 {
     this.type = type;
     this.index = index;
     this.fdata = fdata;
 }
 /// <summary>
 ///    Default constructor.
 /// </summary>
 /// <param name="type">Type of auto param (i.e. WorldViewMatrix, etc)</param>
 /// <param name="index">Index of the param.</param>
 /// <param name="data">Any additional info to go with the parameter.</param>
 public AutoConstantEntry(AutoConstants type, int index, int data)
 {
     this.type = type;
     this.index = index;
     this.data = data;
     System.Diagnostics.Debug.Assert(type != AutoConstants.SinTime_0_X);
 }