Branimir Karadžić пре 8 година
родитељ
комит
3967d894eb
1 измењених фајлова са 2 додато и 5 уклоњено
  1. 2 5
      examples/13-stencil/stencil.cpp

+ 2 - 5
examples/13-stencil/stencil.cpp

@@ -741,7 +741,7 @@ struct Mesh
 			const Group& group = *it;
 			const Group& group = *it;
 			bgfx::destroyVertexBuffer(group.m_vbh);
 			bgfx::destroyVertexBuffer(group.m_vbh);
 
 
-			if (bgfx::kInvalidHandle != group.m_ibh.idx)
+			if (bgfx::isValid(group.m_ibh) )
 			{
 			{
 				bgfx::destroyIndexBuffer(group.m_ibh);
 				bgfx::destroyIndexBuffer(group.m_ibh);
 			}
 			}
@@ -770,10 +770,7 @@ struct Mesh
 			bgfx::setVertexBuffer(0, group.m_vbh);
 			bgfx::setVertexBuffer(0, group.m_vbh);
 
 
 			// Set texture
 			// Set texture
-			if (bgfx::kInvalidHandle != _texture.idx)
-			{
-				bgfx::setTexture(0, s_texColor, _texture);
-			}
+			bgfx::setTexture(0, s_texColor, _texture);
 
 
 			// Apply render state
 			// Apply render state
 			bgfx::setStencil(_renderState.m_fstencil, _renderState.m_bstencil);
 			bgfx::setStencil(_renderState.m_fstencil, _renderState.m_bstencil);