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


C++ ShaderParameterList::begin方法代码示例

本文整理汇总了C++中ShaderParameterList::begin方法的典型用法代码示例。如果您正苦于以下问题:C++ ShaderParameterList::begin方法的具体用法?C++ ShaderParameterList::begin怎么用?C++ ShaderParameterList::begin使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ShaderParameterList的用法示例。


在下文中一共展示了ShaderParameterList::begin方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: buildTexcoordTable

//-----------------------------------------------------------------------------
void ProgramProcessor::buildTexcoordTable(const ShaderParameterList& paramList, ShaderParameterList outParamsTable[4])
{
	ShaderParameterConstIterator it    = paramList.begin();
	ShaderParameterConstIterator itEnd = paramList.end();

	for (; it != itEnd; ++it)
	{
		const ParameterPtr curParam = *it;

		if (curParam->getSemantic() == Parameter::SPS_TEXTURE_COORDINATES)
		{

			switch (curParam->getType())
			{
			case GCT_FLOAT1:
				outParamsTable[0].push_back(curParam);
				break;

			case GCT_FLOAT2:
				outParamsTable[1].push_back(curParam);
				break;

			case GCT_FLOAT3:
				outParamsTable[2].push_back(curParam);
				break;

			case GCT_FLOAT4:
				outParamsTable[3].push_back(curParam);
				break;
            case GCT_SAMPLER1D:
            case GCT_SAMPLER2D:
            case GCT_SAMPLER2DARRAY:
            case GCT_SAMPLER3D:
            case GCT_SAMPLERCUBE:
            case GCT_SAMPLER1DSHADOW:
            case GCT_SAMPLER2DSHADOW:
            case GCT_MATRIX_2X2:
            case GCT_MATRIX_2X3:
            case GCT_MATRIX_2X4:
            case GCT_MATRIX_3X2:
            case GCT_MATRIX_3X3:
            case GCT_MATRIX_3X4:
            case GCT_MATRIX_4X2:
            case GCT_MATRIX_4X3:
            case GCT_MATRIX_4X4:
            case GCT_INT1:
            case GCT_INT2:
            case GCT_INT3:
            case GCT_INT4:
            case GCT_UNKNOWN:
            default:
                break;
			}
		}
	}
}
开发者ID:changsin,项目名称:ogre,代码行数:57,代码来源:OgreShaderProgramProcessor.cpp

示例2: getParameterByName

//-----------------------------------------------------------------------------
ParameterPtr Function::getParameterByName( const ShaderParameterList& parameterList, const String& name )
{
	ShaderParameterConstIterator it;

	for (it = parameterList.begin(); it != parameterList.end(); ++it)
	{
		if ((*it)->getName() == name)
		{
			return *it;
		}
	}

	return ParameterPtr();
}
开发者ID:Ali-il,项目名称:gamekit,代码行数:15,代码来源:OgreShaderFunction.cpp

示例3: deleteParameter

//-----------------------------------------------------------------------------
void Function::deleteParameter(ShaderParameterList& parameterList, ParameterPtr parameter)
{
	ShaderParameterIterator it;

	for (it = parameterList.begin(); it != parameterList.end(); ++it)
	{
		if (*it == parameter)
		{
			(*it).setNull();
			parameterList.erase(it);
			break;
		}
	}
}
开发者ID:Ali-il,项目名称:gamekit,代码行数:15,代码来源:OgreShaderFunction.cpp

示例4: getParameterBySemantic

//-----------------------------------------------------------------------------
ParameterPtr Function::getParameterBySemantic(const ShaderParameterList& parameterList, 
												const Parameter::Semantic semantic, 
												int index)
{
	ShaderParameterConstIterator it;

	for (it = parameterList.begin(); it != parameterList.end(); ++it)
	{
		if ((*it)->getSemantic() == semantic &&
			(*it)->getIndex() == index)
		{
			return *it;
		}
	}

	return ParameterPtr();
}
开发者ID:Ali-il,项目名称:gamekit,代码行数:18,代码来源:OgreShaderFunction.cpp

示例5: getParameterByContent

//-----------------------------------------------------------------------------
ParameterPtr Function::getParameterByContent(const ShaderParameterList& parameterList, const Parameter::Content content, GpuConstantType type)
{
	ShaderParameterConstIterator it;

	// Search only for known content.
	if (content != Parameter::SPC_UNKNOWN)	
	{
		for (it = parameterList.begin(); it != parameterList.end(); ++it)
		{
			if ((*it)->getContent() == content &&
				(*it)->getType() == type)
			{
				return *it;
			}
		}
	}
	
	return ParameterPtr();
}
开发者ID:Ali-il,项目名称:gamekit,代码行数:20,代码来源:OgreShaderFunction.cpp


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