| 7 | |
| 8 | |
| 9 | TriStepResult Tr2StepExecuteRenderNode::Execute( Be::Time realTime, Be::Time simTime, Tr2RenderContext& renderContext ) |
| 10 | { |
| 11 | if( !m_destinationTarget || !m_destinationTarget->IsValid() ) |
| 12 | { |
| 13 | if( !m_failedLastTime ) |
| 14 | { |
| 15 | CCP_LOGERR( "Tr2StepExecuteRenderNode::Execute called without a valid destination target" ); |
| 16 | } |
| 17 | m_failedLastTime = true; |
| 18 | return RS_FAILED; |
| 19 | } |
| 20 | if( !m_node ) |
| 21 | { |
| 22 | if( !m_failedLastTime ) |
| 23 | { |
| 24 | CCP_LOGWARN( "Tr2StepExecuteRenderNode::Execute called without a valid render node" ); |
| 25 | } |
| 26 | m_failedLastTime = true; |
| 27 | if( m_clearTargetOnFailure ) |
| 28 | { |
| 29 | ClearOnFailure( renderContext ); |
| 30 | return RS_OK; |
| 31 | } |
| 32 | return RS_FAILED; |
| 33 | } |
| 34 | |
| 35 | if( !m_node->Validate( { &m_destinationTarget->GetRenderTarget().GetDesc(), 1 }, {}, realTime, simTime ) ) |
| 36 | { |
| 37 | if( !m_failedLastTime ) |
| 38 | { |
| 39 | CCP_LOGWARN( "Tr2StepExecuteRenderNode::Execute render node validation failed" ); |
| 40 | } |
| 41 | m_failedLastTime = true; |
| 42 | if( m_clearTargetOnFailure ) |
| 43 | { |
| 44 | ClearOnFailure( renderContext ); |
| 45 | return RS_OK; |
| 46 | } |
| 47 | return RS_FAILED; |
| 48 | } |
| 49 | m_node->Execute( { &m_destinationTarget->GetRenderTarget(), 1 }, {}, realTime, simTime, m_timer, renderContext ); |
| 50 | m_failedLastTime = false; |
| 51 | return RS_OK; |
| 52 | } |
| 53 | |
| 54 | void Tr2StepExecuteRenderNode::ClearOnFailure( Tr2RenderContext& renderContext ) |
| 55 | { |
nothing calls this directly
no test coverage detected