本文整理汇总了C++中ogre::MaterialPtr::unload方法的典型用法代码示例。如果您正苦于以下问题:C++ MaterialPtr::unload方法的具体用法?C++ MaterialPtr::unload怎么用?C++ MaterialPtr::unload使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ogre::MaterialPtr
的用法示例。
在下文中一共展示了MaterialPtr::unload方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: reset
void MeshResourceMarker::reset()
{
//destroy entity
if (entity_)
{
context_->getSceneManager()->destroyEntity(entity_);
entity_ = 0;
}
// destroy all the materials we've created
S_MaterialPtr::iterator it;
for (it = materials_.begin(); it != materials_.end(); it++)
{
Ogre::MaterialPtr material = *it;
if (!material.isNull())
{
material->unload();
Ogre::MaterialManager::getSingleton().remove(material->getName());
}
}
materials_.clear();
// the actual passes are deleted by the material
color_tint_passes_.clear();
}
示例2: reset
void MeshResourceMarker::reset()
{
//destroy entity
if (entity_)
{
context_->getSceneManager()->destroyEntity( entity_ );
entity_ = 0;
}
// destroy all the materials we've created
S_MaterialPtr::iterator it;
for ( it = materials_.begin(); it!=materials_.end(); it++ )
{
Ogre::MaterialPtr material = *it;
if (!material.isNull())
{
for (size_t i = 0; i < material->getNumTechniques(); ++i)
{
Ogre::Technique* t = material->getTechnique(i);
// hack hack hack, really need to do a shader-based way of picking, rather than
// creating a texture for each object
if (t->getSchemeName() == "Pick")
{
Ogre::TextureManager::getSingleton().remove(t->getPass(0)->getTextureUnitState(0)->getTextureName());
}
}
material->unload();
Ogre::MaterialManager::getSingleton().remove(material->getName());
}
}
materials_.clear();
}
示例3:
MeshPersonVisual::~MeshPersonVisual() {
m_sceneManager->destroyEntity( entity_ );
// destroy all the materials we've created
std::set<Ogre::MaterialPtr>::iterator it;
for ( it = materials_.begin(); it!=materials_.end(); it++ )
{
Ogre::MaterialPtr material = *it;
if (!material.isNull())
{
material->unload();
Ogre::MaterialManager::getSingleton().remove(material->getName());
}
}
materials_.clear();
m_sceneManager->destroySceneNode(m_childSceneNode->getName());
}