MCPcopy Create free account
hub / github.com/OGRECave/ogre / getTextureUnitStateIndex

Method getTextureUnitStateIndex

OgreMain/src/OgrePass.cpp:420–430  ·  view source on GitHub ↗

-----------------------------------------------------------------------

Source from the content-addressed store, hash-verified

418
419 //-----------------------------------------------------------------------
420 unsigned short Pass::getTextureUnitStateIndex(const TextureUnitState* state) const
421 {
422 OGRE_LOCK_MUTEX(mTexUnitChangeMutex);
423 assert(state && "state is 0 in Pass::getTextureUnitStateIndex()");
424
425 // only find index for state attached to this pass
426 OgreAssert(state->getParent() == this, "TextureUnitState is not attached to this pass");
427 auto i = std::find(mTextureUnitStates.begin(), mTextureUnitStates.end(), state);
428 assert(i != mTextureUnitStates.end() && "state is supposed to attached to this pass");
429 return static_cast<unsigned short>(std::distance(mTextureUnitStates.begin(), i));
430 }
431
432 //-----------------------------------------------------------------------
433 Pass::TextureUnitStateIterator

Callers 8

createInstanceMethod · 0.80
writeInstanceMethod · 0.80
ensureLtcLUTPresentFunction · 0.80
_markNonFFPMethod · 0.80
createInstanceMethod · 0.80
writeInstanceMethod · 0.80
writeTextureUnitMethod · 0.80

Calls 4

distanceFunction · 0.50
getParentMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected