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

Method TechniqueInBatch

trinity/Tr2RenderContext.cpp:432–455  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

430}
431
432bool Tr2RenderContextBase::TechniqueInBatch( const std::vector<Tr2RenderBatch>& batches, const BlueSharedString& techniqueName )
433{
434 Tr2Shader* prevShader = nullptr;
435 for( auto& batch : batches )
436 {
437 if( batch.m_shader == prevShader )
438 {
439 continue;
440 }
441 prevShader = batch.m_shader;
442 uint32_t technique;
443 if( !batch.m_shader->GetTechniqueIndex( techniqueName, technique ) )
444 {
445 continue;
446 }
447 const uint32_t passCount = batch.m_shader->GetPassCount( technique );
448 if( passCount == 0 )
449 {
450 continue;
451 }
452 return true;
453 }
454 return false;
455}
456
457void Tr2RenderContextBase::RenderBatchGroup( std::vector<Tr2RenderBatch>::const_iterator startBatch, const BlueSharedString& techniqueName, Tr2ConstantBufferAL** buffers, Tr2RenderContext& renderContext )
458{

Calls 2

GetTechniqueIndexMethod · 0.80
GetPassCountMethod · 0.80

Tested by

no test coverage detected