本文整理汇总了C++中FrameBufferObject::getDepthAttachment方法的典型用法代码示例。如果您正苦于以下问题:C++ FrameBufferObject::getDepthAttachment方法的具体用法?C++ FrameBufferObject::getDepthAttachment怎么用?C++ FrameBufferObject::getDepthAttachment使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FrameBufferObject
的用法示例。
在下文中一共展示了FrameBufferObject::getDepthAttachment方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: getDepthTexUnit
//.........这里部分代码省略.........
}
else
{
if (isPing)
pTarget = pData->getPeelPingFBO();
else
pTarget = pData->getPeelPongFBO();
pBack = pData->getBackground();
}
pPart->setRenderTarget(pTarget);
if(pArea != NULL)
{
pPart->setWindow (a->getWindow());
if(pTarget != NULL)
{
pPart->calcViewportDimension(pArea->getLeft (),
pArea->getBottom(),
pArea->getRight (),
pArea->getTop (),
pTarget->getWidth (),
pTarget->getHeight ());
}
else
{
pPart->calcViewportDimension(pArea->getLeft (),
pArea->getBottom(),
pArea->getRight (),
pArea->getTop (),
a->getWindow()->getWidth (),
a->getWindow()->getHeight());
}
if(pCam != NULL)
{
Matrix m, t;
// set the projection
pCam->getProjection (m,
pPart->getViewportWidth (),
pPart->getViewportHeight());
pCam->getProjectionTranslation(t,
pPart->getViewportWidth (),
pPart->getViewportHeight());
pPart->setupProjection(m, t);
pCam->getViewing(m,
pPart->getViewportWidth (),
pPart->getViewportHeight());
pPart->setupViewing(m);
pPart->setNear (pCam->getNear());
pPart->setFar (pCam->getFar ());
pPart->calcFrustum();
}
pPart->setBackground(pBack);
}
pPart->addSetupModeBit(RenderPartition::BackgroundSetup);
pPart->pushState();
if (!isInitial)
{
FrameBufferObject* fbo =
isPing ? pData->getPeelPongFBO() : pData->getPeelPingFBO();
TextureBuffer* texbuf =
static_cast<TextureBuffer *>(fbo->getDepthAttachment());
TextureObjChunk* depthTexChunk = texbuf->getTexture();
pPart->addOverride(depthTexChunk->getClassId() + getDepthTexUnit(),
depthTexChunk );
pPart->addOverride(pData->getSpvIsPeelChunk()->getClassId(),
pData->getSpvIsPeelChunk() );
}
else
{
pPart->addOverride(pData->getSpvIsInitialChunk()->getClassId(),
pData->getSpvIsInitialChunk() );
}
pPart->addOverride(pData->getDepthChunk()->getClassId(),
pData->getDepthChunk() );
this->recurseFromThis(a);
a->useNodeList(false);
pPart->popState();
}
this->popPartition(a);
}