本文整理汇总了C++中Appearance::setTextureUnitState方法的典型用法代码示例。如果您正苦于以下问题:C++ Appearance::setTextureUnitState方法的具体用法?C++ Appearance::setTextureUnitState怎么用?C++ Appearance::setTextureUnitState使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Appearance
的用法示例。
在下文中一共展示了Appearance::setTextureUnitState方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: removeAllScopes
void TextureProjectorNode::removeAllScopes()
{
while (!m_oldTexUnitMap.empty())
{
MeshNode* meshNode = m_oldTexUnitMap.begin()->first;
Appearance* appearance = meshNode->getAppearance();
TextureUnitState* texUnit = m_oldTexUnitMap.begin()->second;
appearance->setTextureUnitState(0,texUnit);
m_oldTexUnitMap.erase(m_oldTexUnitMap.begin());
}
}
示例2: removeScope
void TextureProjectorNode::removeScope( MeshNode* meshNode )
{
// While removing the Meshnode from the scope list, we need to restore the original TextureUnit.
if ( m_oldTexUnitMap.find(meshNode) != m_oldTexUnitMap.end() )
{
Appearance* appearance = 0;
appearance = meshNode->getAppearance();
if ( appearance )
{
appearance->setTextureUnitState(0,m_oldTexUnitMap.find(meshNode)->second);
}
m_oldTexUnitMap.erase(meshNode);
}
}
示例3: addScope
void TextureProjectorNode::addScope( MeshNode* meshNode )
{
// Save TextureUnit of this meshNode, so that it can be recovered while removing this meshnode from the Scope.
if( meshNode )
{
Appearance* appearance = 0;
appearance = meshNode->getAppearance();
TextureUnitState *texUnit = 0;
if ( appearance )
{
// Save the old texture unit
texUnit = appearance->getTextureUnitState(0);
// Set the projector Texture Unit
appearance->setTextureUnitState(0,projectorTexUnitState);
}
//if(texUnit)
m_oldTexUnitMap[meshNode] = texUnit;
}
}