本文整理汇总了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;
}
}
}
}
示例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();
}
示例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;
}
}
}
示例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();
}
示例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();
}