Switch index/vertex count to UInt32

This commit is contained in:
SirLynix
2022-10-31 19:54:25 +01:00
parent dc6ce8427c
commit 6b8be23fa0
28 changed files with 129 additions and 128 deletions

View File

@@ -23,7 +23,7 @@ namespace Nz
NazaraAssert(m_buffer->GetType() == BufferType::Index, "buffer must be an index buffer");
m_endOffset = m_buffer->GetSize();
m_indexCount = m_endOffset / GetStride();
m_indexCount = SafeCast<UInt32>(m_endOffset / GetStride());
}
IndexBuffer::IndexBuffer(IndexType indexType, std::shared_ptr<Buffer> buffer, UInt64 offset, UInt64 size) :
@@ -36,10 +36,10 @@ namespace Nz
NazaraAssert(m_buffer->GetType() == BufferType::Index, "buffer must be an index buffer");
NazaraAssert(size > 0, "invalid buffer size");
m_indexCount = size / GetStride();
m_indexCount = SafeCast<UInt32>(size / GetStride());
}
IndexBuffer::IndexBuffer(IndexType indexType, UInt64 indexCount, BufferUsageFlags usage, const BufferFactory& bufferFactory, const void* initialData) :
IndexBuffer::IndexBuffer(IndexType indexType, UInt32 indexCount, BufferUsageFlags usage, const BufferFactory& bufferFactory, const void* initialData) :
m_indexType(indexType),
m_indexCount(indexCount),
m_startOffset(0)