mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-12 22:41:49 +00:00
add 16 bit indices support
This commit is contained in:
parent
91f45ad4d7
commit
39d9f269fa
1 changed files with 5 additions and 0 deletions
|
|
@ -131,6 +131,11 @@ static model::Mesh load_mesh(ByteReader& reader) {
|
||||||
for (int i = 0; i < indices.size(); i++) {
|
for (int i = 0; i < indices.size(); i++) {
|
||||||
indices[i] = smallIndices[i];
|
indices[i] = smallIndices[i];
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
reader.get(
|
||||||
|
reinterpret_cast<char*>(indices.data()),
|
||||||
|
indices.size() * sizeof(uint16_t)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
if (dataio::is_big_endian()) {
|
if (dataio::is_big_endian()) {
|
||||||
for (int i = 0; i < indices.size(); i++) {
|
for (int i = 0; i < indices.size(); i++) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue