From 895f697f504afb410b1bd345886eb3024a13f978 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Branimir=20Karad=C5=BEi=C4=87?= Date: Mon, 16 Feb 2015 19:01:32 -0800 Subject: [PATCH 1/4] Removed 16-bit API limit from vertex buffer. --- include/bgfx.h | 4 ++-- src/bgfx.cpp | 4 ++-- src/bgfx_p.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/bgfx.h b/include/bgfx.h index 4c870c53..3ac04888 100644 --- a/include/bgfx.h +++ b/include/bgfx.h @@ -687,7 +687,7 @@ namespace bgfx /// When buffer is created with `BGFX_BUFFER_COMPUTE_WRITE` flag it cannot be updated /// from CPU. /// - DynamicVertexBufferHandle createDynamicVertexBuffer(uint16_t _num, const VertexDecl& _decl, uint8_t _flags = BGFX_BUFFER_NONE); + DynamicVertexBufferHandle createDynamicVertexBuffer(uint32_t _num, const VertexDecl& _decl, uint8_t _flags = BGFX_BUFFER_NONE); /// Create dynamic vertex buffer and initialize it. /// @@ -766,7 +766,7 @@ namespace bgfx /// @remarks /// Only 16-bit index buffer is supported. /// - bool allocTransientBuffers(TransientVertexBuffer* _tvb, const VertexDecl& _decl, uint16_t _numVertices, TransientIndexBuffer* _tib, uint16_t _numIndices); + bool allocTransientBuffers(TransientVertexBuffer* _tvb, const VertexDecl& _decl, uint32_t _numVertices, TransientIndexBuffer* _tib, uint32_t _numIndices); /// Allocate instance data buffer. /// diff --git a/src/bgfx.cpp b/src/bgfx.cpp index 73ddd5fe..127cbb49 100644 --- a/src/bgfx.cpp +++ b/src/bgfx.cpp @@ -2163,7 +2163,7 @@ again: s_ctx->destroyDynamicIndexBuffer(_handle); } - DynamicVertexBufferHandle createDynamicVertexBuffer(uint16_t _num, const VertexDecl& _decl, uint8_t _flags) + DynamicVertexBufferHandle createDynamicVertexBuffer(uint32_t _num, const VertexDecl& _decl, uint8_t _flags) { BGFX_CHECK_MAIN_THREAD(); BX_CHECK(0 != _decl.m_stride, "Invalid VertexDecl."); @@ -2239,7 +2239,7 @@ again: return s_ctx->allocTransientVertexBuffer(_tvb, _num, _decl); } - bool allocTransientBuffers(bgfx::TransientVertexBuffer* _tvb, const bgfx::VertexDecl& _decl, uint16_t _numVertices, bgfx::TransientIndexBuffer* _tib, uint16_t _numIndices) + bool allocTransientBuffers(bgfx::TransientVertexBuffer* _tvb, const bgfx::VertexDecl& _decl, uint32_t _numVertices, bgfx::TransientIndexBuffer* _tib, uint32_t _numIndices) { if (checkAvailTransientBuffers(_numVertices, _decl, _numIndices) ) { diff --git a/src/bgfx_p.h b/src/bgfx_p.h index e158b602..c0b2ad71 100644 --- a/src/bgfx_p.h +++ b/src/bgfx_p.h @@ -2178,7 +2178,7 @@ namespace bgfx return ptr; } - BGFX_API_FUNC(DynamicVertexBufferHandle createDynamicVertexBuffer(uint16_t _num, const VertexDecl& _decl, uint8_t _flags) ) + BGFX_API_FUNC(DynamicVertexBufferHandle createDynamicVertexBuffer(uint32_t _num, const VertexDecl& _decl, uint8_t _flags) ) { DynamicVertexBufferHandle handle = BGFX_INVALID_HANDLE; uint32_t size = strideAlign16( (_num+1)*_decl.m_stride, _decl.m_stride); From 13ac805085388955f6489780cc51c2c89fa9e872 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Branimir=20Karad=C5=BEi=C4=87?= Date: Mon, 16 Feb 2015 21:58:13 -0800 Subject: [PATCH 2/4] Cleanup. --- examples/02-metaballs/metaballs.cpp | 9 +++++---- examples/13-stencil/stencil.cpp | 15 ++------------- examples/14-shadowvolumes/shadowvolumes.cpp | 12 ++---------- examples/16-shadowmaps/shadowmaps.cpp | 12 ++---------- examples/17-drawstress/drawstress.cpp | 1 + examples/common/bgfx_utils.cpp | 1 + examples/common/cube_atlas.cpp | 5 +++-- examples/common/font/text_buffer_manager.cpp | 7 ++++--- examples/common/imgui/imgui.cpp | 7 ++++--- examples/common/imgui/ocornut_imgui.cpp | 1 + examples/common/nanovg/nanovg_bgfx.cpp | 1 + src/bgfx.cpp | 7 +++++-- 12 files changed, 31 insertions(+), 47 deletions(-) diff --git a/examples/02-metaballs/metaballs.cpp b/examples/02-metaballs/metaballs.cpp index f253fac2..3689b14a 100644 --- a/examples/02-metaballs/metaballs.cpp +++ b/examples/02-metaballs/metaballs.cpp @@ -495,6 +495,7 @@ int _main_(int /*_argc*/, char** /*_argv*/) break; case bgfx::RendererType::Direct3D11: + case bgfx::RendererType::Direct3D12: vs_metaballs = bgfx::makeRef(vs_metaballs_dx11, sizeof(vs_metaballs_dx11) ); fs_metaballs = bgfx::makeRef(fs_metaballs_dx11, sizeof(fs_metaballs_dx11) ); break; @@ -544,7 +545,7 @@ int _main_(int /*_argc*/, char** /*_argv*/) float at[3] = { 0.0f, 0.0f, 0.0f }; float eye[3] = { 0.0f, 0.0f, -50.0f }; - + // Set view and projection matrix for view 0. const bgfx::HMD* hmd = bgfx::getHMD(); if (NULL != hmd) @@ -598,7 +599,7 @@ int _main_(int /*_argc*/, char** /*_argv*/) } profUpdate = bx::getHPCounter(); - + for (uint32_t zz = 0; zz < DIMS; ++zz) { for (uint32_t yy = 0; yy < DIMS; ++yy) @@ -690,7 +691,7 @@ int _main_(int /*_argc*/, char** /*_argv*/) -DIMS*0.5f + float(zz) }; - const Grid* val[8] = { + const Grid* val[8] = { &grid[xoffset+zpitch+ypitch ], &grid[xoffset+zpitch+ypitch+1], &grid[xoffset+ypitch+1 ], @@ -735,7 +736,7 @@ int _main_(int /*_argc*/, char** /*_argv*/) bgfx::dbgTextPrintf(1, 7, 0x0f, " Triangulate: % 7.3f[ms]", double(profTriangulate)*toMs); bgfx::dbgTextPrintf(1, 8, 0x0f, " Frame: % 7.3f[ms]", double(frameTime)*toMs); - // Advance to next frame. Rendering thread will be kicked to + // Advance to next frame. Rendering thread will be kicked to // process submitted rendering primitives. bgfx::frame(); } diff --git a/examples/13-stencil/stencil.cpp b/examples/13-stencil/stencil.cpp index a20124d0..9aed135c 100644 --- a/examples/13-stencil/stencil.cpp +++ b/examples/13-stencil/stencil.cpp @@ -146,7 +146,6 @@ static const uint16_t s_planeIndices[] = 1, 3, 2, }; -static const char* s_shaderPath = NULL; static bool s_flipV = false; static uint32_t s_viewMask = 0; static uint32_t s_clearMask = 0; @@ -858,22 +857,12 @@ int _main_(int /*_argc*/, char** /*_argv*/) switch (bgfx::getRendererType() ) { default: - case bgfx::RendererType::Direct3D9: - s_shaderPath = "shaders/dx9/"; - break; - - case bgfx::RendererType::Direct3D11: - s_shaderPath = "shaders/dx11/"; - break; - case bgfx::RendererType::OpenGL: - s_shaderPath = "shaders/glsl/"; + case bgfx::RendererType::OpenGLES: s_flipV = true; break; - case bgfx::RendererType::OpenGLES: - s_shaderPath = "shaders/gles/"; - s_flipV = true; + default:8 break; } diff --git a/examples/14-shadowvolumes/shadowvolumes.cpp b/examples/14-shadowvolumes/shadowvolumes.cpp index aa0f8bcc..d8411248 100644 --- a/examples/14-shadowvolumes/shadowvolumes.cpp +++ b/examples/14-shadowvolumes/shadowvolumes.cpp @@ -111,7 +111,6 @@ static const uint16_t s_planeIndices[] = 1, 3, 2, }; -static const char* s_shaderPath = NULL; static bool s_oglNdc = false; static float s_texelHalf = 0.0f; @@ -1874,22 +1873,15 @@ int _main_(int /*_argc*/, char** /*_argv*/) { default: case bgfx::RendererType::Direct3D9: - s_shaderPath = "shaders/dx9/"; s_texelHalf = 0.5f; break; - case bgfx::RendererType::Direct3D11: - s_shaderPath = "shaders/dx11/"; - break; - case bgfx::RendererType::OpenGL: - s_shaderPath = "shaders/glsl/"; + case bgfx::RendererType::OpenGLES: s_oglNdc = true; break; - case bgfx::RendererType::OpenGLES: - s_shaderPath = "shaders/gles/"; - s_oglNdc = true; + default: break; } diff --git a/examples/16-shadowmaps/shadowmaps.cpp b/examples/16-shadowmaps/shadowmaps.cpp index 1589290d..01dc3228 100644 --- a/examples/16-shadowmaps/shadowmaps.cpp +++ b/examples/16-shadowmaps/shadowmaps.cpp @@ -220,7 +220,6 @@ static const uint16_t s_planeIndices[] = 1, 3, 2, }; -static const char* s_shaderPath = NULL; static bool s_flipV = false; static float s_texelHalf = 0.0f; @@ -1335,22 +1334,15 @@ int _main_(int /*_argc*/, char** /*_argv*/) { default: case bgfx::RendererType::Direct3D9: - s_shaderPath = "shaders/dx9/"; s_texelHalf = 0.5f; break; - case bgfx::RendererType::Direct3D11: - s_shaderPath = "shaders/dx11/"; - break; - case bgfx::RendererType::OpenGL: - s_shaderPath = "shaders/glsl/"; + case bgfx::RendererType::OpenGLES: s_flipV = true; break; - case bgfx::RendererType::OpenGLES: - s_shaderPath = "shaders/gles/"; - s_flipV = true; + default: break; } diff --git a/examples/17-drawstress/drawstress.cpp b/examples/17-drawstress/drawstress.cpp index 93a1bc92..43101514 100644 --- a/examples/17-drawstress/drawstress.cpp +++ b/examples/17-drawstress/drawstress.cpp @@ -280,6 +280,7 @@ int _main_(int /*_argc*/, char** /*_argv*/) break; case bgfx::RendererType::Direct3D11: + case bgfx::RendererType::Direct3D12: vs_drawstress = bgfx::makeRef(vs_drawstress_dx11, sizeof(vs_drawstress_dx11) ); fs_drawstress = bgfx::makeRef(fs_drawstress_dx11, sizeof(fs_drawstress_dx11) ); break; diff --git a/examples/common/bgfx_utils.cpp b/examples/common/bgfx_utils.cpp index 0035076d..a638e4e7 100644 --- a/examples/common/bgfx_utils.cpp +++ b/examples/common/bgfx_utils.cpp @@ -71,6 +71,7 @@ static bgfx::ShaderHandle loadShader(bx::FileReaderI* _reader, const char* _name switch (bgfx::getRendererType() ) { case bgfx::RendererType::Direct3D11: + case bgfx::RendererType::Direct3D12: shaderPath = "shaders/dx11/"; break; diff --git a/examples/common/cube_atlas.cpp b/examples/common/cube_atlas.cpp index 15d91b98..6928338a 100644 --- a/examples/common/cube_atlas.cpp +++ b/examples/common/cube_atlas.cpp @@ -60,8 +60,8 @@ private: int32_t width; //< The line _width. The ending coordinate (inclusive) will be x+width-1. }; - - uint32_t m_width; //< width (in pixels) of the underlying texture + + uint32_t m_width; //< width (in pixels) of the underlying texture uint32_t m_height; //< height (in pixels) of the underlying texture uint32_t m_usedSpace; //< Surface used in squared pixel std::vector m_skyline; //< node of the skyline algorithm @@ -326,6 +326,7 @@ void Atlas::init() break; case bgfx::RendererType::Direct3D11: + case bgfx::RendererType::Direct3D12: m_texelOffset[0] = texelHalf; m_texelOffset[1] = texelHalf; break; diff --git a/examples/common/font/text_buffer_manager.cpp b/examples/common/font/text_buffer_manager.cpp index 654d1cab..f3dd5134 100644 --- a/examples/common/font/text_buffer_manager.cpp +++ b/examples/common/font/text_buffer_manager.cpp @@ -74,7 +74,7 @@ public: /// Append a wide char unicode string to the buffer using current pen /// position and color. void appendText(FontHandle _fontHandle, const wchar_t* _string, const wchar_t* _end = NULL); - + /// Append a whole face of the atlas cube, mostly used for debugging /// and visualizing atlas. void appendAtlasFace(uint16_t _faceIndex); @@ -250,7 +250,7 @@ void TextBuffer::appendText(FontHandle _fontHandle, const char* _string, const c } } - BX_CHECK(state == UTF8_ACCEPT, "The string is not well-formed"); + BX_CHECK(state == UTF8_ACCEPT, "The string is not well-formed"); } void TextBuffer::appendText(FontHandle _fontHandle, const wchar_t* _string, const wchar_t* _end) @@ -366,7 +366,7 @@ void TextBuffer::appendGlyph(FontHandle _handle, CodePoint _codePoint) float txtDecals = (font.ascender - m_lineAscender); m_lineAscender = font.ascender; - m_lineGap = font.lineGap; + m_lineGap = font.lineGap; verticalCenterLastLine( (txtDecals), (m_penY - m_lineAscender), (m_penY + m_lineAscender - m_lineDescender + m_lineGap) ); } @@ -575,6 +575,7 @@ TextBufferManager::TextBufferManager(FontManager* _fontManager) break; case bgfx::RendererType::Direct3D11: + case bgfx::RendererType::Direct3D12: vs_font_basic = bgfx::makeRef(vs_font_basic_dx11, sizeof(vs_font_basic_dx11) ); fs_font_basic = bgfx::makeRef(fs_font_basic_dx11, sizeof(fs_font_basic_dx11) ); vs_font_distance_field = bgfx::makeRef(vs_font_distance_field_dx11, sizeof(vs_font_distance_field_dx11) ); diff --git a/examples/common/imgui/imgui.cpp b/examples/common/imgui/imgui.cpp index 805b60b0..9e8039d3 100644 --- a/examples/common/imgui/imgui.cpp +++ b/examples/common/imgui/imgui.cpp @@ -468,9 +468,9 @@ struct Imgui IMGUI_create(_data, _size, _fontSize); m_nvg = nvgCreate(1, m_view); - nvgCreateFontMem(m_nvg, "default", (unsigned char*)_data, INT32_MAX, 0); - nvgFontSize(m_nvg, _fontSize); - nvgFontFace(m_nvg, "default"); + nvgCreateFontMem(m_nvg, "default", (unsigned char*)_data, INT32_MAX, 0); + nvgFontSize(m_nvg, _fontSize); + nvgFontFace(m_nvg, "default"); for (int32_t ii = 0; ii < NUM_CIRCLE_VERTS; ++ii) { @@ -518,6 +518,7 @@ struct Imgui break; case bgfx::RendererType::Direct3D11: + case bgfx::RendererType::Direct3D12: vs_imgui_color = bgfx::makeRef(vs_imgui_color_dx11, sizeof(vs_imgui_color_dx11) ); fs_imgui_color = bgfx::makeRef(fs_imgui_color_dx11, sizeof(fs_imgui_color_dx11) ); vs_imgui_texture = bgfx::makeRef(vs_imgui_texture_dx11, sizeof(vs_imgui_texture_dx11) ); diff --git a/examples/common/imgui/ocornut_imgui.cpp b/examples/common/imgui/ocornut_imgui.cpp index 90998095..9df3b28c 100644 --- a/examples/common/imgui/ocornut_imgui.cpp +++ b/examples/common/imgui/ocornut_imgui.cpp @@ -99,6 +99,7 @@ struct OcornutImguiContext break; case bgfx::RendererType::Direct3D11: + case bgfx::RendererType::Direct3D12: vsmem = bgfx::makeRef(vs_ocornut_imgui_dx11, sizeof(vs_ocornut_imgui_dx11)); fsmem = bgfx::makeRef(fs_ocornut_imgui_dx11, sizeof(fs_ocornut_imgui_dx11)); break; diff --git a/examples/common/nanovg/nanovg_bgfx.cpp b/examples/common/nanovg/nanovg_bgfx.cpp index 09de7e72..40a1fbe8 100644 --- a/examples/common/nanovg/nanovg_bgfx.cpp +++ b/examples/common/nanovg/nanovg_bgfx.cpp @@ -239,6 +239,7 @@ namespace break; case bgfx::RendererType::Direct3D11: + case bgfx::RendererType::Direct3D12: vs_nanovg_fill = bgfx::makeRef(vs_nanovg_fill_dx11, sizeof(vs_nanovg_fill_dx11) ); fs_nanovg_fill = bgfx::makeRef(fs_nanovg_fill_dx11, sizeof(fs_nanovg_fill_dx11) ); break; diff --git a/src/bgfx.cpp b/src/bgfx.cpp index 127cbb49..6dce9647 100644 --- a/src/bgfx.cpp +++ b/src/bgfx.cpp @@ -355,6 +355,7 @@ namespace bgfx break; case RendererType::Direct3D11: + case RendererType::Direct3D12: mem = makeRef(vs_debugfont_dx11, sizeof(vs_debugfont_dx11) ); break; @@ -372,6 +373,7 @@ namespace bgfx break; case RendererType::Direct3D11: + case RendererType::Direct3D12: mem = makeRef(fs_debugfont_dx11, sizeof(fs_debugfont_dx11) ); break; @@ -552,7 +554,8 @@ namespace bgfx fragMem[ii] = makeRef(mem[ii].data, uint32_t(mem[ii].size) ); } } - else if (RendererType::Direct3D11 == g_caps.rendererType) + else if (RendererType::Direct3D11 == g_caps.rendererType + || RendererType::Direct3D12 == g_caps.rendererType) { vsh = createShader(makeRef(vs_clear_dx11, sizeof(vs_clear_dx11) ) ); @@ -1928,7 +1931,7 @@ again: uint8_t num = 0; for (uint8_t ii = 0; ii < uint8_t(RendererType::Count); ++ii) { - if (RendererType::Direct3D11 == ii + if ( (RendererType::Direct3D11 == ii || RendererType::Direct3D12 == ii) && windowsVersionIs(Condition::LessEqual, 0x0502) ) { continue; From aea6f9daf389f14a6dfc63389c44e6ba63800031 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Branimir=20Karad=C5=BEi=C4=87?= Date: Mon, 16 Feb 2015 22:05:19 -0800 Subject: [PATCH 3/4] Cleanup. --- examples/13-stencil/stencil.cpp | 3 +-- examples/14-shadowvolumes/shadowvolumes.cpp | 1 - examples/16-shadowmaps/shadowmaps.cpp | 1 - 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/examples/13-stencil/stencil.cpp b/examples/13-stencil/stencil.cpp index 9aed135c..a9f62402 100644 --- a/examples/13-stencil/stencil.cpp +++ b/examples/13-stencil/stencil.cpp @@ -856,13 +856,12 @@ int _main_(int /*_argc*/, char** /*_argv*/) // for each renderer. switch (bgfx::getRendererType() ) { - default: case bgfx::RendererType::OpenGL: case bgfx::RendererType::OpenGLES: s_flipV = true; break; - default:8 + default: break; } diff --git a/examples/14-shadowvolumes/shadowvolumes.cpp b/examples/14-shadowvolumes/shadowvolumes.cpp index d8411248..e6a79456 100644 --- a/examples/14-shadowvolumes/shadowvolumes.cpp +++ b/examples/14-shadowvolumes/shadowvolumes.cpp @@ -1871,7 +1871,6 @@ int _main_(int /*_argc*/, char** /*_argv*/) // for each renderer. switch (bgfx::getRendererType() ) { - default: case bgfx::RendererType::Direct3D9: s_texelHalf = 0.5f; break; diff --git a/examples/16-shadowmaps/shadowmaps.cpp b/examples/16-shadowmaps/shadowmaps.cpp index 01dc3228..86b3d708 100644 --- a/examples/16-shadowmaps/shadowmaps.cpp +++ b/examples/16-shadowmaps/shadowmaps.cpp @@ -1332,7 +1332,6 @@ int _main_(int /*_argc*/, char** /*_argv*/) // for each renderer. switch (bgfx::getRendererType() ) { - default: case bgfx::RendererType::Direct3D9: s_texelHalf = 0.5f; break; From 5ff63f93b6047be6b3e57f5dfd51aa5e8a49fd70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Branimir=20Karad=C5=BEi=C4=87?= Date: Mon, 16 Feb 2015 22:53:06 -0800 Subject: [PATCH 4/4] Cleanup. --- include/bgfx.c99.h | 4 ++-- src/bgfx.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/bgfx.c99.h b/include/bgfx.c99.h index df1930e5..f5a6fa7b 100644 --- a/include/bgfx.c99.h +++ b/include/bgfx.c99.h @@ -725,7 +725,7 @@ BGFX_C_API void bgfx_destroy_dynamic_index_buffer(bgfx_dynamic_index_buffer_hand * @param _num Number of vertices. * @param _decl Vertex declaration. */ -BGFX_C_API bgfx_dynamic_vertex_buffer_handle_t bgfx_create_dynamic_vertex_buffer(uint16_t _num, const bgfx_vertex_decl_t* _decl, uint8_t _flags); +BGFX_C_API bgfx_dynamic_vertex_buffer_handle_t bgfx_create_dynamic_vertex_buffer(uint32_t _num, const bgfx_vertex_decl_t* _decl, uint8_t _flags); /** * Create dynamic vertex buffer and initialize it. @@ -816,7 +816,7 @@ BGFX_C_API void bgfx_alloc_transient_vertex_buffer(bgfx_transient_vertex_buffer_ * NOTE: * Only 16-bit index buffer is supported. */ -BGFX_C_API bool bgfx_alloc_transient_buffers(bgfx_transient_vertex_buffer_t* _tvb, const bgfx_vertex_decl_t* _decl, uint16_t _numVertices, bgfx_transient_index_buffer_t* _tib, uint16_t _numIndices); +BGFX_C_API bool bgfx_alloc_transient_buffers(bgfx_transient_vertex_buffer_t* _tvb, const bgfx_vertex_decl_t* _decl, uint32_t _numVertices, bgfx_transient_index_buffer_t* _tib, uint32_t _numIndices); /** * Allocate instance data buffer. diff --git a/src/bgfx.cpp b/src/bgfx.cpp index 6dce9647..27a22223 100644 --- a/src/bgfx.cpp +++ b/src/bgfx.cpp @@ -3100,7 +3100,7 @@ BGFX_C_API void bgfx_destroy_dynamic_index_buffer(bgfx_dynamic_index_buffer_hand bgfx::destroyDynamicIndexBuffer(handle.cpp); } -BGFX_C_API bgfx_dynamic_vertex_buffer_handle_t bgfx_create_dynamic_vertex_buffer(uint16_t _num, const bgfx_vertex_decl_t* _decl, uint8_t _flags) +BGFX_C_API bgfx_dynamic_vertex_buffer_handle_t bgfx_create_dynamic_vertex_buffer(uint32_t _num, const bgfx_vertex_decl_t* _decl, uint8_t _flags) { const bgfx::VertexDecl& decl = *(const bgfx::VertexDecl*)_decl; union { bgfx_dynamic_vertex_buffer_handle_t c; bgfx::DynamicVertexBufferHandle cpp; } handle; @@ -3161,7 +3161,7 @@ BGFX_C_API void bgfx_alloc_transient_vertex_buffer(bgfx_transient_vertex_buffer_ bgfx::allocTransientVertexBuffer( (bgfx::TransientVertexBuffer*)_tvb, _num, decl); } -BGFX_C_API bool bgfx_alloc_transient_buffers(bgfx_transient_vertex_buffer_t* _tvb, const bgfx_vertex_decl_t* _decl, uint16_t _numVertices, bgfx_transient_index_buffer_t* _tib, uint16_t _numIndices) +BGFX_C_API bool bgfx_alloc_transient_buffers(bgfx_transient_vertex_buffer_t* _tvb, const bgfx_vertex_decl_t* _decl, uint32_t _numVertices, bgfx_transient_index_buffer_t* _tib, uint32_t _numIndices) { const bgfx::VertexDecl& decl = *(const bgfx::VertexDecl*)_decl; return bgfx::allocTransientBuffers( (bgfx::TransientVertexBuffer*)_tvb, decl, _numVertices, (bgfx::TransientIndexBuffer*)_tib, _numIndices);