本文整理汇总了C++中ogre::Technique::getName方法的典型用法代码示例。如果您正苦于以下问题:C++ Technique::getName方法的具体用法?C++ Technique::getName怎么用?C++ Technique::getName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ogre::Technique
的用法示例。
在下文中一共展示了Technique::getName方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: populateWorkSpaceTree
void MainWindow::populateWorkSpaceTree(const QStringList &itemNames)
{
for(int count = 0; count < itemNames.size(); ++count)
{
QTreeWidgetItem *matItem = new QTreeWidgetItem(ui->workspaceTree);
QString parentName = itemNames.at(count);
matItem->setText(0, parentName);
matItem->setText(1, "material");
Ogre::MaterialPtr parMat = Ogre::MaterialManager::getSingleton().getByName(parentName.toStdString());
unsigned short numTech = parMat.getPointer()->getNumTechniques();
for (int countTech = 0; countTech < numTech; ++countTech)
{
Ogre::Technique *parTech = parMat.getPointer()->getTechnique(countTech);
int numPass = parTech->getNumPasses();
QTreeWidgetItem *techItem = new QTreeWidgetItem(matItem);
techItem->setText(0, QString("technique(")+QString(Ogre::String(parTech->getName()).c_str())+QString(")"));
for (int countPass = 0; countPass < numPass; ++countPass)
{
QTreeWidgetItem *passItem = new QTreeWidgetItem(techItem);
Ogre::Pass* pass = parTech->getPass(countPass);
passItem->setText(0, QString("pass(")+QString(Ogre::String(pass->getName()).c_str())+QString(")"));
passItem->setText(1, QString("pass"));
if(pass->hasVertexProgram())
{
QTreeWidgetItem *vpItem = new QTreeWidgetItem(passItem);
vpItem->setText(0,Ogre::String(pass->getVertexProgramName()).c_str());
vpItem->setText(1,QString("VertexProgram"));
vpItem->setText(2,QString(parentName));
vpItem->setText(3,QString(countTech));
vpItem->setText(4,QString(countPass));
}
if(pass->hasFragmentProgram())
{
QTreeWidgetItem *fpItem = new QTreeWidgetItem(passItem);
fpItem->setText(0,Ogre::String(pass->getFragmentProgramName()).c_str());
fpItem->setText(1,QString("FragmentProgram"));
fpItem->setText(2,QString(parentName));
fpItem->setText(3,QString(countTech));
fpItem->setText(4,QString(countPass));
}
if(pass->hasGeometryProgram())
{
QTreeWidgetItem *gpItem = new QTreeWidgetItem(passItem);
gpItem->setText(0,Ogre::String(pass->getGeometryProgramName()).c_str());
}
}
}
}
}