本文整理汇总了C++中DrawElementsUInt::getMode方法的典型用法代码示例。如果您正苦于以下问题:C++ DrawElementsUInt::getMode方法的具体用法?C++ DrawElementsUInt::getMode怎么用?C++ DrawElementsUInt::getMode使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DrawElementsUInt
的用法示例。
在下文中一共展示了DrawElementsUInt::getMode方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: mDOCollectorIndex
//Constructor: Making deep copy of 'refGeometry' without copy of 'mDOCollectorIndex'
CAVEGeometry::CAVEGeometry(CAVEGeometry *refGeometry): mDOCollectorIndex(-1)
{
/* copy primitive set and index clusters */
unsigned int nPrimitiveSets = refGeometry->getNumPrimitiveSets();
if (nPrimitiveSets > 0)
{
for (int i = 0; i < nPrimitiveSets; i++)
{
PrimitiveSet* primSetRef = refGeometry->getPrimitiveSet(i);
/* support primitive set 'DrawElementsUInt', add more types of primitive sets here if needed */
DrawElementsUInt* drawElementUIntRef = dynamic_cast <DrawElementsUInt*> (primSetRef);
if (drawElementUIntRef)
{
unsigned int nIdices = drawElementUIntRef->getNumIndices();
const GLenum &mode = drawElementUIntRef->getMode();
/* create duplicated primitive set, copy index field and add it to 'this' */
DrawElementsUInt* drawElementUIntDup = new DrawElementsUInt(mode, 0);
if (nIdices > 0)
{
for (int j = 0; j < nIdices; j++) drawElementUIntDup->push_back(drawElementUIntRef->index(j));
}
addPrimitiveSet(drawElementUIntDup);
}
}
}
/* copy the field of overlapping index by calling addIndexCluster() function sets */
const IndexClusterVector &refClusterVector = refGeometry->mIndexClusterVector;
if (refClusterVector.size() > 0)
{
for (IndexClusterVector::const_iterator itrCluster = refClusterVector.begin();
itrCluster != refClusterVector.end(); itrCluster++)
{
IndexClusterBase *clusterPtr = *itrCluster;
addIndexCluster(clusterPtr);
}
}
}