Remove (almost) all references to pRenderer (#651)

Remove all references to pRenderer, except from the DebugDraw and LyShine Gems that are still being updated.
This commit is contained in:
bosnichd
2021-05-10 10:05:15 -06:00
committed by GitHub
parent 4a2e6a77b5
commit 440c40e490
191 changed files with 118 additions and 23548 deletions
@@ -348,34 +348,6 @@ bool CAnimScreenFaderNode::GetParamInfoFromType(const CAnimParamType& paramId, S
//-----------------------------------------------------------------------------
void CAnimScreenFaderNode::Render()
{
if (!m_bActive)
{
return;
}
if (gEnv->pRenderer)
{
size_t const paramCount = m_tracks.size();
for (size_t paramIndex = 0; paramIndex < paramCount; ++paramIndex)
{
CScreenFaderTrack* pTrack = static_cast<CScreenFaderTrack*>(GetTrackForParameter(AnimParamType::ScreenFader, paramIndex));
if (!pTrack)
{
continue;
}
int textureId = -1;
if (pTrack->IsTextureVisible())
{
textureId = (pTrack->GetActiveTexture() != 0) ? pTrack->GetActiveTexture()->GetTextureID() : -1;
}
gEnv->pRenderer->SetState(GS_BLSRC_SRCALPHA | GS_BLDST_ONEMINUSSRCALPHA | GS_NODEPTHTEST);
gEnv->pRenderer->Draw2dImage(0, 0, m_screenWidth, m_screenHeight, textureId, 0.0f, 1.0f, 1.0f, 0.0f, 0.f,
pTrack->GetDrawColor().x, pTrack->GetDrawColor().y, pTrack->GetDrawColor().z, pTrack->GetDrawColor().w, 0.f);
}
}
}
bool CAnimScreenFaderNode::IsAnyTextureVisible() const