当前位置: 首页>>代码示例>>C#>>正文


C# GpuProgramParameters.AddParameterToDefaultsList方法代码示例

本文整理汇总了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;
		}
开发者ID:mono-soc-2011,项目名称:axiom,代码行数:51,代码来源:GpuProgramParameters.cs

示例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;
        }
开发者ID:ufosky-server,项目名称:MultiversePlatform,代码行数:50,代码来源:GpuProgramParameters.cs


注:本文中的Axiom.Graphics.GpuProgramParameters.AddParameterToDefaultsList方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。