Shaders
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user