| 15 | { |
| 16 | |
| 17 | ALResult Tr2VertexLayoutAL::Create( const Tr2VertexDefinition& definition, Tr2RenderContextAL& renderContext ) |
| 18 | { |
| 19 | if( !renderContext.IsValid() ) |
| 20 | { |
| 21 | return E_FAIL; |
| 22 | } |
| 23 | |
| 24 | m_definition = std::unique_ptr<Tr2VertexDefinition>( new Tr2VertexDefinition( definition ) ); |
| 25 | if( definition.m_items.empty() ) |
| 26 | { |
| 27 | return E_FAIL; |
| 28 | } |
| 29 | return S_OK; |
| 30 | } |
| 31 | |
| 32 | void Tr2VertexLayoutAL::Destroy() |
| 33 | { |