本文整理汇总了C++中ProgramObject::GetFlags方法的典型用法代码示例。如果您正苦于以下问题:C++ ProgramObject::GetFlags方法的具体用法?C++ ProgramObject::GetFlags怎么用?C++ ProgramObject::GetFlags使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ProgramObject
的用法示例。
在下文中一共展示了ProgramObject::GetFlags方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: LoadFromCache
//.........这里部分代码省略.........
if (objectCodeCachePathArc.IsEmpty()) continue;
csString objectCodeCachePathItem =
CS::PluginCommon::ShaderCacheHelper::ReadString (cacheFile);
if (objectCodeCachePathItem.IsEmpty()) continue;
ProgramObjectID progId (objectCodeCachePathArc, objectCodeCachePathItem);
ProgramObject programObj;
//if (!LoadObjectCodeFromCompileCache (limits, cache))
if (!shaderPlug->progCache.LoadObject (progId, programObj))
continue;
oneReadCorrectly = true;
if (program)
{
cgDestroyProgram (program);
program = 0;
}
if (!programObj.IsValid()) continue;
cgGetError(); // Clear error
program = cgCreateProgram (shaderPlug->context,
CG_OBJECT, programObj.GetObjectCode(), limits.profile, 0, 0);
if (!program) continue;
CGerror err = cgGetError();
if (err != CG_NO_ERROR)
{
const char* errStr = cgGetErrorString (err);
shaderPlug->Report (CS_REPORTER_SEVERITY_WARNING,
"Cg error %s", errStr);
continue;
}
programProfile = limits.profile;
programPositionInvariant = programObj.GetFlags() & ProgramObject::flagPositionInvariant;
unusedParams = programObj.GetUnusedParams();
ClipsToVmap();
GetParamsFromVmap();
bool doLoadToGL = !shaderPlug->ProfileNeedsRouting (programProfile);
cgGetError(); // Clear error
if (doLoadToGL)
{
cgGLLoadProgram (program);
}
else
{
cgCompileProgram (program);
}
shaderPlug->PrintAnyListing();
err = cgGetError();
if ((err != CG_NO_ERROR)
|| (doLoadToGL && !cgGLIsProgramLoaded (program)))
{
//if (shaderPlug->debugDump)
//DoDebugDump();
const char* errStr = cgGetErrorString (err);
shaderPlug->Report (CS_REPORTER_SEVERITY_WARNING,
"Cg error %s", errStr);
if (shaderPlug->doVerbose
&& (((programType == progVP) && (programProfile >= CG_PROFILE_ARBVP1))
|| ((programType == progFP) && (programProfile >= CG_PROFILE_ARBFP1))))