Renamed bgfx::updateDynamic* to just bgfx::update.

This commit is contained in:
Branimir Karadžić 2018-06-09 17:29:00 -07:00
parent f4d03c2244
commit 9da45ed78c
8 changed files with 29 additions and 26 deletions

View File

@ -163,10 +163,11 @@ void VectorDisplay::endFrame()
BX_CHECK(m_points.size() < MAX_NUMBER_VERTICES, "");
bgfx::updateDynamicVertexBuffer(m_vertexBuffers[m_currentDrawStep]
bgfx::update(
m_vertexBuffers[m_currentDrawStep]
, 0
, bgfx::copy(m_points.data(), (uint32_t)m_points.size() * sizeof(PosColorUvVertex) )
);
);
m_vertexBuffersSize[m_currentDrawStep] = (uint32_t)m_points.size();
for (int loopvar = 0; loopvar < m_numberDecaySteps; loopvar++)

View File

@ -261,7 +261,7 @@ public:
}
mem = bgfx::makeRef(&m_terrain.m_vertices[0], sizeof(PosTexCoord0Vertex) * m_terrain.m_vertexCount);
bgfx::updateDynamicVertexBuffer(m_dvbh, 0, mem);
bgfx::update(m_dvbh, 0, mem);
if (!bgfx::isValid(m_dibh) )
{
@ -269,7 +269,7 @@ public:
}
mem = bgfx::makeRef(&m_terrain.m_indices[0], sizeof(uint16_t) * m_terrain.m_indexCount);
bgfx::updateDynamicIndexBuffer(m_dibh, 0, mem);
bgfx::update(m_dibh, 0, mem);
break;
case 2: // Height Texture: Update a height texture that is sampled in the terrain vertex shader.

View File

@ -239,7 +239,7 @@ public:
}
uint32_t idx = m_mwc.gen() % (kDimWidth*kDimHeight);
bgfx::updateDynamicVertexBuffer(m_vbh[idx], 0, mem);
bgfx::update(m_vbh[idx], 0, mem);
}
// Submit 11x11 cubes.

View File

@ -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::update(
ibh
, 0
, bgfx::copy(bc.textBuffer->getIndexBuffer(), indexSize)
);
bgfx::updateDynamicVertexBuffer(vbh
, 0
, bgfx::copy(bc.textBuffer->getVertexBuffer(), vertexSize)
);
bgfx::update(
vbh
, 0
, bgfx::copy(bc.textBuffer->getVertexBuffer(), vertexSize)
);
}
bgfx::setVertexBuffer(0, vbh, 0, bc.textBuffer->getVertexCount() );

View File

