/* ================ R_GenerateSubViews If we need to render another view to complete the current view, generate it first. It is important to do this after all drawSurfs for the current view have been generated, because it may create a subview which would change tr.viewCount. ================ */ bool R_GenerateSubViews( void ) { drawSurf_t *drawSurf; int i; bool subviews; const idMaterial *shader; // for testing the performance hit if ( r_skipSubviews.GetBool() ) { return false; } subviews = false; // scan the surfaces until we either find a subview, or determine // there are no more subview surfaces. for ( i = 0 ; i < tr.viewDef->numDrawSurfs ; i++ ) { drawSurf = tr.viewDef->drawSurfs[i]; shader = drawSurf->material; if ( !shader || !shader->HasSubview() ) { continue; } if ( R_GenerateSurfaceSubview( drawSurf ) ) { subviews = true; } } return subviews; }
/* ================ R_GenerateSubViews If we need to render another view to complete the current view, generate it first. It is important to do this after all drawSurfs for the current view have been generated, because it may create a subview which would change tr.viewCount. ================ */ bool R_GenerateSubViews( const drawSurf_t* const drawSurfs[], const int numDrawSurfs ) { SCOPED_PROFILE_EVENT( "R_GenerateSubViews" ); // for testing the performance hit if( r_skipSubviews.GetBool() ) { return false; } // scan the surfaces until we either find a subview, or determine // there are no more subview surfaces. bool subviews = false; for( int i = 0; i < numDrawSurfs; i++ ) { const drawSurf_t* drawSurf = drawSurfs[i]; if( !drawSurf->material->HasSubview() ) { continue; } if( R_GenerateSurfaceSubview( drawSurf ) ) { subviews = true; } } return subviews; }