void RAS_BucketManager::Renderbuckets( const MT_Transform& cameratrans, RAS_IRasterizer* rasty, RAS_IRenderTools* rendertools) { /* beginning each frame, clear (texture/material) caching information */ rasty->ClearCachingInfo(); RenderSolidBuckets(cameratrans, rasty, rendertools); RenderAlphaBuckets(cameratrans, rasty, rendertools); rendertools->SetClientObject(rasty, NULL); }
void RAS_BucketManager::Renderbuckets( const MT_Transform& cameratrans, RAS_IRasterizer* rasty, RAS_IRenderTools* rendertools) { /* beginning each frame, clear (texture/material) caching information */ rasty->ClearCachingInfo(); RenderSolidBuckets(cameratrans, rasty, rendertools); RenderAlphaBuckets(cameratrans, rasty, rendertools); /* All meshes should be up to date now */ /* Don't do this while processing buckets because some meshes are split between buckets */ BucketList::iterator bit; list<RAS_MeshSlot>::iterator mit; for (bit = m_SolidBuckets.begin(); bit != m_SolidBuckets.end(); ++bit) { /* This (and the similar lines of code for the alpha buckets) is kind of a hacky fix for #34382. If we're * drawing shadows and the material doesn't cast shadows, then the mesh is still modified, so we don't want to * set MeshModified to false yet. This will happen correctly in the main render pass. */ if (rasty->GetDrawingMode() == RAS_IRasterizer::KX_SHADOW && !(*bit)->GetPolyMaterial()->CastsShadows()) continue; for (mit = (*bit)->msBegin(); mit != (*bit)->msEnd(); ++mit) { mit->m_mesh->SetMeshModified(false); } } for (bit = m_AlphaBuckets.begin(); bit != m_AlphaBuckets.end(); ++bit) { if (rasty->GetDrawingMode() == RAS_IRasterizer::KX_SHADOW && !(*bit)->GetPolyMaterial()->CastsShadows()) continue; for (mit = (*bit)->msBegin(); mit != (*bit)->msEnd(); ++mit) { mit->m_mesh->SetMeshModified(false); } } rendertools->SetClientObject(rasty, NULL); }