@ -2178,7 +2178,7 @@ namespace bgfx
///
/// @attention C99 equivalent is `bgfx_update_dynamic_index_buffer`.
///
void updateDynamicIndexBuffer(
void update(
DynamicIndexBufferHandle _handle
, uint32_t _startIndex
, const Memory* _mem
@ -2252,7 +2252,7 @@ namespace bgfx
///
/// @attention C99 equivalent is `bgfx_update_dynamic_vertex_buffer`.
///
void updateDynamicVertexBuffer(
void update(
DynamicVertexBufferHandle _handle
, uint32_t _startVertex
, const Memory* _mem

View File

@ -6,7 +6,7 @@
#ifndef BGFX_DEFINES_H_HEADER_GUARD
#define BGFX_DEFINES_H_HEADER_GUARD
#define BGFX_API_VERSION UINT32_C(70)
#define BGFX_API_VERSION UINT32_C(71)
/// Color RGB/alpha/depth write. When it's not specified write will be disabled.
#define BGFX_STATE_WRITE_R UINT64_C(0x0000000000000001) //!< Enable R write.

View File

@ -3448,10 +3448,10 @@ error:
return s_ctx->createDynamicIndexBuffer(_mem, _flags);
}
void updateDynamicIndexBuffer(DynamicIndexBufferHandle _handle, uint32_t _startIndex, const Memory* _mem)
void update(DynamicIndexBufferHandle _handle, uint32_t _startIndex, const Memory* _mem)
{
BX_CHECK(NULL != _mem, "_mem can't be NULL");
s_ctx->updateDynamicIndexBuffer(_handle, _startIndex, _mem);
s_ctx->update(_handle, _startIndex, _mem);
}
void destroy(DynamicIndexBufferHandle _handle)
@ -3472,10 +3472,10 @@ error:
return s_ctx->createDynamicVertexBuffer(_mem, _decl, _flags);
}
void updateDynamicVertexBuffer(DynamicVertexBufferHandle _handle, uint32_t _startVertex, const Memory* _mem)
void update(DynamicVertexBufferHandle _handle, uint32_t _startVertex, const Memory* _mem)
{
BX_CHECK(NULL != _mem, "_mem can't be NULL");
s_ctx->updateDynamicVertexBuffer(_handle, _startVertex, _mem);
s_ctx->update(_handle, _startVertex, _mem);
}
void destroy(DynamicVertexBufferHandle _handle)
@ -4947,7 +4947,7 @@ BGFX_C_API bgfx_dynamic_index_buffer_handle_t bgfx_create_dynamic_index_buffer_m
BGFX_C_API void bgfx_update_dynamic_index_buffer(bgfx_dynamic_index_buffer_handle_t _handle, uint32_t _startIndex, const bgfx_memory_t* _mem)
{
union { bgfx_dynamic_index_buffer_handle_t c; bgfx::DynamicIndexBufferHandle cpp; } handle = { _handle };
bgfx::updateDynamicIndexBuffer(handle.cpp, _startIndex, (const bgfx::Memory*)_mem);
bgfx::update(handle.cpp, _startIndex, (const bgfx::Memory*)_mem);
}
BGFX_C_API void bgfx_destroy_dynamic_index_buffer(bgfx_dynamic_index_buffer_handle_t _handle)
@ -4975,7 +4975,7 @@ BGFX_C_API bgfx_dynamic_vertex_buffer_handle_t bgfx_create_dynamic_vertex_buffer
BGFX_C_API void bgfx_update_dynamic_vertex_buffer(bgfx_dynamic_vertex_buffer_handle_t _handle, uint32_t _startVertex, const bgfx_memory_t* _mem)
{
union { bgfx_dynamic_vertex_buffer_handle_t c; bgfx::DynamicVertexBufferHandle cpp; } handle = { _handle };
bgfx::updateDynamicVertexBuffer(handle.cpp, _startVertex, (const bgfx::Memory*)_mem);
bgfx::update(handle.cpp, _startVertex, (const bgfx::Memory*)_mem);
}
BGFX_C_API void bgfx_destroy_dynamic_vertex_buffer(bgfx_dynamic_vertex_buffer_handle_t _handle)

View File

@ -3052,7 +3052,7 @@ namespace bgfx
if (isValid(handle) )
{
updateDynamicIndexBuffer(handle, 0, _mem);
update(handle, 0, _mem);
}
else
{
@ -3062,7 +3062,7 @@ namespace bgfx
return handle;
}
BGFX_API_FUNC(void updateDynamicIndexBuffer(DynamicIndexBufferHandle _handle, uint32_t _startIndex, const Memory* _mem) )
BGFX_API_FUNC(void update(DynamicIndexBufferHandle _handle, uint32_t _startIndex, const Memory* _mem) )
{
BGFX_MUTEX_SCOPE(m_resourceApiLock);
@ -3238,7 +3238,7 @@ namespace bgfx
if (isValid(handle) )
{
updateDynamicVertexBuffer(handle, 0, _mem);
update(handle, 0, _mem);
}
else
{
@ -3248,7 +3248,7 @@ namespace bgfx
return handle;
}
BGFX_API_FUNC(void updateDynamicVertexBuffer(DynamicVertexBufferHandle _handle, uint32_t _startVertex, const Memory* _mem) )
BGFX_API_FUNC(void update(DynamicVertexBufferHandle _handle, uint32_t _startVertex, const Memory* _mem) )
{
BGFX_MUTEX_SCOPE(m_resourceApiLock);