mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-11-28 18:45:54 -05:00
Cleanup.
This commit is contained in:
parent
c69f29cb36
commit
5cd313e342
3 changed files with 12 additions and 10 deletions
|
@ -3379,7 +3379,7 @@ BX_PRAGMA_DIAGNOSTIC_POP();
|
|||
}
|
||||
else
|
||||
{
|
||||
srv[ii] = texture.m_srv;
|
||||
srv[ii] = texture.m_srv;
|
||||
sampler[ii] = texture.m_sampler;
|
||||
}
|
||||
}
|
||||
|
@ -3727,10 +3727,12 @@ BX_PRAGMA_DIAGNOSTIC_POP();
|
|||
{
|
||||
if (UINT32_MAX == draw.m_numIndices)
|
||||
{
|
||||
numIndices = m_indexBuffers[draw.m_indexBuffer.idx].m_size/2;
|
||||
const IndexBufferD3D11& ib = m_indexBuffers[draw.m_indexBuffer.idx];
|
||||
const uint32_t indexSize = 0 == (ib.m_flags & BGFX_BUFFER_INDEX32) ? 2 : 4;
|
||||
numIndices = ib.m_size/indexSize;
|
||||
numPrimsSubmitted = numIndices/prim.m_div - prim.m_sub;
|
||||
numInstances = draw.m_numInstances;
|
||||
numPrimsRendered = numPrimsSubmitted*draw.m_numInstances;
|
||||
numInstances = draw.m_numInstances;
|
||||
numPrimsRendered = numPrimsSubmitted*draw.m_numInstances;
|
||||
|
||||
deviceCtx->DrawIndexedInstanced(numIndices
|
||||
, draw.m_numInstances
|
||||
|
|
|
@ -3347,10 +3347,10 @@ namespace bgfx { namespace d3d9
|
|||
{
|
||||
const IndexBufferD3D9& ib = m_indexBuffers[draw.m_indexBuffer.idx];
|
||||
const uint32_t indexSize = 0 == (ib.m_flags & BGFX_BUFFER_INDEX32) ? 2 : 4;
|
||||
numIndices = ib.m_size/indexSize;
|
||||
numIndices = ib.m_size/indexSize;
|
||||
numPrimsSubmitted = numIndices/prim.m_div - prim.m_sub;
|
||||
numInstances = draw.m_numInstances;
|
||||
numPrimsRendered = numPrimsSubmitted*draw.m_numInstances;
|
||||
numInstances = draw.m_numInstances;
|
||||
numPrimsRendered = numPrimsSubmitted*draw.m_numInstances;
|
||||
|
||||
DX_CHECK(device->DrawIndexedPrimitive(prim.m_type
|
||||
, draw.m_startVertex
|
||||
|
|
|
@ -5274,10 +5274,10 @@ namespace bgfx { namespace gl
|
|||
if (UINT32_MAX == draw.m_numIndices)
|
||||
{
|
||||
const uint32_t indexSize = hasIndex16 ? 2 : 4;
|
||||
numIndices = ib.m_size/indexSize;
|
||||
numIndices = ib.m_size/indexSize;
|
||||
numPrimsSubmitted = numIndices/prim.m_div - prim.m_sub;
|
||||
numInstances = draw.m_numInstances;
|
||||
numPrimsRendered = numPrimsSubmitted*draw.m_numInstances;
|
||||
numInstances = draw.m_numInstances;
|
||||
numPrimsRendered = numPrimsSubmitted*draw.m_numInstances;
|
||||
|
||||
GL_CHECK(glDrawElementsInstanced(prim.m_type
|
||||
, numIndices
|
||||
|
|
Loading…
Reference in a new issue