From 744051643f1de807edda3073fe8ecabcbaeabf7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Branimir=20Karad=C5=BEi=C4=87?= Date: Tue, 5 Apr 2016 15:31:32 -0700 Subject: [PATCH] debugdraw: Fixed state. --- examples/common/debugdraw/debugdraw.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/common/debugdraw/debugdraw.cpp b/examples/common/debugdraw/debugdraw.cpp index 87bc1e653..44a2fccf0 100644 --- a/examples/common/debugdraw/debugdraw.cpp +++ b/examples/common/debugdraw/debugdraw.cpp @@ -1276,8 +1276,8 @@ private: bgfx::setState(0 | BGFX_STATE_RGB_WRITE | BGFX_STATE_PT_LINES - | (m_depthTestLess ? BGFX_STATE_DEPTH_TEST_LEQUAL : BGFX_STATE_DEPTH_TEST_GEQUAL) - | BGFX_STATE_DEPTH_WRITE + | ((m_attrib[m_stack].m_state & BGFX_STATE_DEPTH_TEST_MASK) ? (m_depthTestLess ? BGFX_STATE_DEPTH_TEST_LEQUAL : BGFX_STATE_DEPTH_TEST_GEQUAL) : 0) + | ((m_attrib[m_stack].m_state & BGFX_STATE_DEPTH_WRITE) ? BGFX_STATE_DEPTH_WRITE : 0) | BGFX_STATE_LINEAA | BGFX_STATE_BLEND_ALPHA );