本文整理汇总了C++中SoNode::GLRenderInPath方法的典型用法代码示例。如果您正苦于以下问题:C++ SoNode::GLRenderInPath方法的具体用法?C++ SoNode::GLRenderInPath怎么用?C++ SoNode::GLRenderInPath使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SoNode
的用法示例。
在下文中一共展示了SoNode::GLRenderInPath方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: assert
// Doc in parent
void
SoVRMLGroup::GLRenderInPath(SoGLRenderAction * action)
{
int numindices;
const int * indices;
SoAction::PathCode pathcode = action->getPathCode(numindices, indices);
if (pathcode == SoAction::IN_PATH) {
SoState * state = action->getState();
SoNode ** childarray = (SoNode**) this->getChildren()->getArrayPtr();
state->push();
int childidx = 0;
for (int i = 0; i < numindices; i++) {
for (; childidx < indices[i] && !action->hasTerminated(); childidx++) {
SoNode * offpath = childarray[childidx];
if (offpath->affectsState()) {
action->pushCurPath(childidx, offpath);
if (!action->abortNow()) {
SoNodeProfiling profiling;
profiling.preTraversal(action);
offpath->GLRenderOffPath(action);
profiling.postTraversal(action);
}
else {
SoCacheElement::invalidate(state);
}
action->popCurPath(pathcode);
}
}
SoNode * inpath = childarray[childidx];
action->pushCurPath(childidx, inpath);
if (!action->abortNow()) {
SoNodeProfiling profiling;
profiling.preTraversal(action);
inpath->GLRenderInPath(action);
profiling.postTraversal(action);
}
else {
SoCacheElement::invalidate(state);
}
action->popCurPath(pathcode);
childidx++;
}
state->pop();
}
else {
// we got to the end of the path
assert(action->getCurPathCode() == SoAction::BELOW_PATH);
this->GLRenderBelowPath(action);
}
}