mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-10 13:31:49 +00:00
feat: multiple index buffers per mesh support
This commit is contained in:
parent
6debc92ae5
commit
4a6ccf4847
7 changed files with 81 additions and 43 deletions
|
|
@ -1,5 +1,6 @@
|
|||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
#include <stdexcept>
|
||||
|
||||
#include "typedefs.hpp"
|
||||
|
|
@ -40,7 +41,7 @@ struct VertexAttribute {
|
|||
template<typename VertexStructure>
|
||||
struct MeshData {
|
||||
util::Buffer<VertexStructure> vertices;
|
||||
util::Buffer<uint32_t> indices;
|
||||
std::vector<util::Buffer<uint32_t>> indices;
|
||||
util::Buffer<VertexAttribute> attrs;
|
||||
|
||||
MeshData() = default;
|
||||
|
|
@ -50,7 +51,7 @@ struct MeshData {
|
|||
/// @param attrs vertex attribute sizes (must be null-terminated)
|
||||
MeshData(
|
||||
util::Buffer<VertexStructure> vertices,
|
||||
util::Buffer<uint32_t> indices,
|
||||
std::vector<util::Buffer<uint32_t>> indices,
|
||||
util::Buffer<VertexAttribute> attrs
|
||||
) : vertices(std::move(vertices)),
|
||||
indices(std::move(indices)),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue