Moved blend to context.

This commit is contained in:
Leonardo Zide
2021-11-22 16:18:09 -08:00
parent 89c0b58592
commit 94a5a5dc52
6 changed files with 60 additions and 22 deletions
+4 -4
View File
@@ -324,11 +324,11 @@ void lcScene::DrawTranslucentMeshes(lcContext* Context, bool DrawLit, bool DrawF
if (!DrawFadePrepass)
{
glEnable(GL_BLEND);
Context->EnableColorBlend(true);
Context->SetDepthWrite(false);
}
else
glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE);
Context->EnableColorWrite(false);
Context->SetPolygonOffset(lcPolygonOffset::Translucent);
@@ -409,10 +409,10 @@ void lcScene::DrawTranslucentMeshes(lcContext* Context, bool DrawLit, bool DrawF
if (!DrawFadePrepass)
{
Context->SetDepthWrite(true);
glDisable(GL_BLEND);
Context->EnableColorBlend(false);
}
else
glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
Context->EnableColorWrite(true);
}
void lcScene::Draw(lcContext* Context) const