mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-11-28 18:45:54 -05:00
Fixed DX9 debug output warnings.
This commit is contained in:
parent
391ebaefc3
commit
8511cefe54
2 changed files with 8 additions and 8 deletions
|
@ -1845,8 +1845,8 @@ namespace bgfx
|
||||||
void TextVideoMemBlitter::render(uint32_t _numIndices)
|
void TextVideoMemBlitter::render(uint32_t _numIndices)
|
||||||
{
|
{
|
||||||
uint32_t numVertices = _numIndices*4/6;
|
uint32_t numVertices = _numIndices*4/6;
|
||||||
s_renderCtx.m_indexBuffers[m_ib->handle.idx].update(0, _numIndices*2, m_ib->data);
|
s_renderCtx.m_indexBuffers[m_ib->handle.idx].update(0, _numIndices*2, m_ib->data, true);
|
||||||
s_renderCtx.m_vertexBuffers[m_vb->handle.idx].update(0, numVertices*m_decl.m_stride, m_vb->data);
|
s_renderCtx.m_vertexBuffers[m_vb->handle.idx].update(0, numVertices*m_decl.m_stride, m_vb->data, true);
|
||||||
|
|
||||||
DX_CHECK(s_renderCtx.m_device->DrawIndexedPrimitive(D3DPT_TRIANGLELIST
|
DX_CHECK(s_renderCtx.m_device->DrawIndexedPrimitive(D3DPT_TRIANGLELIST
|
||||||
, 0
|
, 0
|
||||||
|
@ -2028,13 +2028,13 @@ namespace bgfx
|
||||||
if (0 < m_render->m_iboffset)
|
if (0 < m_render->m_iboffset)
|
||||||
{
|
{
|
||||||
TransientIndexBuffer* ib = m_render->m_transientIb;
|
TransientIndexBuffer* ib = m_render->m_transientIb;
|
||||||
s_renderCtx.m_indexBuffers[ib->handle.idx].update(0, m_render->m_iboffset, ib->data);
|
s_renderCtx.m_indexBuffers[ib->handle.idx].update(0, m_render->m_iboffset, ib->data, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (0 < m_render->m_vboffset)
|
if (0 < m_render->m_vboffset)
|
||||||
{
|
{
|
||||||
TransientVertexBuffer* vb = m_render->m_transientVb;
|
TransientVertexBuffer* vb = m_render->m_transientVb;
|
||||||
s_renderCtx.m_vertexBuffers[vb->handle.idx].update(0, m_render->m_vboffset, vb->data);
|
s_renderCtx.m_vertexBuffers[vb->handle.idx].update(0, m_render->m_vboffset, vb->data, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
m_render->sort();
|
m_render->sort();
|
||||||
|
|
|
@ -148,13 +148,13 @@ namespace bgfx
|
||||||
}
|
}
|
||||||
|
|
||||||
void create(uint32_t _size, void* _data);
|
void create(uint32_t _size, void* _data);
|
||||||
void update(uint32_t _offset, uint32_t _size, void* _data)
|
void update(uint32_t _offset, uint32_t _size, void* _data, bool _discard = false)
|
||||||
{
|
{
|
||||||
void* buffer;
|
void* buffer;
|
||||||
DX_CHECK(m_ptr->Lock(_offset
|
DX_CHECK(m_ptr->Lock(_offset
|
||||||
, _size
|
, _size
|
||||||
, &buffer
|
, &buffer
|
||||||
, m_dynamic && 0 == _offset && m_size == _size ? D3DLOCK_DISCARD : 0
|
, _discard || (m_dynamic && 0 == _offset && m_size == _size) ? D3DLOCK_DISCARD : 0
|
||||||
) );
|
) );
|
||||||
|
|
||||||
memcpy(buffer, _data, _size);
|
memcpy(buffer, _data, _size);
|
||||||
|
@ -188,13 +188,13 @@ namespace bgfx
|
||||||
}
|
}
|
||||||
|
|
||||||
void create(uint32_t _size, void* _data, VertexDeclHandle _declHandle);
|
void create(uint32_t _size, void* _data, VertexDeclHandle _declHandle);
|
||||||
void update(uint32_t _offset, uint32_t _size, void* _data)
|
void update(uint32_t _offset, uint32_t _size, void* _data, bool _discard = false)
|
||||||
{
|
{
|
||||||
void* buffer;
|
void* buffer;
|
||||||
DX_CHECK(m_ptr->Lock(_offset
|
DX_CHECK(m_ptr->Lock(_offset
|
||||||
, _size
|
, _size
|
||||||
, &buffer
|
, &buffer
|
||||||
, m_dynamic && 0 == _offset && m_size == _size ? D3DLOCK_DISCARD : 0
|
, _discard || (m_dynamic && 0 == _offset && m_size == _size) ? D3DLOCK_DISCARD : 0
|
||||||
) );
|
) );
|
||||||
|
|
||||||
memcpy(buffer, _data, _size);
|
memcpy(buffer, _data, _size);
|
||||||
|
|
Loading…
Reference in a new issue