本文整理汇总了C++中GpuProgramParametersSharedPtr::get方法的典型用法代码示例。如果您正苦于以下问题:C++ GpuProgramParametersSharedPtr::get方法的具体用法?C++ GpuProgramParametersSharedPtr::get怎么用?C++ GpuProgramParametersSharedPtr::get使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GpuProgramParametersSharedPtr
的用法示例。
在下文中一共展示了GpuProgramParametersSharedPtr::get方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: bind
//-----------------------------------------------------------------------
void UniformParameter::bind(GpuProgramParametersSharedPtr paramsPtr)
{
if (paramsPtr.get() != NULL)
{
const GpuConstantDefinition* def = paramsPtr->_findNamedConstantDefinition(mName);
if (def != NULL)
{
mParamsPtr = paramsPtr.get();
mPhysicalIndex = def->physicalIndex;
}
}
}
示例2: recreateParameters
//---------------------------------------------------------------------
void GpuProgramUsage::recreateParameters()
{
// Keep a reference to old ones to copy
GpuProgramParametersSharedPtr savedParams = mParameters;
// Create new params
mParameters = mProgram->createParameters();
// Copy old (matching) values across
// Don't use copyConstantsFrom since program may be different
if (!savedParams.isNull())
mParameters->copyMatchingNamedConstantsFrom(*savedParams.get());
mRecreateParams = false;
}
示例3: loadImpl
//-----------------------------------------------------------------------------
void GpuProgram::loadImpl(void)
{
if (mLoadFromFile)
{
// find & load source code
DataStreamPtr stream =
ResourceGroupManager::getSingleton().openResource(
mFilename, mGroup, true, this);
mSource = stream->getAsString();
}
// Call polymorphic load
try
{
loadFromSource();
if (!mDefaultParams.isNull())
{
// Keep a reference to old ones to copy
GpuProgramParametersSharedPtr savedParams = mDefaultParams;
// reset params to stop them being referenced in the next create
mDefaultParams.setNull();
// Create new params
mDefaultParams = createParameters();
// Copy old (matching) values across
// Don't use copyConstantsFrom since program may be different
mDefaultParams->copyMatchingNamedConstantsFrom(*savedParams.get());
}
}
catch (const Exception&)
{
StringStream ss;
ss << "Gpu program " << mName << " encountered an error "
<< "during loading and is thus not supported.";
mCompileErrorMessage = ss.str();
// will already have been logged
LogManager::getSingleton().stream() << mCompileErrorMessage;
mCompileError = true;
}
}
示例4: loadHighLevel
//---------------------------------------------------------------------------
void HighLevelGpuProgram::loadHighLevel(void)
{
if (!mHighLevelLoaded)
{
try
{
loadHighLevelImpl();
mHighLevelLoaded = true;
if (!mDefaultParams.isNull())
{
// Keep a reference to old ones to copy
GpuProgramParametersSharedPtr savedParams = mDefaultParams;
// reset params to stop them being referenced in the next create
mDefaultParams.setNull();
// Create new params
mDefaultParams = createParameters();
// Copy old (matching) values across
// Don't use copyConstantsFrom since program may be different
mDefaultParams->copyMatchingNamedConstantsFrom(*savedParams.get());
}
}
catch (const Exception& e)
{
// will already have been logged
LogManager::getSingleton().stream()
<< "High-level program " << mName << " encountered an error "
<< "during loading and is thus not supported.\n"
<< e.getFullDescription();
mCompileError = true;
}
}
}