Disable cull face after drawing mesh (for gui)

This commit is contained in:
Benau 2018-01-04 14:39:32 +08:00
parent d24796aa6f
commit 60b173559a
2 changed files with 6 additions and 0 deletions

View File

@ -401,6 +401,7 @@ void ShaderBasedRenderer::renderSceneDeferred(scene::ICameraSceneNode * const ca
TextBillboardDrawer::drawAll();
PROFILER_POP_CPU_MARKER();
}
glDisable(GL_CULL_FACE);
// Now all instancing data from mesh and particle are done drawing
m_draw_calls.setFenceSync();
@ -514,6 +515,7 @@ void ShaderBasedRenderer::renderScene(scene::ICameraSceneNode * const camnode,
TextBillboardDrawer::drawAll();
PROFILER_POP_CPU_MARKER();
}
glDisable(GL_CULL_FACE);
// Now all instancing data from mesh and particle are done drawing
m_draw_calls.setFenceSync();

View File

@ -59,6 +59,10 @@ void addTextBillboard(STKTextBillboard* tb)
// ----------------------------------------------------------------------------
void drawAll()
{
if (g_tbs.empty())
{
return;
}
glEnable(GL_DEPTH_TEST);
glDepthMask(GL_TRUE);
glEnable(GL_CULL_FACE);