Ogreはレンダリング可能なオブジェクトをレンダリングキューに追加する方法
//-----------------------------------------------------------------------
bool Pass::isTransparent(void) const
{
// Transparent if any of the destination colour is taken into account
if (mDestBlendFactor == SBF_ZERO &&
mSourceBlendFactor != SBF_DEST_COLOUR &&
mSourceBlendFactor != SBF_ONE_MINUS_DEST_COLOUR &&
mSourceBlendFactor != SBF_DEST_ALPHA &&
mSourceBlendFactor != SBF_ONE_MINUS_DEST_ALPHA)
{
return false;
}
else
{
return true;
}
}
//-----------------------------------------------------------------------
void RenderPriorityGroup::addRenderable(Renderable* rend, Technique* pTech)
{
// Transparent and depth/colour settings mean depth sorting is required?
// Note: colour write disabled with depth check/write enabled means
// setup depth buffer for other passes use.
// if
if (pTech->isTransparentSortingForced() ||
(pTech->isTransparent() &&
(!pTech->isDepthWriteEnabled() ||
!pTech->isDepthCheckEnabled() ||
pTech->hasColourWriteDisabled())))
{
if (pTech->isTransparentSortingEnabled())
addTransparentRenderable(pTech, rend);
else
addUnsortedTransparentRenderable(pTech, rend);
}
else
{
if (mSplitNoShadowPasses &&
mParent->getShadowsEnabled() &&
(!pTech->getParent()->getReceiveShadows() ||
rend->getCastsShadows() && mShadowCastersNotReceivers))
{
// Add solid renderable and add passes to no-shadow group
addSolidRenderable(pTech, rend, true);
}
else
{
if (mSplitPassesByLightingType && mParent->getShadowsEnabled())
{
addSolidRenderableSplitByLightType(pTech, rend);
}
else
{
addSolidRenderable(pTech, rend, false);
}
}
}
}
各RenderPriorityGroupは6つのキューからなる+mSolidsBasic{msRadixSorter 1={...}msRadixSorter2={...} mOrganisationMode='' ...} Ogre::QueuedRenderableCollection + mSolidsDiffuseSpecular {msRadixSorter1={...} msRadixSorter2={...} mOrganisationMode='' ...} Ogre::QueuedRenderableCollection + mSolidsDecal {msRadixSorter1={...} msRadixSorter2={...} mOrganisationMode='' ...} Ogre::QueuedRenderableCollection + mSolidsNoShadowReceive {msRadixSorter1={...} msRadixSorter2={...} mOrganisationMode='' ...} Ogre::QueuedRenderableCollection + mTransparentsUnsorted {msRadixSorter1={...} msRadixSorter2={...} mOrganisationMode='' ...} Ogre::QueuedRenderableCollection + mTransparents {msRadixSorter1={...} msRadixSorter2={...} mOrganisationMode='' ...} Ogre::QueuedRenderableCollection