本文整理汇总了C++中TName::getString方法的典型用法代码示例。如果您正苦于以下问题:C++ TName::getString方法的具体用法?C++ TName::getString怎么用?C++ TName::getString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TName
的用法示例。
在下文中一共展示了TName::getString方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: DecorateFunctionIfNeeded
TString DecorateFunctionIfNeeded(const TName &name)
{
if (name.isInternal())
{
return TFunction::unmangleName(name.getString());
}
else
{
return Decorate(TFunction::unmangleName(name.getString()));
}
}
示例2: DecorateIfNeeded
TString DecorateIfNeeded(const TName &name)
{
if (name.isInternal())
{
return name.getString();
}
else
{
return Decorate(name.getString());
}
}
示例3: DecorateVariableIfNeeded
TString DecorateVariableIfNeeded(const TName &name)
{
if (name.isInternal())
{
// The name should not have a prefix reserved for user-defined variables or functions.
ASSERT(name.getString().compare(0, 2, "f_") != 0);
ASSERT(name.getString().compare(0, 1, "_") != 0);
return name.getString();
}
else
{
return Decorate(name.getString());
}
}
示例4: DecorateFunctionIfNeeded
TString DecorateFunctionIfNeeded(const TName &name)
{
if (name.isInternal())
{
// The name should not have a prefix reserved for user-defined variables or functions.
ASSERT(name.getString().compare(0, 2, "f_") != 0);
ASSERT(name.getString().compare(0, 1, "_") != 0);
return name.getString();
}
ASSERT(name.getString().compare(0, 3, "gl_") != 0);
// Add an additional f prefix to functions so that they're always disambiguated from variables.
// This is necessary in the corner case where a variable declaration hides a function that it
// uses in its initializer.
return "f_" + name.getString();
}
示例5: DecorateUniform
TString DecorateUniform(const TName &name, const TType &type)
{
if (type.getBasicType() == EbtSamplerExternalOES)
{
return "ex_" + name.getString();
}
return DecorateIfNeeded(name);
}
示例6: hashFunctionNameIfNeeded
TString TOutputGLSLBase::hashFunctionNameIfNeeded(const TName &mangledName)
{
TString mangledStr = mangledName.getString();
TString name = TFunction::unmangleName(mangledStr);
if (mSymbolTable.findBuiltIn(mangledStr, mShaderVersion) != nullptr || name == "main")
return translateTextureFunction(name);
if (mangledName.isInternal())
return name;
else
return hashName(name);
}