MCPcopy Create free account
hub / github.com/carbonengine/trinity / GetVertexDeclarationHandle

Method GetVertexDeclarationHandle

trinity/Shader/Tr2EffectStateManager.cpp:863–877  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

861}
862
863uint32_t Tr2EffectStateManager::GetVertexDeclarationHandle( const Tr2VertexDefinition& vertexDefinition )
864{
865 std::scoped_lock lock( s_vertexLayoutMutex );
866
867 for( size_t i = 0; i != s_vertexLayoutMap.size(); ++i )
868 {
869 if( s_vertexLayoutMap[i].first == vertexDefinition )
870 {
871 return (uint32_t)i;
872 }
873 }
874
875 s_vertexLayoutMap.push_back( std::make_pair( vertexDefinition, new Tr2VertexLayoutAL() ) );
876 return (uint32_t)s_vertexLayoutMap.size() - 1;
877}
878
879void Tr2EffectStateManager::ApplyVertexDeclaration( uint32_t declaration )
880{

Callers 1

Calls 1

sizeMethod · 0.80

Tested by

no test coverage detected