From 1dfd3fd9d9c7961e177e6f0d5206425aa58a7bc0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Branimir=20Karad=C5=BEi=C4=87?= Date: Tue, 13 Oct 2015 18:28:22 -0700 Subject: [PATCH] Added debug check for arguments. --- src/bgfx_p.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/bgfx_p.h b/src/bgfx_p.h index a25d1b83..b7bbcf67 100644 --- a/src/bgfx_p.h +++ b/src/bgfx_p.h @@ -321,7 +321,7 @@ namespace bgfx || BGFX_TEXTURE_W_BORDER == (_flags & BGFX_TEXTURE_W_BORDER) ; } - + void dump(const VertexDecl& _decl); struct TextVideoMem @@ -3385,6 +3385,7 @@ namespace bgfx BGFX_API_FUNC(void setIndexBuffer(const TransientIndexBuffer* _tib, uint32_t _firstIndex, uint32_t _numIndices) ) { + BGFX_CHECK_HANDLE("setIndexBuffer", m_indexBufferHandle, _tib->handle); m_submit->setIndexBuffer(_tib, _firstIndex, _numIndices); } @@ -3402,6 +3403,7 @@ namespace bgfx BGFX_API_FUNC(void setVertexBuffer(const TransientVertexBuffer* _tvb, uint32_t _startVertex, uint32_t _numVertices) ) { + BGFX_CHECK_HANDLE("setVertexBuffer", m_vertexBufferHandle, _tvb->handle); m_submit->setVertexBuffer(_tvb, _startVertex, _numVertices); }