This commit is contained in:
Kirill Yurkin
2025-03-07 18:08:28 +03:00
parent 719171e7d8
commit e45d21b621
12 changed files with 1185 additions and 4 deletions

View File

@@ -21,6 +21,7 @@ RenderDevice::RenderDevice()
m_blending = false;
m_activeReadRT = NULL;
m_activeWriteRT = NULL;
m_backfaceCull = false;
}
RenderDevice::~RenderDevice()
@@ -158,6 +159,14 @@ void RenderDevice::SetWriteRenderTarget(RenderTarget* renderTarget)
}
}
void RenderDevice::SetBackfaceCull(bool value)
{
if (m_backfaceCull != value) {
m_backfaceCull = value;
value ? glEnable(GL_CULL_FACE) : glDisable(GL_CULL_FACE);
}
}
void RenderDevice::SetViewport(int x, int y, int w, int h)
{
glViewport(x, y, w, h);