mirror of
https://github.com/OpenMW/openmw.git
synced 2025-03-03 15:39:41 +00:00
Move is faster
This commit is contained in:
parent
05ad44d0b1
commit
0b5d5eab4c
1 changed files with 4 additions and 8 deletions
|
@ -127,11 +127,9 @@ StateGraph* ShadowsBin::cullStateGraph(StateGraph* sg, StateGraph* root, std::un
|
||||||
if (state.mAlphaBlend)
|
if (state.mAlphaBlend)
|
||||||
{
|
{
|
||||||
sg_new = sg->find_or_insert(mShaderAlphaTestStateSet);
|
sg_new = sg->find_or_insert(mShaderAlphaTestStateSet);
|
||||||
for (RenderLeaf* leaf : sg->_leaves)
|
sg_new->_leaves = std::move(sg->_leaves);
|
||||||
{
|
for (RenderLeaf* leaf : sg_new->_leaves)
|
||||||
leaf->_parent = sg_new;
|
leaf->_parent = sg_new;
|
||||||
sg_new->_leaves.push_back(leaf);
|
|
||||||
}
|
|
||||||
sg = sg_new;
|
sg = sg_new;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -139,11 +137,9 @@ StateGraph* ShadowsBin::cullStateGraph(StateGraph* sg, StateGraph* root, std::un
|
||||||
if (state.mAlphaFunc && state.mAlphaFunc->getFunction() != GL_ALWAYS)
|
if (state.mAlphaFunc && state.mAlphaFunc->getFunction() != GL_ALWAYS)
|
||||||
{
|
{
|
||||||
sg_new = sg->find_or_insert(mAlphaFuncShaders[state.mAlphaFunc->getFunction() - GL_NEVER]);
|
sg_new = sg->find_or_insert(mAlphaFuncShaders[state.mAlphaFunc->getFunction() - GL_NEVER]);
|
||||||
for (RenderLeaf* leaf : sg->_leaves)
|
sg_new->_leaves = std::move(sg->_leaves);
|
||||||
{
|
for (RenderLeaf* leaf : sg_new->_leaves)
|
||||||
leaf->_parent = sg_new;
|
leaf->_parent = sg_new;
|
||||||
sg_new->_leaves.push_back(leaf);
|
|
||||||
}
|
|
||||||
sg = sg_new;
|
sg = sg_new;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue