From e563dedb253ea3fc1c34fcfdc22170c03685ffc8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Branimir=20Karad=C5=BEi=C4=87?= Date: Sat, 3 Feb 2018 11:18:21 -0800 Subject: [PATCH] Cleanup. --- include/bgfx/bgfx.h | 6 +++--- src/bgfx.cpp | 12 +++++++++--- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/include/bgfx/bgfx.h b/include/bgfx/bgfx.h index 8140d4c05..ba82e66c6 100644 --- a/include/bgfx/bgfx.h +++ b/include/bgfx/bgfx.h @@ -2199,7 +2199,7 @@ namespace bgfx /// void destroy(DynamicVertexBufferHandle _handle); - /// Returns number of available indices. + /// Returns number of requested or maximum available indices. /// /// @param[in] _num Number of required indices. /// @@ -2207,7 +2207,7 @@ namespace bgfx /// uint32_t getAvailTransientIndexBuffer(uint32_t _num); - /// Returns number of available vertices. + /// Returns number of requested or maximum available vertices. /// /// @param[in] _num Number of required vertices. /// @param[in] _decl Vertex declaration. @@ -2219,7 +2219,7 @@ namespace bgfx , const VertexDecl& _decl ); - /// Returns number of available instance buffer slots. + /// Returns number of requested or maximum available instance buffer slots. /// /// @param[in] _num Number of required instances. /// @param[in] _stride Stride per instance. diff --git a/src/bgfx.cpp b/src/bgfx.cpp index ec8ba1563..64eb0c3b3 100644 --- a/src/bgfx.cpp +++ b/src/bgfx.cpp @@ -3413,7 +3413,9 @@ error: BX_CHECK(NULL != _tib, "_tib can't be NULL"); BX_CHECK(0 < _num, "Requesting 0 indices."); s_ctx->allocTransientIndexBuffer(_tib, _num); - BX_CHECK(_num == _tib->size/2, "Failed to allocate transient index buffer (requested %d, available %d). Use bgfx::checkAvailTransient* functions to ensure availability." + BX_CHECK(_num == _tib->size/2 + , "Failed to allocate transient index buffer (requested %d, available %d). " + "Use bgfx::getAvailTransient* functions to ensure availability." , _num , _tib->size/2 ); @@ -3426,7 +3428,9 @@ error: BX_CHECK(UINT16_MAX >= _num, "Requesting %d vertices (max: %d).", _num, UINT16_MAX); BX_CHECK(isValid(_decl), "Invalid VertexDecl."); s_ctx->allocTransientVertexBuffer(_tvb, _num, _decl); - BX_CHECK(_num == _tvb->size / _decl.m_stride, "Failed to allocate transient vertex buffer (requested %d, available %d). Use bgfx::checkAvailTransient* functions to ensure availability." + BX_CHECK(_num == _tvb->size / _decl.m_stride + , "Failed to allocate transient vertex buffer (requested %d, available %d). " + "Use bgfx::getAvailTransient* functions to ensure availability." , _num , _tvb->size / _decl.m_stride ); @@ -3453,7 +3457,9 @@ error: BX_CHECK(_stride == BX_ALIGN_16(_stride), "Stride must be multiple of 16."); BX_CHECK(0 < _num, "Requesting 0 instanced data vertices."); s_ctx->allocInstanceDataBuffer(_idb, _num, _stride); - BX_CHECK(_num == _idb->size / _stride, "Failed to allocate instance data buffer (requested %d, available %d). Use bgfx::checkAvailTransient* functions to ensure availability." + BX_CHECK(_num == _idb->size / _stride + , "Failed to allocate instance data buffer (requested %d, available %d). " + "Use bgfx::getAvailTransient* functions to ensure availability." , _num , _idb->size / _stride );