From 3967d894eb1e4f7efa1bbe383f794ee35c6fd4fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Branimir=20Karad=C5=BEi=C4=87?= Date: Fri, 9 Jun 2017 21:59:37 -0700 Subject: [PATCH] Cleanup. --- examples/13-stencil/stencil.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/examples/13-stencil/stencil.cpp b/examples/13-stencil/stencil.cpp index 3415dc5d5..7b7098c0e 100644 --- a/examples/13-stencil/stencil.cpp +++ b/examples/13-stencil/stencil.cpp @@ -741,7 +741,7 @@ struct Mesh const Group& group = *it; bgfx::destroyVertexBuffer(group.m_vbh); - if (bgfx::kInvalidHandle != group.m_ibh.idx) + if (bgfx::isValid(group.m_ibh) ) { bgfx::destroyIndexBuffer(group.m_ibh); } @@ -770,10 +770,7 @@ struct Mesh bgfx::setVertexBuffer(0, group.m_vbh); // Set texture - if (bgfx::kInvalidHandle != _texture.idx) - { - bgfx::setTexture(0, s_texColor, _texture); - } + bgfx::setTexture(0, s_texColor, _texture); // Apply render state bgfx::setStencil(_renderState.m_fstencil, _renderState.m_bstencil);