本文整理汇总了C#中Axiom.Graphics.GpuProgramParameters.AddParameterToDefaultsList方法的典型用法代码示例。如果您正苦于以下问题:C# GpuProgramParameters.AddParameterToDefaultsList方法的具体用法?C# GpuProgramParameters.AddParameterToDefaultsList怎么用?C# GpuProgramParameters.AddParameterToDefaultsList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Axiom.Graphics.GpuProgramParameters
的用法示例。
在下文中一共展示了GpuProgramParameters.AddParameterToDefaultsList方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Clone
public GpuProgramParameters Clone()
{
GpuProgramParameters p = new GpuProgramParameters();
// copy int constants
for ( int i = 0; i < intConstants.Count; i++ )
{
IntConstantEntry e = intConstants[ i ] as IntConstantEntry;
if ( e.isSet )
{
p.SetConstant( i, e.val );
}
}
// copy float constants
for ( int i = 0; i < floatConstants.Count; i++ )
{
FloatConstantEntry e = floatConstants[ i ] as FloatConstantEntry;
if ( e.isSet )
{
p.SetConstant( i, e.val );
}
}
// copy auto constants
for ( int i = 0; i < autoConstantList.Count; i++ )
{
AutoConstantEntry entry = autoConstantList[ i ] as AutoConstantEntry;
p.SetAutoConstant( entry.Clone() );
}
// copy named params
foreach ( string key in namedParams.Keys )
{
p.MapParamNameToIndex( key, namedParams[ key ] );
}
for ( int i = 0; i < paramTypeList.Count; i++ )
{
}
foreach ( ParameterEntry pEntry in paramTypeList )
{
p.AddParameterToDefaultsList( pEntry.ParameterType, pEntry.ParameterName );
}
// copy value members
p.transposeMatrices = transposeMatrices;
p.autoAddParamName = autoAddParamName;
return p;
}
示例2: Clone
public GpuProgramParameters Clone()
{
GpuProgramParameters p = new GpuProgramParameters();
// copy int constants
for ( int i = 0; i < intConstants.Count; i++ )
{
IntConstantEntry e = intConstants[i];
if ( e.isSet )
{
p.SetConstant(i, e.val);
}
}
// copy float constants
p.floatConstantsArray = new float[floatConstantsArray.Length];
Array.Copy(floatConstantsArray, p.floatConstantsArray, floatConstantsArray.Length);
p.floatIsSet = new bool[floatIsSet.Length];
Array.Copy(floatIsSet, p.floatIsSet, floatIsSet.Length);
p.float4VecConstantsCount = float4VecConstantsCount;
p.maxSetCount = maxSetCount;
// copy auto constants
for(int i = 0; i < autoConstantList.Count; i++)
{
AutoConstantEntry entry = autoConstantList[i];
p.SetAutoConstant(entry.Clone());
}
// copy named params
foreach ( DictionaryEntry e in namedParams )
{
p.MapParamNameToIndex(e.Key as string, (int)e.Value);
}
for ( int i = 0; i < paramTypeList.Count; i++ )
{
}
foreach ( ParameterEntry pEntry in paramTypeList )
{
p.AddParameterToDefaultsList(pEntry.ParameterType, pEntry.ParameterName);
}
// copy value members
p.transposeMatrices = transposeMatrices;
p.autoAddParamName = autoAddParamName;
return p;
}