diff options
author | 2018-12-05 19:45:08 +0100 | |
---|---|---|
committer | 2018-12-05 19:45:08 +0100 | |
commit | 0bd02131b644b61088789f52f31b750c9aecaa6d (patch) | |
tree | 811c679a1bba8b24fc7967cdfe73640254d64156 /3rdparty/bgfx/examples/common/font/text_buffer_manager.cpp | |
parent | 9a81ec7eaf00d73a23db5c003dc45b55d4b76c4a (diff) |
3rdparty: Updated bgfx, bimg, and bx to latest upstream. [Ryan Holtz]
Diffstat (limited to '3rdparty/bgfx/examples/common/font/text_buffer_manager.cpp')
-rw-r--r-- | 3rdparty/bgfx/examples/common/font/text_buffer_manager.cpp | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/3rdparty/bgfx/examples/common/font/text_buffer_manager.cpp b/3rdparty/bgfx/examples/common/font/text_buffer_manager.cpp index b442a811b67..c231a87c507 100644 --- a/3rdparty/bgfx/examples/common/font/text_buffer_manager.cpp +++ b/3rdparty/bgfx/examples/common/font/text_buffer_manager.cpp @@ -700,7 +700,7 @@ void TextBufferManager::submitTextBuffer(TextBufferHandle _handle, bgfx::ViewId case FONT_TYPE_ALPHA: program = m_basicProgram; bgfx::setState(0 - | BGFX_STATE_RGB_WRITE + | BGFX_STATE_WRITE_RGB | BGFX_STATE_BLEND_FUNC(BGFX_STATE_BLEND_SRC_ALPHA, BGFX_STATE_BLEND_INV_SRC_ALPHA) ); break; @@ -708,7 +708,7 @@ void TextBufferManager::submitTextBuffer(TextBufferHandle _handle, bgfx::ViewId case FONT_TYPE_DISTANCE: program = m_distanceProgram; bgfx::setState(0 - | BGFX_STATE_RGB_WRITE + | BGFX_STATE_WRITE_RGB | BGFX_STATE_BLEND_FUNC(BGFX_STATE_BLEND_SRC_ALPHA, BGFX_STATE_BLEND_INV_SRC_ALPHA) ); break; @@ -716,7 +716,7 @@ void TextBufferManager::submitTextBuffer(TextBufferHandle _handle, bgfx::ViewId case FONT_TYPE_DISTANCE_SUBPIXEL: program = m_distanceSubpixelProgram; bgfx::setState(0 - | BGFX_STATE_RGB_WRITE + | BGFX_STATE_WRITE_RGB | BGFX_STATE_BLEND_FUNC(BGFX_STATE_BLEND_FACTOR, BGFX_STATE_BLEND_INV_SRC_COLOR) , bc.textBuffer->getTextColor() ); @@ -779,15 +779,17 @@ void TextBufferManager::submitTextBuffer(TextBufferHandle _handle, bgfx::ViewId ibh.idx = bc.indexBufferHandleIdx; vbh.idx = bc.vertexBufferHandleIdx; - bgfx::updateDynamicIndexBuffer(ibh - , 0 - , bgfx::copy(bc.textBuffer->getIndexBuffer(), indexSize) - ); - - bgfx::updateDynamicVertexBuffer(vbh - , 0 - , bgfx::copy(bc.textBuffer->getVertexBuffer(), vertexSize) - ); + bgfx::update( + ibh + , 0 + , bgfx::copy(bc.textBuffer->getIndexBuffer(), indexSize) + ); + + bgfx::update( + vbh + , 0 + , bgfx::copy(bc.textBuffer->getVertexBuffer(), vertexSize) + ); } bgfx::setVertexBuffer(0, vbh, 0, bc.textBuffer->getVertexCount() ); |