本文整理汇总了C++中HighLevelGpuProgramPtr::unload方法的典型用法代码示例。如果您正苦于以下问题:C++ HighLevelGpuProgramPtr::unload方法的具体用法?C++ HighLevelGpuProgramPtr::unload怎么用?C++ HighLevelGpuProgramPtr::unload使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HighLevelGpuProgramPtr
的用法示例。
在下文中一共展示了HighLevelGpuProgramPtr::unload方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: getFragmentProgramName
//---------------------------------------------------------------------
HighLevelGpuProgramPtr
TerrainMaterialGeneratorA::SM2Profile::ShaderHelperCg::createFragmentProgram(
const SM2Profile* prof, const Terrain* terrain, TechniqueType tt)
{
HighLevelGpuProgramManager& mgr = HighLevelGpuProgramManager::getSingleton();
String progName = getFragmentProgramName(prof, terrain, tt);
HighLevelGpuProgramPtr ret = mgr.getByName(progName);
if (ret.isNull())
{
ret = mgr.createProgram(progName, ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME,
"cg", GPT_FRAGMENT_PROGRAM);
}
else
{
ret->unload();
}
if(prof->isLayerNormalMappingEnabled() || prof->isLayerParallaxMappingEnabled())
ret->setParameter("profiles", "ps_4_0 ps_3_0 ps_2_x fp40 arbfp1");
else
ret->setParameter("profiles", "ps_4_0 ps_3_0 ps_2_0 fp30 arbfp1");
ret->setParameter("entry_point", "main_fp");
return ret;
}
示例2: getFragmentProgramName
//---------------------------------------------------------------------
HighLevelGpuProgramPtr
ShaderHelperHLSL::createFragmentProgram(
const SM2Profile* prof, const Terrain* terrain, TechniqueType tt)
{
HighLevelGpuProgramManager& mgr = HighLevelGpuProgramManager::getSingleton();
String progName = getFragmentProgramName(prof, terrain, tt);
HighLevelGpuProgramPtr ret = mgr.getByName(progName, ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME);
if (!ret)
{
ret = mgr.createProgram(progName, ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME,
"hlsl", GPT_FRAGMENT_PROGRAM);
}
else
{
ret->unload();
}
// creating Shader Model 4.0 type hlsl shader fol DirectX11 Render System
if (prof->_isSM4Available())
ret->setParameter("target", "ps_4_0");
//else if (prof->_isSM3Available())
// ret->setParameter("target", "ps_3_0");
//else
// ret->setParameter("target", "ps_2_x");
ret->setParameter("entry_point", "main_fp");
return ret;
}
示例3: getVertexProgramName
//---------------------------------------------------------------------
//---------------------------------------------------------------------
HighLevelGpuProgramPtr
TerrainMaterialGeneratorA::SM2Profile::ShaderHelperCg::createVertexProgram(
const SM2Profile* prof, const Terrain* terrain, TechniqueType tt)
{
HighLevelGpuProgramManager& mgr = HighLevelGpuProgramManager::getSingleton();
String progName = getVertexProgramName(prof, terrain, tt);
HighLevelGpuProgramPtr ret = mgr.getByName(progName);
if (ret.isNull())
{
ret = mgr.createProgram(progName, ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME,
"cg", GPT_VERTEX_PROGRAM);
}
else
{
ret->unload();
}
ret->setParameter("profiles", "vs_4_0 vs_3_0 vs_2_0 arbvp1");
ret->setParameter("entry_point", "main_vp");
return ret;
}