本文整理汇总了C++中HighLevelGpuProgramPtr::getSyntaxCode方法的典型用法代码示例。如果您正苦于以下问题:C++ HighLevelGpuProgramPtr::getSyntaxCode方法的具体用法?C++ HighLevelGpuProgramPtr::getSyntaxCode怎么用?C++ HighLevelGpuProgramPtr::getSyntaxCode使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HighLevelGpuProgramPtr
的用法示例。
在下文中一共展示了HighLevelGpuProgramPtr::getSyntaxCode方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: attachChildShader
//-----------------------------------------------------------------------
void GLSLProgram::attachChildShader(const String& name)
{
// is the name valid and already loaded?
// check with the high level program manager to see if it was loaded
HighLevelGpuProgramPtr hlProgram = HighLevelGpuProgramManager::getSingleton().getByName(name);
if (!hlProgram.isNull())
{
if (hlProgram->getSyntaxCode() == "glsl")
{
// make sure attached program source gets loaded and compiled
// don't need a low level implementation for attached shader objects
// loadHighLevelImpl will only load the source and compile once
// so don't worry about calling it several times
GLSLProgram* childShader = static_cast<GLSLProgram*>(hlProgram.getPointer());
// load the source and attach the child shader only if supported
if (isSupported())
{
childShader->loadHighLevelImpl();
// add to the container
mAttachedGLSLPrograms.push_back( childShader );
mAttachedShaderNames += name + " ";
}
}
}
}